selaux/eslint-plugin-filenames

Support for JSX

Closed this issue · 5 comments

It would be useful, to check JSX components using this plugin. I tried to find something similar in eslint-plugin-react, no luck.

What is the result of linting JSX files with eslint-plugin-filenames? Isn't this possible (the extension shouldn't matter)?

I have tried to create a failure in one of my JSX components for the filenames/match-exported rule, and no failure was reported. Plus the README clearly states, that only .js files are supported.
https://github.com/selaux/eslint-plugin-filenames/blame/master/README.md#L10

Hm, I created some test cases for JSX in #12 and it should work just fine. JSX is a feature of the parser used by eslint, so as long as it can be parsed it can be linted by this plugin. Can it be some other issue? E.g. is the export a default export?

The note in the README should basically make you aware that only files linted with eslint are linted by this plugin.

Works?

Yes, it does work, sorry for troubles. 👍 for tests. Does it make sense to change description in the README though, so it won't sound that strict?