Eslint rules specifically for Patterns to help encourage best practice usage.
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @etchteam/eslint-plugin-patterns
:
npm install @etchteam/eslint-plugin-patterns --save-dev
Add @etchteam/patterns
to the plugins section of your .eslintrc
configuration file:
{
"plugins": [
"'@etchteam/patterns'"
]
}
Then configure the rules you want to use under the rules section. Recommended config is below.
{
"rules": {
"@etchteam/patterns/dont-touch-src": "warn",
"@etchteam/patterns/dont-add-classes-to-components": "warn"
}
}
- @etchteam/patterns/dont-touch-src
- @etchteam/patterns/dont-add-classes-to-components