How to use eslint-plugin-react-hooks - 2 common examples

To help you get started, we’ve selected a few eslint-plugin-react-hooks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codesandbox / codesandbox-client / packages / app / src / app / components / CodeEditor / Monaco / workers / linter / index.js View on Github external
'jsx-a11y/aria-role': require('eslint-plugin-jsx-a11y/lib/rules/aria-role'),
  'jsx-a11y/aria-unsupported-elements': require('eslint-plugin-jsx-a11y/lib/rules/aria-unsupported-elements'),
  'jsx-a11y/heading-has-content': require('eslint-plugin-jsx-a11y/lib/rules/heading-has-content'),
  'jsx-a11y/anchor-is-valid': require('eslint-plugin-jsx-a11y/lib/rules/anchor-is-valid'),
  'jsx-a11y/iframe-has-title': require('eslint-plugin-jsx-a11y/lib/rules/iframe-has-title'),
  'jsx-a11y/img-redundant-alt': require('eslint-plugin-jsx-a11y/lib/rules/img-redundant-alt'),
  'jsx-a11y/no-access-key': require('eslint-plugin-jsx-a11y/lib/rules/no-access-key'),
  'jsx-a11y/no-distracting-elements': require('eslint-plugin-jsx-a11y/lib/rules/no-distracting-elements'),
  'jsx-a11y/no-redundant-roles': require('eslint-plugin-jsx-a11y/lib/rules/no-redundant-roles'),
  'jsx-a11y/role-has-required-aria-props': require('eslint-plugin-jsx-a11y/lib/rules/role-has-required-aria-props'),
  'jsx-a11y/role-supports-aria-props': require('eslint-plugin-jsx-a11y/lib/rules/role-supports-aria-props'),
  'jsx-a11y/scope': require('eslint-plugin-jsx-a11y/lib/rules/scope'),
  'react-hooks/rules-of-hooks': require('eslint-plugin-react-hooks').rules[
    'rules-of-hooks'
  ],
  'react-hooks/exhaustive-deps': require('eslint-plugin-react-hooks').rules[
    'exhaustive-deps'
  ],

  '@typescript-eslint/no-angle-bracket-type-assertion': require('@typescript-eslint/eslint-plugin/dist/rules/no-angle-bracket-type-assertion')
    .default,
  '@typescript-eslint/no-array-constructor': require('@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor')
    .default,
  '@typescript-eslint/no-namespace': require('@typescript-eslint/eslint-plugin/dist/rules/no-namespace')
    .default,
  '@typescript-eslint/no-unused-vars': require('@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars')
    .default,
  '@typescript-eslint/no-useless-constructor': require('@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor')
    .default,
};
/* eslint-enable global-require */
github codesandbox / codesandbox-client / packages / app / src / app / components / CodeEditor / Monaco / workers / linter / index.js View on Github external
'jsx-a11y/aria-activedescendant-has-tabindex': require('eslint-plugin-jsx-a11y/lib/rules/aria-activedescendant-has-tabindex'),
  'jsx-a11y/aria-props': require('eslint-plugin-jsx-a11y/lib/rules/aria-props'),
  'jsx-a11y/aria-proptypes': require('eslint-plugin-jsx-a11y/lib/rules/aria-proptypes'),
  'jsx-a11y/aria-role': require('eslint-plugin-jsx-a11y/lib/rules/aria-role'),
  'jsx-a11y/aria-unsupported-elements': require('eslint-plugin-jsx-a11y/lib/rules/aria-unsupported-elements'),
  'jsx-a11y/heading-has-content': require('eslint-plugin-jsx-a11y/lib/rules/heading-has-content'),
  'jsx-a11y/anchor-is-valid': require('eslint-plugin-jsx-a11y/lib/rules/anchor-is-valid'),
  'jsx-a11y/iframe-has-title': require('eslint-plugin-jsx-a11y/lib/rules/iframe-has-title'),
  'jsx-a11y/img-redundant-alt': require('eslint-plugin-jsx-a11y/lib/rules/img-redundant-alt'),
  'jsx-a11y/no-access-key': require('eslint-plugin-jsx-a11y/lib/rules/no-access-key'),
  'jsx-a11y/no-distracting-elements': require('eslint-plugin-jsx-a11y/lib/rules/no-distracting-elements'),
  'jsx-a11y/no-redundant-roles': require('eslint-plugin-jsx-a11y/lib/rules/no-redundant-roles'),
  'jsx-a11y/role-has-required-aria-props': require('eslint-plugin-jsx-a11y/lib/rules/role-has-required-aria-props'),
  'jsx-a11y/role-supports-aria-props': require('eslint-plugin-jsx-a11y/lib/rules/role-supports-aria-props'),
  'jsx-a11y/scope': require('eslint-plugin-jsx-a11y/lib/rules/scope'),
  'react-hooks/rules-of-hooks': require('eslint-plugin-react-hooks').rules[
    'rules-of-hooks'
  ],
  'react-hooks/exhaustive-deps': require('eslint-plugin-react-hooks').rules[
    'exhaustive-deps'
  ],

  '@typescript-eslint/no-angle-bracket-type-assertion': require('@typescript-eslint/eslint-plugin/dist/rules/no-angle-bracket-type-assertion')
    .default,
  '@typescript-eslint/no-array-constructor': require('@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor')
    .default,
  '@typescript-eslint/no-namespace': require('@typescript-eslint/eslint-plugin/dist/rules/no-namespace')
    .default,
  '@typescript-eslint/no-unused-vars': require('@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars')
    .default,
  '@typescript-eslint/no-useless-constructor': require('@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor')
    .default,

eslint-plugin-react-hooks

ESLint rules for React Hooks

MIT
Latest version published 1 year ago

Package Health Score

82 / 100
Full package analysis

Popular eslint-plugin-react-hooks functions