Configure eslint-plugin-import
See original GitHub issueFeature Description
We have eslint-plugin-import
installed but it doesn’t look like it’s configured
I created a branch here where I configured this https://github.com/google/site-kit-wp/tree/eslint-import-idea (you can see from the diff that it even found one error 😄 )
The remaining errors on this branch that need fixing are:
error Multiple exports of name 'getLocale' import/export
error Unable to resolve path to module 'tests/js/utils' import/no-unresolved
error Unable to resolve path to module 'assets/js/googlesitekit/datastore/site'
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The ESLint configuration should be modified to extend
plugin:import/recommended
.
The plugin is already installed - Any errors or warnings raised as a result should be fixed
Implementation Brief
- Merge linked PR https://github.com/google/site-kit-wp/pull/3745
Test Coverage
- There should be no changes and no updates to tests needed (apart from those done to fix new linting rules!)
Visual Regression Changes
- There should be no changes
QA Brief
- Check that JS linting is passing correctly
Changelog entry
- N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >eslint-plugin-import/extensions.md at main - GitHub
ESLint plugin with rules that help validate proper imports. ... Depending on the resolver you can configure more extensions to get resolved automatically....
Read more >How to quickly configure ESLint for import sorting
How to quickly configure ESlint for import sorting using sort-imports and eslint-plugin-import with the import/orders rule.
Read more >node_modules/eslint-plugin-import · master - PLMlab
--- extends: - eslint:recommended - plugin:import/errors - plugin:import/warnings # or configure manually: plugins: - import rules: import/no-unresolved: [2, { ...
Read more >How to configure eslint-plugin-import so the imports are sorted ...
I can not find the documentation for configuring the "eslint-plugin-import" rules. I would like to sort my imports alphabetically by ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No @aaemnnosttv . Most likely I quickly read the readme incorrectly 😄
Just doing
- plugin:import/recommended
is enoughQA ✅