-
Notifications
You must be signed in to change notification settings - Fork 34
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
Q: Is it possible to use this with typescript? #43
Comments
@damiangreen i am not sure, maybe you can by using typescript-eslint-parser. So you run eslint on your typescript code. |
It is possible and works well, you'll need to use @typescript-eslint/parser, @typescript-eslint/eslint-plugin and this plugin. I migrated from using TSLint at the same time so have a
You'll also need to make sure you import CSS in your TSX files like |
Thanks @jch254 i'm trying to modify my settings to match yours i dont get no-unused-class errors still though (which is the core bit i wanted), should the |
Here is a Typescript/React project I've set up eslint-plugin-css-modules https://github.com/jch254/starter-pack. I didn't have to add .css to the overrides section. |
FWIW, we're using ESLint with TypeScript and setting up this plugin, and it seems to work with no particular setup, so I think this issue can be closed. Additionally, TSLint has been deprecated since 2019 and their authors suggest switching to ESLint (which we did at my company and very much enjoying the outcome). |
I'm migrating my JSX to TSX and would like to still have this plugin work.
Is there an equivalent tslint plugin? Or can this be configured?
The text was updated successfully, but these errors were encountered: