I'm not sure if this is the right place (might be more of a core question). Anyway, is there a neat way to pass jsx files to eslint? Now I'm doing something like eslint lib/*.jsx. Globstar (*_/_) doesn't appear to be supported and this crashes if no jsx files are found. Is it possible to set .eslintrc to look for certain formats for instance? How do you deal with this problem?
You have a few options to pass your JSX files to ESLint:
eslint lib/*.jsx : check all .jsx files in lib, excluding subdirectorieseslint lib/**/*.jsx : check all .jsx files in lib, including subdirectorieseslint lib : check all .js files in lib, including subdirectorieseslint --ext .jsx lib : check all .jsx files in lib, including subdirectorieseslint --ext .js --ext .jsx lib : check all .js and .jsx files in lib, including subdirectoriesYou can find more informations in the ESLint Command line Interface documentation.
@yannickcr Thanks a lot! I ended up using a combination of .eslintignore and eslint --ext .jsx --ext .js.
Most helpful comment
You have a few options to pass your JSX files to ESLint:
eslint lib/*.jsx: check all .jsx files in lib, excluding subdirectorieseslint lib/**/*.jsx: check all .jsx files in lib, including subdirectorieseslint lib: check all .js files in lib, including subdirectorieseslint --ext .jsx lib: check all .jsx files in lib, including subdirectorieseslint --ext .js --ext .jsx lib: check all .js and .jsx files in lib, including subdirectoriesYou can find more informations in the ESLint Command line Interface documentation.