0.1.3 • Published 3 years ago
@fredericoo/eslint-plugin-vanilla-extract v0.1.3
eslint-plugin-vanilla-extract
Eslint plugin for vanilla extract lib
Installation
You'll first need to install ESLint:
pnpm add eslint -DNext, install @fredericoo/eslint-plugin-vanilla-extract:
pnpm add -D @fredericoo/eslint-plugin-vanilla-extractUsage
Add @fredericoo/vanilla-extract to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"@fredericoo/vanilla-extract"
]
}Then configure the rules you want to use under the rules section.
e.g.:
{
"rules": {
"@fredericoo/vanilla-extract/no-individual-styles-imported": 2
}
}Supported Rules
| Rule ID | Description | Fixable |
|---|---|---|
| @fredericoo/vanilla-extract/omit-redundant-style | If you’s using style() to generate a className and only consuming atoms or other classNames, it is redundant and can be removed | ✅ |
| @fredericoo/vanilla-extract/no-individual-styles-imported | If you’re importing individual styles from a file, you should import the entire file with * as style and consume from it | ✅ |