-
-
Notifications
You must be signed in to change notification settings - Fork 34.9k
tools: update eslint to v10 #61905
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
tools: update eslint to v10 #61905
Changes from all commits
da0f917
34399fc
69c2e17
af4c26f
83e18a3
0808672
5b83c73
2f1d4da
100c22a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,12 +49,13 @@ module.exports = { | |
| // The common module should be loaded in the first place. | ||
| const notLoadedFirst = foundModules.indexOf(requiredModule) !== 0; | ||
| if (notLoadedFirst) { | ||
| context.report( | ||
| node, | ||
| 'Mandatory module "{{moduleName}}" must be loaded ' + | ||
| 'before any other modules.', | ||
| { moduleName: requiredModule }, | ||
| ); | ||
| context.report({ | ||
| node: node.body[0] ?? node, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ESLint v10 has modified the ranges of a Program to cover the leading comments. As a result, the c.f. eslint/eslint#20451 |
||
| message: | ||
| 'Mandatory module "{{moduleName}}" must be loaded ' + | ||
| 'before any other modules.', | ||
| data: { moduleName: requiredModule }, | ||
| }); | ||
| } | ||
| }, | ||
| }; | ||
|
|
||
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.
ESLint will automatically set
sourceTypeof.cjstocommonjs, so we don't need specify thesourceTypefor cjs files.