Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8612018

Browse files
authored
Build: Make the import/no-unused-modules ESLint rule work in WebStorm
When run via WebStorm, the root path against which paths in the config of the`import/no-unused-modules` ESLint rule are resolved is the path where the ESLintconfig file that defines the rule lies, i.e. `src`. When run via the commandline, it's usually the root folder of the jQuery repository. This patternintends to catch both.Note that we cannot specify two patterns here:```js[ "src/*.js", "*.js" ]```as they're analyzed individually and the rule crashes if a pattern cannot bematched.Closesgh-4777
1 parenta442110 commit8612018

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/.eslintrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@
1515
"import/no-cycle":"error",
1616
"import/no-unused-modules": ["error", {
1717
"unusedExports":true,
18-
"ignoreExports": ["src/*.js" ]
18+
19+
// When run via WebStorm, the root path against which these paths
20+
// are resolved is the path where this ESLint config file lies,
21+
// i.e. `src`. When run via the command line, it's usually the root
22+
// folder of the jQuery repository. This pattern intends to catch both.
23+
// Note that we cannot specify two patterns here:
24+
// [ "src/*.js", "*.js" ]
25+
// as they're analyzed individually and the rule crashes if a pattern
26+
// cannot be matched.
27+
"ignoreExports": ["{src/,}*.js" ]
1928
} ],
2029
"indent": ["error","tab", {
2130
"outerIIFEBody":0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp