Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tympapost opened this issue Jul 13, 2016 · 9 comments
Open

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

tympapost opened this issue Jul 13, 2016 · 9 comments

Comments

@tympapost
Copy link

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
Copy link

iegik commented Aug 30, 2016

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

@Migacz85
Copy link

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
Copy link

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

@alp82
Copy link

alp82 commented Nov 14, 2019

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

@segevofer
Copy link

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

@lonelyua
Copy link

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

@rodmoreno
Copy link

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

@hamzahsn
Copy link

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

@kembalsado
Copy link

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

  • npx eslint --fix src folder of the .js file

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

  • npx eslint --fix .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants