-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop ESLint and Prettier for Biome #1848
base: 2.x
Are you sure you want to change the base?
Drop ESLint and Prettier for Biome #1848
Conversation
Failures are unrelated |
I cannot resist to answer with: https://dayssincelastjavascriptframework.com/ (and now more seriously i'll look at your post 😅 ) |
(first read: you know how to speak to me :) ) |
Yeah I know about the 0 day since the last JS framework/tools meme... and trust me it's not for nothing my TN is "JS hate account" Biome is a community-fork from Rome (started 3 years ago), it's a tool I was really looking forward to because of the over-fragmentation of JavaScript tools and the unnecessarily complex configurations to make them work together. I consider Biome enough "production-ready", to nicely and quickly lint and format our JS(X)/TS(X) files. |
What about editor integration? Did you tried the PHPstorm extension? Do you think it's mature enough? |
I didn't know an extension existed, and so I didn't try it. But I'm not a big fan of ESLint/Prettier integration in IDEs, I prefer relying on CLI / CI / pre-commit hook :D |
I'll try it next week (late in the week) ! |
@@ -57,7 +55,7 @@ export default class extends Controller<HTMLInputElement> { | |||
button.classList.add(...this.buttonClassesValue); | |||
button.setAttribute('tabindex', '-1'); | |||
button.addEventListener('click', this.toggle.bind(this)); | |||
button.innerHTML = this.visibleIcon + ' ' + this.visibleLabelValue; | |||
button.innerHTML = `${this.visibleIcon} ${this.visibleLabelValue}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this worth the change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, string concatenation with +
is a mistake
"workspaces": [ | ||
"src/*/assets" | ||
], | ||
"workspaces": ["src/*/assets"], | ||
"scripts": { | ||
"build": "node bin/build_javascript.js && node bin/build_styles.js", | ||
"test": "bin/run-vitest-all.sh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any impact on those two ? (build / test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmh nope, it is not related to Biome and they still works
e65d382
to
97dd32d
Compare
97dd32d
to
79953e3
Compare
… of a function (it requires a prototype)
79953e3
to
a999295
Compare
Hi everyone,
Biome is a new modern tool for code linting and formatting.
It supports TypeScript out-of-the-box, lint and format does not conflict each-other (like ESLint and Prettier can do), and it's super fast!
With Biome, we can easily replace:
There is a lot of modifications, but 99% of them are:
import type ...
/import { type ... }
when necessary'use strict'
, since we havetype: 'module'
inpackage.json
files, but I'm not 100% confidente here and I may add them back+
operatorI've disabled the following linting rules in order to reduce the number of modifications, but later we can start to enable them:
complexity/noStaticOnlyClass
complexity/noForEach
style/noParameterAssign
performance/noDelete
The yarn scripts
lint
,format
,check-lint
andcheck-format
have been modified in consequences.For performance comparisons, you can check those two CI jobs:
For the number of commits, I wanted to ease the review by doing many atomic commits, but feel free to squash if necessary.
WDYT?