@inventi/eslint-plugin-data-hooks

1.0.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @inventi/eslint-plugin-data-hooks

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

6.72 kB

Total Files

6

Last publish

Collaborators

  • adambisek