@deskpro/eslint-plugin-deskpro-product
v0.0.3
Published
Deskpro product specific eslint rules
Downloads
650
Readme
eslint-plugin-deskpro
Deskpro specific eslint rules
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @deskpro/eslint-plugin-deskpro-product
:
npm install @deskpro/eslint-plugin-deskpro-product --save-dev
Usage (locally)
Add @deskpro/eslint-plugin-deskpro-product
to your dev dependencies. Use the link:../../../
format if you're running it locally - you'll need to re-install it on every change.
Add @deskpro/eslint-plugin-deskpro-product
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@deskpro/deskpro-product"]
}
Then configure the rules you want to use under the rules section in .eslintrc.js
{
"rules": {
"@deskpro/deskpro-product/no-concatenated-formatMessage-id": "error",
"@deskpro/deskpro-product/no-concatenated-translate-id": "error"
}
}
Rules
🔧 Automatically fixable by the --fix
CLI option.
| Name | Description | 🔧 | | :--------------------------------------------------------------------------------------- | :------------------------------------------------- | :- | | no-concatenated-formatMessage-id | Disallow concatenation of formatMessage id | | | no-concatenated-translate-id | Disallow concatenation of Translate id | | | styled-tspan-must-have-as-attribute | Styled TSpan element attributes must contain 'as'. | 🔧 |