-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Configurable Extension Filter #801
Comments
Can you explain the use case a bit more? I'm not quite following. ESLint can't understand ES6 syntax (yet) so it seems like you'd want to skip over |
For the moment that's absolutely the case. More just interested in getting this on the radar for whenever ES6 support does land. I believe the repo README says ES6 would be revisited after the 0.5.0 release, so I was hopeful there might be some movement on that front soon :) |
Yes, we are basically waiting for ES6 support in Esprima to land. |
Working on this. |
New: Allow other file extensions (fixes #801)
Is it possible to define the Current workaround is just to name the file |
I'm seeing the same behavior as @SimenB where the If possible, I'd like to stick with |
You have to use |
Thanks @ilyavolodin, --ext=js --ext=jsx does work. Is there a way to configure this from .eslintrc? Thanks. |
I tried digging in the source, and it seems For IntelliJ (if that's what you're using), you can pass CLI arguments. But it'd definitely be preferable to have that in the config... EDIT: I don't suppose eslint could test against |
You are correct. We can't configure this through .eslintrc because we only read configuration after we build up a list of files to lint. And I think there's an open issue somewhere to make |
flags needed to that jsx files are linted too. see: eslint/eslint#801
Currently it appears the
.js
extension filter is hard coded when traversing a directory hierarchy for files to lint. It would be nice for this to be configurable, particularly as ES6 support starts to come up.As an example use case, we're currently using
.js.es6
as an extension for files that have ES6 module syntax transpiled to AMD, and it would be nice to be able to lint the original source files.The text was updated successfully, but these errors were encountered: