Hello!
I have problem with newest version of this loader.
SCSS:
.testmodule {
color: green;
&__testmoduleelement {
color: red;
&--modifier {
color: blue;
}
}
}
will generate
export interface IDevModuleScss {
'testmodule': string;
'testmodule__testmoduleelement': string;
'testmodule__testmoduleelement--modifier': string;
}
export const locals: IDevModuleScss;
export default locals;
(export default locals; - added manually)
importing:
import styles from './dev.module.scss'
It is work great, lint will suggest what classes i can use, example: (React)
<div className={styles["testmodule__testmoduleelement--modifier"]}>
Test
</div>
But when i REMOVE this class from SCSS, lint will not mark this line as incorrect. I can use any string of class name!
<div className={styles["incorrect ClAsS NaMe"]}>
Test
</div>
And it still will be "OK".
Can you add something like
type Options = "hello" | "world";
var foo: Options;
foo = "hello"; // Okay
foo = "asdf"; // Error!
instead of simple interface?