dart_style
markdownlint
Our great sponsors
dart_style | markdownlint | |
---|---|---|
14 | 7 | |
629 | 4,429 | |
1.0% | - | |
9.2 | 9.6 | |
14 days ago | 4 days ago | |
Dart | JavaScript | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dart_style
-
Why is Prettier rock solid?
> Oh I'm curious why you're rewriting it?
The primary driver is that we're moving to a fairly different formatting style: https://github.com/dart-lang/dart_style/issues/1253
The formatter works sort of like a compiler in that it parses the code, translates it to an internal representation, does optimization on that IR, and then outputs final code. The main difference is that the "final code" is also source code, and the "optimization" is line splitting.
The old IR grew organically over time and got increasingly difficult to work with. It baked certain formatting choices directly into the IR (mainly indentation) which line splitting then had no control over. For example, given a function call like:
someLongFunctionName(some + long + argument + expression, [firstElement, anotherElement, aThirdElement]);
-
The Record type is coming to Dart/Flutter!
in your analysis_options.yaml. The formatter doesn't understand the new syntax yet, though.
-
Linter actually that important for a lot of minor things?
Sorry, perhaps im not quite familiar with the GitHub issues you’re chatting about, but a quick search shows the Dart team actually made a very similar argument about laptops and diffs as the first reply in a thread about the 80 character max: https://github.com/dart-lang/dart_style/issues/833
-
What is the best flutter formatter?
Nope, but there is a proposal to set line length in pubspec.yaml: https://github.com/dart-lang/dart_style/issues/918
- Imagine that someone passed a law—literally a criminal offense—if you formatted your code longer than 80 columns. You were forced to comply. Do you honestly believe that your engineering productivity or overall quality of life as a human on Earth would be measurably negatively impacted?
-
Custom Formatting in VS Code
The standard Dart extension only supports formatting using the SDK-supplied formatter (dart_style) which (by design) is not configurable (although it can be turned on/off with the dart.enableSdkFormatter setting).
-
10 Best Visual Studio Code Extensions for Flutter Development
Flutter itself provides formatting choices, however, it only formats Dart files and it doesn’t re-order the code. Flutter formats the code based on these formatting rules.
- Flutter’s take on the 2-space indent code style
-
Anyone else seeing dartfmt hanging VSCode lately?
There are some other possibilities - such as complex code being slow to format (for example I hit https://github.com/dart-lang/dart_style/issues/1022 and originally thought it was a repro for this issue), or that the server is busy doing its initial synchronous scan of the workspace, though those should be temporary and the format should eventually complete so it's probably not what most people are reporting here.
markdownlint
-
Blogging in Djot Instead of Markdown
Some of Djot's features can be achieved by using markdownlint though: https://github.com/DavidAnson/markdownlint
-
Recommended Linters
markdownlint - A Node.js style checker and lint tool for Markdown/CommonMark files.
-
Regal v0.14.0 released
Improvements - The prefer-some-in-iteration rule will by default no longer flag iteration where a sub-attribute is used, like input[_].item - The use-in-operator rule has been extended to include more types of items, leading to better discovery of locations where in should be used - Remove replace directive in go.mod that made hard to integrate Regal as a library - The project now uses markdownlint to ensure consistent formatting of its documentation - The Go API now allows reading custom rules from an fs.FS filesystem
-
Project idea: port markdownlint to Rust
People are always looking for simple projects to learn Rust with, so here's one for anyone who's currently looking. Port markdownlint to Rust. Markdownlint is ~3.3k lines of JavaScript (including the lint implementation themselves!), so I reckon it's pretty doable.
-
VS Code - Catch errors in your markdown files
The markdownlint VS Code extension is powered by the Node library of the same name. Its usage is quite similar to ESLint. It has a set of rules that can be configured, errors are highlighted, and you can automatically fix simple errors.
-
Markdown Linting
Markdown Lint
-
10 Best Visual Studio Code Extensions for Flutter Development
There are no compilers in the Flutter project that guarantee to find issues in README.md or CHANGELOG.md files. To remedy this, the Markdownlint plugin provides a set of guidelines to encourage Markdown file standards and uniformity. You can use this extension to check for problems locally and verify the content before publishing it live. Browse the user manual to learn more about rules.
What are some alternatives?
dart-code-metrics - Software analytics tool that helps developers analyse and improve software quality.
remark-lint - plugins to check (lint) markdown code style
Dart-Code - Dart and Flutter support for VS Code
write-good - Naive linter for English prose
flutter-examples - This repository contains the Syncfusion Flutter UI widgets examples and the guide to use them.
pub-dev - The pub.dev website
Visual Studio Code - Visual Studio Code
sdk - The Dart SDK, including the VM, dart2js, core libraries, and more.
docs - Linode guides and tutorials.
fpdart - Functional programming in Dart and Flutter. All the main functional programming types and patterns fully documented, tested, and with examples.
vale - :pencil: A markup-aware linter for prose built with speed and extensibility in mind.