-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
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
79953e3
to
a999295
Compare
This looks like a nice addition. Do you think this is ready for merge or would you like to wait for more feedback and/or changes? Thanks! |
Hey, I think this PR would need a last rebase on |
a999295
to
ffa391b
Compare
The PR has been rebased and CI checks are passing, feel free to merge it if you like it 👀 |
Let's merge this now so we can fully test it for real in the project and see how it goes. Thanks Hugo! |
2d41195
to
b406997
Compare
…rn workspaces (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- imp(biomejs): upgrade Biomejs, fix patterns, don't use yarn workspaces | Q | A | ------------- | --- | Bug fix? | yes/no | New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Following #1848: - It looks like glob pattern like `src/*/{src,test}` (the `{a,b}` part) were not working - I've configured files to lint/format in our `biome.json`. - I've also upgraded Biomejs to ^1.8.3 - I've rerun Biome lint/format on the whole codebase Sorry for the big PR 🙏🏻 Commits ------- 304bfae imp(biomejs): upgrade Biomejs, fix patterns, don't use yarn workspaces
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?