Sure thing, you can run
npm run lint, or
./node_modules/.bin/eslint ., both trigger an eslint run.
Or you could be even more proactive and set up this git pre-commit hook:
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
Then every time you
git commit, it'll check for style issues ;)
The first two options check the entire codebase, so that might take awhile. The pre-commit hook only checks staged files so it is much faster, too.