Error when using ESLint Airbnb config
See original GitHub issueVersion
3.5.5
Environment info
Environment Info:
System:
OS: Windows 7
CPU: (4) x64 Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
Binaries:
Node: 11.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
- Run in command line:
vue create vue-test
- Manually select features
- Make sure “Linter / Formatter” is selected
- Pick “ESLint Airbnb config”
- “Lint on save”
- Select to place config “In dedicated config files”
- Do not save preset for future use
What is expected?
Project will be created without errors.
What is actually happening?
ERROR TypeError: (0 , _ignore.getFileExtensions) is not a function
Occurred while linting d:\temp\vue-test\src\App.vue:9
TypeError: (0 , _ignore.getFileExtensions) is not a function
Occurred while linting d:\temp\vue-test\src\App.vue:9
at checkSourceValue (d:\temp\vue-test\node_modules\eslint-plugin-import\lib\
rules\no-useless-path-segments.js:103:60)
at checkSourceValue (d:\temp\vue-test\node_modules\eslint-module-utils\modul
eVisitor.js:29:5)
at checkSource (d:\temp\vue-test\node_modules\eslint-module-utils\moduleVisi
tor.js:34:5)
at listeners.(anonymous function).forEach.listener (d:\temp\vue-test\node_mo
dules\eslint\lib\util\safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (d:\temp\vue-test\node_modules\eslint\lib\util\safe-emitter.j
s:45:38)
at NodeEventGenerator.applySelector (d:\temp\vue-test\node_modules\eslint\li
b\util\node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (d:\temp\vue-test\node_modules\eslint\l
ib\util\node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (d:\temp\vue-test\node_modules\eslint\lib\ut
il\node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (d:\temp\vue-test\node_modules\eslint\lib\code
-path-analysis\code-path-analyzer.js:632:23)
Using “ESLint with error prevention only” or “ESLint Standard config” works correctly without errors. Earlier vue-cli versions did not have this problem, but I didn’t have time to find exact version where this issue started.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:9 (2 by maintainers)
Top Results From Across the Web
eslint-config-airbnb error · Issue #465
I've added "extends": "eslint-config-airbnb" to an empty .eslintrc file and when I run eslint app I get the following error.
Read more >Eslint with airbnb does not load when using .eslint.json
Note that eslint works just fine whenever using .yml or .js files as configuration. How could I solve this error in the json...
Read more >eslint-config-airbnb
This package provides Airbnb's .eslintrc as an extensible shared config. Usage. We export three ESLint configurations for your usage. eslint- ...
Read more >eslint-config-airbnb-typescript - npm package
Make sure you have the regular Airbnb config setup. If you are using React, use eslint-config-airbnb, or if you aren't using React, use...
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 FreeTop 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
Top GitHub Comments
Seems to be an upstream issue in
eslint-plugin-import
, see https://github.com/benmosher/eslint-plugin-import/issues/1322I assume a viable workaround would be to disable this plugin’s rule that throws this error for the time being, until the bug has been fixed upstream:
Maybe the bug affects other rules as well - disable them accordingly.
same with macos, setup eslint for the react-project with
./node_modules/.bin/eslint --init
TypeError: (0 , _ignore.getFileExtensions) is not a function Occurred while linting /Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/src/app.js:3 at checkSourceValue (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js:103:60) at checkSourceValue (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint-module-utils/moduleVisitor.js:29:5) at checkSource (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint-module-utils/moduleVisitor.js:34:5) at listeners.(anonymous function).forEach.listener (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/util/safe-emitter.js:45:58) at Array.forEach (<anonymous>) at Object.emit (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/util/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/util/node-event-generator.js:251:26) at NodeEventGenerator.applySelectors (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/util/node-event-generator.js:280:22) at NodeEventGenerator.enterNode (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/util/node-event-generator.js:294:14) at CodePathAnalyzer.enterNode (/Users/user/Dev/FrontEnd-Dev-projects_fcc/Advanced_Front-End/react-toe/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)