0.0.6 ⢠Published 1 year ago
@alicercedigital/eslint-plugin v0.0.6
eslint-plugin
force use cn function on class and className of any JSX element
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install @alicercedigital/eslint-plugin:
npm install @alicercedigital/eslint-plugin --save-devUsage
In your configuration file, import the plugin @alicercedigital/eslint-plugin and add force-cn to the plugins key:
export default [
{
plugins: {
// @alicercedigital/eslint-plugin
"@alicercedigital",
}
}
];Then configure the rules you want to use under the rules key.
export default [
{
plugins: {
// @alicercedigital/eslint-plugin
"@alicercedigital",
},
rules: {
"@alicercedigital/force-cn": "error"
}
}
];Configurations
TODO: Run eslint-doc-generator to generate the configs list (or delete this section if no configs are offered).
Rules
š§ Automatically fixable by the --fix CLI option.
| Name | Description | š§ |
|---|---|---|
| forceCn | Avoid looping over enums. | š§ |