-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: replace eslint with biome for formatting and linting #58
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
- Coverage 95.48% 94.57% -0.91%
==========================================
Files 6 6
Lines 332 369 +37
==========================================
+ Hits 317 349 +32
- Misses 15 20 +5 ☔ View full report in Codecov by Sentry. |
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.
🗒️ Leaving a few notes for the wonderful reviewer!
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"files": { | ||
"ignore": [".api", "*.json"], |
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.
.api
here ignores the vendored codecov
packaging which seems to use a compiled module?
The fixes required for the linter were not immediate or obvious, but I don't expect changes to happen to these files often so I think we're safe to ignore it here!
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.
I think so too! By the way, where can the file be placed? If it's under a codecov-specific directory, we may want to skip the whole directory to avoid being bothered by similar files in the future. If it can be placed everywhere, this config should be good to go
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.
It seems like .api
stores generated files in ce66298 from codecov
OpenAPI responses 📚
AFAIK this .api
directory could be called something else, but we would just have to update the package path:
slack-health-score/package.json
Line 37 in b8d5739
"@api/codecov": "file:.api/apis/codecov" |
I'll keep this in mind with future updates, but think this'll be ok to merge as is!
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.
oops, it's not "*.api"... I was assuming that it's file extension 🤦 Thanks for sharing the details!
"test": "npm run lint && c8 npm run test:mocha", | ||
"test:mocha": "mocha --config .mocharc.json test/*-test.js test/**/*-test.js" |
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.
Ordered alphabetically! And added the lint:fix
above. But otherwise these tasks should run
as expected 🚀
"eslint": "^8.57.1", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-jsdoc": "^50.4.3", | ||
"eslint-plugin-node": "^11.1.0", |
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.
🫡
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.
Happy to see this
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.
Same! Even if I disagree with a few of the biome
defaults, I cannot disagree that it's fewer dependencies 🤓
if (include && include.length) { | ||
include.forEach((i) => { | ||
if (include?.length) { | ||
for (const i of include) { |
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.
Unlooping the .forEach
is the only manual change required throughout all of this!
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.
Thanks for working on this! Left a few minor comments but looks good to me
"eslint": "^8.57.1", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-jsdoc": "^50.4.3", | ||
"eslint-plugin-node": "^11.1.0", |
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.
Happy to see this
@seratch Thank you for the thorough review 🙏 I'm hopeful that this'll help us maintain formatting with ease here! 🚀 |
Summary
This PR replaces
eslint
withbiome
for wicked fast linting and formating and fixes #49. The changes are mechanical for the most part, but I'll note important updates in comment!Requirements