Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/q-peppa/eslint-plugin-css-modules-case

eslint-plugin-css-modules-case
https://github.com/q-peppa/eslint-plugin-css-modules-case

Last synced: about 2 months ago
JSON representation

eslint-plugin-css-modules-case

Awesome Lists containing this project

README

        

# eslint-plugin-css-modules-case

this plugin not allow camelCase in css-modules, inspired by [eslint-plugin-css-modules](https://github.com/atfzl/eslint-plugin-css-modules/)

# Rules

- css-modules-case/no-camel-case
- --fix ✅

# Usage

.eslintrc.js

```json
"plugins":["css-modules-case"],
"rules": {
"css-modules-case/no-camel-case":[ "error" , {
"case" :"snake" // 'snake' | 'kebab'
}
]
}

```

# Demo

```tsx
foo
```

---

```sh
error mainContainer case incompatible with snake-case, should be main_container

eslint --fix
# -> foo
```