You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, ESLint + Prettier is the ecosystem default, but it's painful and brittle to configure, and significantly slower than it "needs" to be. Further, if something breaks you have to look up a solution on your own (which usually involves installing even more non-obvious packages) instead of having a clear place to report issues.
The Rome project is not as mature, but it has pretty comprehensive rules at this point, and they aim for rough feature parity with Prettier (rome/tools#2555, rome/tools#3178) — so we're not going to lose out on a ton of important code issues.
node_modules cost
This is not the top consideration, but switching to Rome also saves us several thousand files and over 100MB in dependencies. For such core ecosystem functionality, this takes us from "ludicrous" to "reasonable".
I'm also really glad to be rid of Babel, which tends to require frustrating configuration maintenance compared to other tools (which support ES2020 + TypeScript out of the box).
We're on the cutting edge. The VSCode Rome extension just barely picks up the rome.json config file as of v0.14.1. Rome itself is also in the middle of a rewrite and only supports linting and formatting so far (so we can't use it for more, although we've been happy with esbuild). During our transition, I even found a bug that broke our code, although hopefully this was limited one-off issue.
I just switched our formatting and linting to Rome: https://rome.tools/
Commit: f3be7b7
I really wanted to switch to Rome because it:
rome
eslint
+prettier
make lint
make format
(⏱ = 0.1s)
(Note that
npm run
andnpx
add several hundred milliseconds. This time has been removed from the testing of9b5fe855
.)Basically, ESLint + Prettier is the ecosystem default, but it's painful and brittle to configure, and significantly slower than it "needs" to be. Further, if something breaks you have to look up a solution on your own (which usually involves installing even more non-obvious packages) instead of having a clear place to report issues.
The Rome project is not as mature, but it has pretty comprehensive rules at this point, and they aim for rough feature parity with Prettier (rome/tools#2555, rome/tools#3178) — so we're not going to lose out on a ton of important code issues.
node_modules
costThis is not the top consideration, but switching to Rome also saves us several thousand files and over 100MB in dependencies. For such core ecosystem functionality, this takes us from "ludicrous" to "reasonable".
I'm also really glad to be rid of Babel, which tends to require frustrating configuration maintenance compared to other tools (which support ES2020 + TypeScript out of the box).
Transition details
We're using Rome as of f3be7b7.
The main
make format
transition is commit 5d4256e, which we've added to.git-blame-ignore-revs
. This prevents it from showing up GitHub's blame view, with similar functionality in other tools: https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/Caveats
We're on the cutting edge. The VSCode Rome extension just barely picks up the
rome.json
config file as ofv0.14.1
. Rome itself is also in the middle of a rewrite and only supports linting and formatting so far (so we can't use it for more, although we've been happy withesbuild
). During our transition, I even found a bug that broke our code, although hopefully this was limited one-off issue.Miscellaneous issues:
rome.lspBin
doesn't work in VSCode rome/tools#3194rome.json
changes rome/tools#3195js/noUnusedVariables
rome/tools#3183Request textDocument/formatting failed
.rome.json
is being picked up by the extension)?vendor
)dist
from the config, so it doesn't show errors in VSCodejs/useBlockStatements
can break single-line commentedelse
rome/tools#3199npx rome format --apply-suggested
can change leave files inconsistent withmake format
The text was updated successfully, but these errors were encountered: