Skip to content

Build: Make the import/no-unused-modules ESLint rule work in WebStorm #4777

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

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented Aug 24, 2020

Summary

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 ESLint
config file that defines the rule lies, i.e. src. When run via the command
line, it's usually the root folder of the jQuery repository. This pattern
intends to catch both.

Note that we cannot specify two patterns here:

[ "src/*.js", "*.js" ]

as they're analyzed individually and the rule crashes if a pattern cannot be
matched.

Checklist

Sorry, something went wrong.

@mgol mgol added this to the 4.0.0 milestone Aug 24, 2020
@mgol mgol self-assigned this Aug 24, 2020
@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Aug 25, 2020
@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Aug 31, 2020
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me

@mgol mgol removed the Needs review label Aug 31, 2020
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 ESLint
config file that defines the rule lies, i.e. `src`. When run via the command
line, it's usually the root folder of the jQuery repository. This pattern
intends 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 be
matched.
@mgol mgol force-pushed the eslint-workaround branch from 0d9f633 to 01bfed3 Compare September 2, 2020 15:02
@mgol mgol merged commit 8612018 into jquery:master Sep 2, 2020
@mgol mgol deleted the eslint-workaround branch September 2, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants