@inventi/eslint-plugin-reinhard
v1.2.2
Published
Grammar nazi for your INVENTI `grab a plate` project.
Downloads
13
Readme
@inventi/eslint-plugin-reinhard
Grammar nazi for your INVENTI grab a plate
project.
This ESLint plugin enforces the Frontend Principles.
Installation
Assuming you already have ESLint installed, run:
# npm
npm install @inventi/eslint-plugin-reinhard --save-dev
# yarn
yarn add @inventi/eslint-plugin-reinhard --dev
Then extend the recommended eslint config:
{
"extends": [
// ...
"plugin:@inventi/reinhard/recommended"
]
}
Custom Configuration
If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:
{
"plugins": [
// ...
"@inventi/reinhard"
],
"rules": {
// ...
'@inventi/reinhard/no-data-hooks-inside-components': ['error'], // disallow hooks for fetching and mutating data inside regular presentational components
'@inventi/reinhard/no-data-hooks-in-basic-components-dirs': ['error'], // disallow hooks within components directories
'@inventi/reinhard/components-staff-culture': ['error'], // staff culture of components; every component should consist of index.ts, storybook and component
}
}
License
MIT
Development
yarn remove @inventi/eslint-plugin-reinhard
yarn add --dev file:./src/@packages/eslintPluginReinhard
Add plugin to eslint config - see section Custom Configuration above