6

What version of standard?

12.0.1

What operating system, Node.js, and npm version?

Windows 10, Node v10.15.1, NPM v.6.8.0

What did you expect to happen?

  • I install both standard and babel-eslint on devDependencies (locally).
  • I run standard --parser babel-eslint
  • I get the standard use babel-eslint parser to recognize babel code style and not stating it as style error

What actually happened?

  • I install both standard and babel-eslint on devDependencies (locally).

  • I run standard --parser babel-eslint

  • I get error: Cannot find module 'babel-eslint'

I read from previous issues 85 1167, it should be fixed when they are installed on the same level. But it does not happen on mine.

I have tried to put config below on package.json:

"standard": {
    "parser": "babel-eslint"
  }

But it does not resolve the issue.

Inovramadani
  • 1,955
  • 3
  • 14
  • 34

3 Answers3

9

Hi this is an old question but for who passes here in the future, those answers didn't work for me, but this one did:

npm install babel-eslint --save-dev
Remoo
  • 637
  • 7
  • 17
4

Try

$yarn add standard babel-eslint
Nalan Madheswaran
  • 10,136
  • 1
  • 57
  • 42
1

I solved this by doing:

npm install -g babel-eslint
Guillermo
  • 927
  • 3
  • 10
  • 23