Open tympapost opened 8 years ago
Try ESLint CLI http://eslint.org/docs/user-guide/command-line-interface
What about https://www.npmjs.com/package/gulp-eslint ? Somebody maybe have idea how to tell eslint to treat all files in folder like a one ?
Try this ./node_modules/.bin/eslint --fix src
i needed to specify a pattern like so: ./node_modules/.bin/eslint --fix 'src/**/*.js'
Replace ./node_modules/.bin/
with npx
(Available since npm 5.2.0)
So You can just run npx eslint --fix src
Sometimes we need to use quotes for the path:
"lint": "eslint 'src/**' "
I already used @lonelyua solution but I want to specify target into .eslintrc.js file. Is this possible?
@rodmoreno have you tried to use files
in .eslint
config file?
If you wanted to ESLint a .js file in a specific folder
npx eslint --fix src
folder of the .js filebut if you want to ESLint all the .js file in the whole repository or folder
npx eslint --fix .
My javascript code is split into several files in the same folder. Can anybody show me how can I configure InteractiveLinter and/or ESLint in order to parse all the files in the folder, when I have a .js file open?