Conversation
|
Review requested:
|
| { moduleName: requiredModule }, | ||
| ); | ||
| context.report({ | ||
| node: node.body[0] ?? node, |
There was a problem hiding this comment.
The ESLint v10 has modified the ranges of a Program to cover the leading comments.
https://eslint.org/docs/latest/use/migrate-to-10.0.0#-program-ast-node-range-spans-entire-source-text
As a result, the /* eslint-disable */ comment does not work if we still report error at the start of the program, since the comment will be after the start of the Program node. Here we report at the first statement.
c.f. eslint/eslint#20451
| jsdoc.configs['flat/recommended'], | ||
| { | ||
| files: ['**/*.{js,cjs}'], | ||
| files: ['**/*.js'], |
There was a problem hiding this comment.
ESLint will automatically set sourceType of .cjs to commonjs, so we don't need specify the sourceType for cjs files.
Disable `reportGlobalThis`, essentially restore the behaviour to ESLint v9.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61905 +/- ##
==========================================
- Coverage 89.75% 89.74% -0.02%
==========================================
Files 674 674
Lines 204886 204884 -2
Branches 39376 39380 +4
==========================================
- Hits 183894 183865 -29
- Misses 13280 13284 +4
- Partials 7712 7735 +23
🚀 New features to boost your workflow:
|
In this PR we bumped
tools/eslintto v10 and the@babel/*to 8.0.0-rc.2, the first version shipped with ESLint v10 support.The eslint rules are revised due to breaking changes in ESLint v10. To limit the size of this PR, I have also turned off one new recommended rules in v10:
no-useless-assignment, as it introduced hundreds of errors across the codebase. We can investigate later if we want to enable this rule.