Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csu-feizao/eslint-plugin-css-modules-es
ESLint plugin with rules that help validate css modules imports
https://github.com/csu-feizao/eslint-plugin-css-modules-es
css-modules eslint eslint-plugin esmodule import lint
Last synced: about 1 month ago
JSON representation
ESLint plugin with rules that help validate css modules imports
- Host: GitHub
- URL: https://github.com/csu-feizao/eslint-plugin-css-modules-es
- Owner: csu-feizao
- License: mit
- Created: 2022-04-29T12:23:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-04-29T14:14:31.000Z (over 2 years ago)
- Last Synced: 2024-03-23T09:41:58.136Z (8 months ago)
- Topics: css-modules, eslint, eslint-plugin, esmodule, import, lint
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-css-modules-es
Check no default import and camelCaseOnly use of css modules, visit this [blog](https://github.com/csu-feizao/blog/issues/1) for more details.
## Installation
You'll first need to install [ESLint](https://eslint.org/):
```sh
npm i eslint --save-dev
```Next, install `eslint-plugin-css-modules-es`:
```sh
npm install eslint-plugin-css-modules-es --save-dev
```## Usage
Add `css-modules-es` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"css-modules-es"
]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"css-modules-es/rule-name": 2
}
}
```## Specifying file extensions
You can specify a list of file extensions to validate css modules via plugin settings in .eslintrc.
```json
{
"settings": {
"css-modules-es": {
"extensions": [".modules.css", ".modules.less"]
}
}
}
```The default extensions is `[".modules.css"]`
## Supported Rules
* no-default-import-css-modules
* only-camelcase-key-css-modules## 📄 License
MIT license