Provides custom eslint rules for Porscheinformatik
npm install @porscheinformatik/eslint-plugin-templateProvides custom eslint template rules for Porsche Informatik
You'll first need to install ESLint:
``sh`
npm i eslint --save-dev
Next, install @porscheinformatik/eslint-plugin-template:
`sh`
npm install @porscheinformatik/eslint-plugin-template --save-dev
Add @porscheinformatik/template to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": [
"@porscheinformatik/template"
]
}
Then configure the rules you want to use under the rules section.
`json`
{
"rules": {
"@porscheinformatik/template/rule-name": 2
}
}
It's recommended to use the recommended configuration
`json`
{
"extends": [
"plugin:@porscheinformatik/template/recommended"
],
}
💼 Configurations enabled in.\
✅ Set in the recommended configuration.\--fix` CLI option.
🔧 Automatically fixable by the
| Name              | Description | 💼 | 🔧 |
| :----------------------------------------------------- | :------------------------------------------------------------- | :- | :- |
| test-automation-id | Enforces data-testid on various tags for easier testautomation | ✅ | 🔧 |