-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
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
base: main
Are you sure you want to change the base?
tools: update eslint to v10 #61905
Changes from all commits
580a227
dd585cd
68d049c
e199c33
1f4824e
9626d55
de72ba7
afff6b9
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.