How to configure package.json to run eslint script

eslint "**/*.js" to run on all js files in all the folders recursively (in the current folder)

You can also do: AnyFolder/**/*.js

And to ignore a folder: eslint "**/*.js" --ignore-pattern node_modules/

Know more at eslint/command-line-interface


eslint . --ext .js to lint files with the .js extension.

The . targets files in the current directory and all subdirectories.

To include other file extensions, eslint . --ext .js,.jsx or eslint . --ext .js --ext .jsx.

The eslint documentation covers this option.