error when eslint --init
See original GitHub issueI have trouble when I try to generate a eslint config by run eslint --init
on v2.10.2.my system is os10.11.4.And the problem happen when i select ‘Use a popular style guide’,if i select ‘Answer questions about your style’,it will work , it will generate a config for me.
eslint --init ? How would you like to configure ESLint? Use a popular style guide ? Which style guide do you want to follow? AirBnB ? What format do you want your config file to be in? YAML
and there is the error info:
Unexpected string SyntaxError: Unexpected string at Object.parse (native) at check (/usr/local/lib/node_modules/eslint/lib/util/npm-util.js:76:25) at Object.checkDevDeps (/usr/local/lib/node_modules/eslint/lib/util/npm-util.js:116:12) at installModules (/usr/local/lib/node_modules/eslint/lib/config/config-initializer.js:86:29) at getConfigForStyleGuide (/usr/local/lib/node_modules/eslint/lib/config/config-initializer.js:289:5) at null.completed (/usr/local/lib/node_modules/eslint/lib/config/config-initializer.js:353:26) at PromptUI.onCompletion (/usr/local/lib/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js:57:10) at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/local/lib/node_modules/eslint/node_modules/rx-lite/rx.lite.js:1550:12) at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/eslint/node_modules/rx-lite/rx.lite.js:1489:14) at Subject.Rx.Subject.addProperties.onCompleted (/usr/local/lib/node_modules/eslint/node_modules/rx-lite/rx.lite.js:5871:19)
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Wondering if this is the same as #6257. @wenjoy Can you please provide your package.json here and/or run it through jsonlint.com?
Closing as duplicate of #6257. (Actually this one came first, but #6257 has more information in it.) @wenjoy Please follow #6257 in order to know when this is resolved. Thanks!