0

In my package.json I have:

"scripts": {                                   "lint": "eslint --debug components"   }

When I run it withnpm run lint I see this

> eslint --debug componentseslint:cli Running on files +0mseslint:glob-util Creating list of files to process. +39mseslint:ignored-paths Looking for ignore file in c:\dev\Monies +6mseslint:ignored-paths Could not find ignore file in cwd +1mseslint:cli-engine Linting complete in: 13ms +5ms

So it ignores my dir.

It does work as expected when I run it from command line.

node_modules\.bin\eslint --debug compomentseslint:cli Running on files +0mseslint:glob-util Creating list of files to process. +39mseslint:ignored-paths Looking for ignore file in c:\dev\Monies +5mseslint:ignored-paths Could not find ignore file in cwd +1mseslint:cli-engine Processing c:\dev\Monies\compoments\Header.js +15mseslint:cli-engine Linting c:\dev\Monies\compoments\Header.js +2mseslint:config Constructing config for c:\dev\Monies\compoments\Header.js +1ms

Why it doesn't work withnpm run?

askedOct 27, 2016 at 22:03
Piotr Perak's user avatar
1
  • I wasn't able to reproduce this with npm 3.10.8 and eslint 3.8.1. It works, for me.CommentedOct 27, 2016 at 22:20

1 Answer1

3

It looks like you have a typo in the directory name:

eslint --debug components

versus

node_modules\.bin\eslint --debug compoments

components != compoments

answeredOct 28, 2016 at 8:51
Łukasz Wiśniewski's user avatar
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I wonder how much more time I would lose before noticing it :)

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.