Including `eslint-plugin-import` cause lint postpone
See original GitHub issueWhen including eslint-plugin-import
(even without any rules) cause tests to “stuck” after showing lint results.
Lint shows results, and then waits for some time before shell receives exit code.
Installed eslint dependencies:
├── eslint@7.15.0
├── eslint-formatter-gitlab@2.0.0
├── eslint-import-resolver-node@0.3.4
├── eslint-import-resolver-webpack@0.13.0
├── eslint-plugin-import@2.22.1
├── eslint-plugin-jsx-a11y@6.4.1
├── eslint-plugin-react@7.21.5
├── eslint-plugin-react-hooks@4.2.0
├── eslint-plugin-testing-library@3.10.1
Reduced eslint config
{
plugins: [
'react',
'react-hooks',
'jsx-a11y',
// 'import'
],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 10,
sourceType: 'module',
impliedStrict: true,
ecmaFeatures: {
jsx: true
}
},
env: {
browser: true,
amd: true,
es6: true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended'
],
settings: {
'import/resolver': {
webpack: {
config: path.resolve(__dirname, 'app/webpack.config.js')
}
},
}
}
When un-commenting import
line, i see this strange behaviour, like something happens in background after lint finished.
✖ 23 problems (6 errors, 17 warnings)
3 errors and 4 warnings potentially fixable with the `--fix` option.
// <-- Stuck happens here, before showing log bellow
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pdd@0.0.0 lint:js-staged: `CI_MERGE_REQUEST_TARGET_BRANCH_NAME=master ./contrib/ci/gitlab-lint-changed-js.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pdd@0.0.0 lint:js-staged script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
ESLint plugin with rules that help validate proper imports.
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All...
Read more >Eslint fails on file position change with configured eslint-plugin ...
If the delay does seem to be longer than normal, I find making a file change (i.e pressing enter to add a blank...
Read more >Newest 'eslint-plugin-import' Questions - Stack Overflow
Adding multiple paths to eslint-plugin-import pattern I am looking to use eslint to force my imports to be in a standard order. I...
Read more >Troubleshooting a Next.js app with ESLint - LogRocket Blog
Setting up ESLint with Next.js; Custom rules and plugins ... Inside your Next.js app, add a new script called lint — its value...
Read more >Lint and Style Your TypeScript Code with ESLint and Prettier
ESLint plugins can add additional rules to the out-of-the-box rules that ESLint provides. Plugins can also provide configurations that ...
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
Sure, a PR to do so would be appreciated.
That should be added to readme, to avoid further mistakes.