question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error when eslint --init

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, May 26, 2016

Wondering if this is the same as #6257. @wenjoy Can you please provide your package.json here and/or run it through jsonlint.com?

0reactions
platinumazurecommented, May 26, 2016

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: (Error running eslint init) · Issue #15512 - GitHub
It seems npm init @eslint/config is intended to be the new method of doing the setup. Is that correct?
Read more >
How do I fix this error message "Initialization error (Eslint ...
Error on attempt to find parent and base ESLint configuration files of '.eslintrc': [projectpath] \node_modules\lodash\lodash.js:386 ...
Read more >
Getting Started with ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Parsing error: Unexpected token for Eslint --init - Google Groups
Hi Marina, It looks like it's failing to install eslint-plugin-react. Can you try answering “no” for that question and see if you can...
Read more >
eslint | Yarn - Package Manager
Make sure your plugins (and ESLint) are both in your project's package.json as devDependencies (or dependencies, if your project uses ESLint at runtime)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found