MiguelCastillo / Brackets-InteractiveLinter

Interactive linting for Brackets
Other
119 stars 26 forks source link

How to get ESLint to parse all .js files in a folder? #183

Open tympapost opened 8 years ago

tympapost commented 8 years ago

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?

iegik commented 8 years ago

Try ESLint CLI http://eslint.org/docs/user-guide/command-line-interface

Migacz85 commented 5 years ago

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 ?

rishiraj824 commented 5 years ago

Try this ./node_modules/.bin/eslint --fix src

alp82 commented 4 years ago

i needed to specify a pattern like so: ./node_modules/.bin/eslint --fix 'src/**/*.js'

segevofer commented 4 years ago

Replace ./node_modules/.bin/ with npx (Available since npm 5.2.0) So You can just run npx eslint --fix src

lonelyua commented 4 years ago

Sometimes we need to use quotes for the path: "lint": "eslint 'src/**' "

rodmoreno commented 3 years ago

I already used @lonelyua solution but I want to specify target into .eslintrc.js file. Is this possible?

hamzahsn commented 3 years ago

@rodmoreno have you tried to use files in .eslint config file?

kembalsado commented 1 year ago

If you wanted to ESLint a .js file in a specific folder

but if you want to ESLint all the .js file in the whole repository or folder