dart_style
biome
dart_style | biome | |
---|---|---|
14 | 23 | |
632 | 10,509 | |
0.9% | 9.4% | |
9.2 | 9.9 | |
3 days ago | 6 days ago | |
Dart | Rust | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
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.
biome
-
I switch from Eslint to Biome
{ "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", "organizeImports": { "enabled": true }, "files": { "ignore": ["package.json", "package-lock.json"] }, "linter": { "enabled": true, "rules": { "recommended": true, "style": { "noUnusedTemplateLiteral": "off" } } }, "formatter": { "indentStyle": "space", "indentWidth": 4, "lineWidth": 320 }, "javascript": { "formatter": { "semicolons": "asNeeded" } } }
- Fast, Declarative, Reproduble and Composable Developer Environments Using Nix
- Biome – fast JavaScript linter and formatter
-
What is the most useful project you've ever worked on?
It is great to see that so many users are enthusiastic about Biome. It is really gratifying to work on a project that is appreciated and useful to the community.
[0] https://biomejs.dev/
- Biomejs.dev (previously Rome-tools by Meta)
-
Build a Vite 5 backend integration with Flask
Once you build a simple Vite backend integration, try not to complicate Vite's configuration unless you absolutely must. Vite has become one of the most popular bundlers in the frontend space, but it wasn't the first and it certainly won't be the last. In my 7 years of building for the web, I've used Grunt, Gulp, Webpack, esbuild, and Parcel. Snowpack and Rome came-and-went before I ever had a chance to try them. Bun is vying for the spot of The New Hotness in bundling, Rome has been forked into Biome, and Vercel is building a Rust-based Webpack alternative.
-
Why is Prettier rock solid?
> My only bad experience with prettier, besides the incredible slowness (orders of magnitude slower than ruff)
Ruff is based on the same foundations that Biome (https://biomejs.dev/). Although Biome doesn't support all languages that Prettier supports, you should give a try, it is fast.
- RFC: Biome Plugins
-
BiomeJS 2024 Roadmap
I am also confused by this goal, I've started a discussion in the repo to get some clarity on intent and direction there: https://github.com/biomejs/biome/discussions/1642
-
Tailwind CSS: Automatic Class Sorting with Prettier
Biome [0], a fast Prettier-compatible formatter, is currently working on adding class sorting [1]. We expect to ship the feature with the next release (on February). We are discussing which options to provide for the feature (mainly on the Discord of Biome).
[0] https://biomejs.dev/
What are some alternatives?
dart-code-metrics - Software analytics tool that helps developers analyse and improve software quality.
prettier - Prettier is an opinionated code formatter.
Dart-Code - Dart and Flutter support for VS Code
rspack - A fast Rust-based web bundler 🦀️
flutter-examples - This repository contains the Syncfusion Flutter UI widgets examples and the guide to use them.
tools - Unified developer tools for JavaScript, TypeScript, and the web
markdownlint - A Node.js style checker and lint tool for Markdown/CommonMark files.
prettier-plugin-sort-imports - A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
pub-dev - The pub.dev website
jest - Delightful JavaScript Testing.
sdk - The Dart SDK, including the VM, dart2js, core libraries, and more.
tsc-files - A tiny tool to run `tsc` on specific files without ignoring tsconfig.json