@inventi/eslint-plugin-data-hooks
v1.0.2
Published
This ESLint plugin enforces the [Frontend Principles](https://git.inventi.cz/adam.bisek/grab-a-plate/-/tree/master/frontend#frontend-readme).
Downloads
4
Readme
@inventi/data-hooks
This ESLint plugin enforces the Frontend Principles.
Installation
Assuming you already have ESLint installed, run:
# npm
npm install @inventi/eslint-plugin-data-hooks --save-dev
# yarn
yarn add @inventi/eslint-plugin-data-hooks --dev
Then extend the recommended eslint config:
{
"extends": [
// ...
"plugin:@inventi/data-hooks/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/data-hooks"
],
"rules": {
// ...
'@inventi/data-hooks/no-data-hooks-inside-components': ['error'],
'@inventi/data-hooks/no-data-hooks-in-basic-components-dirs': ['error'],
}
}
License
MIT
Development
yarn remove @inventi/eslint-plugin-data-hooks
yarn add --dev file:./src/@packages/eslintPluginDataHooks
Add plugin to eslint config - see section Custom Configuration above