Skip to content
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

Fix the no-unused-modules ignored files syntax #248

Closed
ismay opened this issue Apr 29, 2020 · 3 comments
Closed

Fix the no-unused-modules ignored files syntax #248

ismay opened this issue Apr 29, 2020 · 3 comments

Comments

@ismay
Copy link
Contributor

ismay commented Apr 29, 2020

See the slack discussion here: https://dhis2.slack.com/archives/CHENB0272/p1588154127084500

It seems that the ignoreExports option I was using is not the correct option for ignoring files completely for this rule. Instead it seems like https://github.com/benmosher/eslint-plugin-import#importignore is the one we need.

See if moving to that option would fix the error @varl was seeing.

@varl
Copy link
Contributor

varl commented Apr 29, 2020

Looks like this may be related: import-js/eslint-plugin-import#1659

@varl
Copy link
Contributor

varl commented Apr 29, 2020

Seems like the workaround is to specify it in the local configuration for our repos for now and leave it untouched in the main config.

varl added a commit that referenced this issue Apr 29, 2020
Workaround for #248.

This needs to be defined in the local configuration for each repo until

In the local .eslintrc.js:

     rules: {
         'import/no-unused-modules': [
             'error',
             {
                 unusedExports: true,
                 missingExports: true,
                 ignoreExports: [
					// add your paths and files to ignore here
                 ],
             },
         ],
     },
dhis2-bot added a commit that referenced this issue Apr 29, 2020
# [7.1.0-alpha.6](v7.1.0-alpha.5...v7.1.0-alpha.6) (2020-04-29)

### Bug Fixes

* remove ignoreExports from no-unused-modules ([97f4f46](97f4f46)), closes [#248](#248)
@ismay
Copy link
Contributor Author

ismay commented Apr 29, 2020

Ah yeah 👍

@ismay ismay closed this as completed Apr 29, 2020
dhis2-bot added a commit that referenced this issue Oct 13, 2020
# [7.2.0-alpha.1](v7.1.0...v7.2.0-alpha.1) (2020-10-13)

### Bug Fixes

* **eslint-import:** switch to recommended import settings ([cb892d2](cb892d2))
* declare import as a plugin ([f771a87](f771a87))
* disabled missingExports by default ([7bce47d](7bce47d))
* execute the tools in the current dir ([7e05f84](7e05f84))
* remove ignoreExports from no-unused-modules ([97f4f46](97f4f46)), closes [#248](#248)
* resolve eslint plugins internally first ([75cbad0](75cbad0))
* run the command from inside node_modules ([fd620c5](fd620c5))
* use the nearest bin folder to exec cmds ([761611f](761611f))

### Features

* **eslint:** add no-unused-modules rule ([2b5db3f](2b5db3f))
dhis2-bot added a commit that referenced this issue Oct 14, 2020
# [7.2.0](v7.1.0...v7.2.0) (2020-10-14)

### Bug Fixes

* **eslint-import:** switch to recommended import settings ([cb892d2](cb892d2))
* declare import as a plugin ([f771a87](f771a87))
* disabled missingExports by default ([7bce47d](7bce47d))
* execute the tools in the current dir ([7e05f84](7e05f84))
* remove ignoreExports from no-unused-modules ([97f4f46](97f4f46)), closes [#248](#248)
* resolve eslint plugins internally first ([75cbad0](75cbad0))
* run the command from inside node_modules ([fd620c5](fd620c5))
* use the nearest bin folder to exec cmds ([761611f](761611f))

### Features

* **eslint:** add no-unused-modules rule ([2b5db3f](2b5db3f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants