eslint-plugin-css-modules-case
v0.0.5
Published
not allow camelCase in css-modules, use kebab-case or snake_case
Downloads
4
Maintainers
Readme
eslint-plugin-css-modules-case
this plugin not allow camelCase in css-modules, inspired by eslint-plugin-css-modules
Rules
- css-modules-case/no-camel-case
- --fix ✅
Usage
.eslintrc.js
"plugins":["css-modules-case"],
"rules": {
"css-modules-case/no-camel-case":[ "error" , {
"case" :"snake" // 'snake' | 'kebab'
}
]
}
Demo
<main className={styles.mainContainer}> foo </main>
error mainContainer case incompatible with snake-case, should be main_container
eslint --fix
# -> <main className={styles["main_contanier"]}> foo </main>