kevmoo/dash_skills

dart-long-lines

|- Guidelines for handling long lines in Dart code to adhere to the 80-column rule. The `lines_longer_than_80_chars` lint.

First seen Apr 22, 2026

Installation

$ npx skills add kevmoo/dash_skills --skill dart-long-lines

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from kevmoo/dash_skills · top by installs.

npx skills add kevmoo/dash_skills

Browse all from kevmoo/dash_skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 144
License LICENSE
Default branch main
Open issues 2
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,366 B
  • docs SUMMARY.md 142 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 135 installs

SKILL.md

Dart Long Lines

1. When to use this skill

Use this skill when:

  • Writing Dart code that might exceed the 80-column limit.
  • Refactoring code to comply with the lineslongerthan80chars lint.

Reference: https://dart.dev/tools/linter-rules/lineslongerthan80chars

Discovery

To find lines that exceed the limit:

Automated Analysis

The most reliable way to find long lines is to use the Dart analyzer:

  • Command: dart analyze
  • Lint: lineslongerthan80chars

Manual Search

To search for long lines using regex:

  • Regex: ^.{81,}$ (Matches any line with 81 or more characters).

2. Guidelines

Format First

Always run dart format before manually breaking long lines. The formatter often automatically fixes long lines, especially in generated code, and applies standard Dart styling rules.

Code Comments

Break long code comments (//) cleanly at word boundaries to ensure lines do not exceed 80 characters. Maintain tight formatting and avoid unnecessary vertical space.

Documentation Comments (///)

  • Apply the same line-breaking rules as for code comments.
  • Avoid breaking markdown link blocks like [name] or

text across lines. Place them on their own line if they exceed the limit.

  • Start doc comments with a single summary sentence, followed by a blank line

before the rest of the comment. It is okay to break this first sentence across multiple lines to fit the 80-column limit.

  • Avoid unresolved references or dangling sentences.

Long Strings

  • Use adjacent string literals (e.g., 'part 1 ' 'part 2') to break long

strings. Break at word boundaries.

  • If a single-line string contains newline characters (\n) or if there are

consecutive print statements, consider migrating to a multi-line string literal (''').

Format and Analyze After Changes

  • Run dart format and dart analyze after making changes.
  • Be aware that splitting strings may trigger new lints (e.g.,

prefersinglequotes if a double-quoted string is split into parts that no longer contain single quotes).

3. Examples

Documentation Comment Link

Avoid:

/// This is a long doc comment that contains a link to [a very long
/// URL](http://example.com/very/long/url/that/exceeds/eighty/chars).

Prefer:

/// This is a long doc comment that contains a link to [a very long URL][ref].
///
/// [ref]: http://example.com/very/long/url/that/exceeds/eighty/chars

Adjacent String Literals

Prefer:

final longString = 'This is a very long string that needs to be broken '
    'across multiple lines to stay under the limit.';

Multi-line String Migration

Avoid:

print('This is line 1\nThis is line 2 that is also quite long\nThis is line 3 which makes the whole thing exceed eighty characters');

Prefer:

print('''This is line 1
This is line 2 that is also quite long
This is line 3 which makes the whole thing exceed eighty characters''');