Skip to content
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

It should throw an error if you use a class that doesn't exist #399

Open
nickretallack opened this issue Oct 31, 2023 · 0 comments
Open

Comments

@nickretallack
Copy link

If you have something like this:

import style from 'style.module.css';

export default () => <div className={style.foo}/>

If the class foo doesn't exist in style.module.css, style.foo will be undefined, so you'll just end up with a div with no class applied to it.

I would like an automated check for this sort of mistake.

I'm currently using this VSCode plugin which can highlight the problem in the editor, but it doesn't work as a compile-time check. Neither does this typescript plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant