0.0.3 ⢠Published 3 years ago
@deskpro/eslint-plugin-deskpro-product v0.0.3
eslint-plugin-deskpro
Deskpro specific eslint rules
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install @deskpro/eslint-plugin-deskpro-product:
npm install @deskpro/eslint-plugin-deskpro-product --save-devUsage (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'. | š§ |