0

So i used eslint pretty normally until I added a specific rule, then eslint seemed to just loop infinite :

> api@1.0.0 pretest /api
> eslint .

this just stay forever. Never ending the process. So i removed that specific rule again, but it didnt fixed the problem.

This is my eslint file at the moment, but even if i change the rules it would still go infinite.

{
    "extends": "airbnb-base/legacy",
    "parserOptions": {
        "ecmaVersion": 2018
    },
    "rules": {
        "global-require" : 0,
        "no-unused-vars" : 0
    },
    "env": {
        "es6": true,
        "node": true
    }
}

this is my rule in the package.json :

"pretest": "eslint .",
Bidoubiwa
  • 910
  • 2
  • 12
  • 25

1 Answers1

4

Try ignoring node_modules/ folder:

eslint . --ext .js --ignore-pattern node_modules/

Also, you can ignore specific folders using .eslintignore file in the root of your project:

.eslintignore

/dist
/node_modules
Jose A. Ayllón
  • 866
  • 6
  • 19