Skip to content

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

Open

Description

@nickretallack

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions