diff --git a/src/eslint/index.ts b/src/eslint/index.ts index 21e62d8..5ba2261 100644 --- a/src/eslint/index.ts +++ b/src/eslint/index.ts @@ -15,9 +15,6 @@ export const eslint = { 'no-empty': 'warn', 'no-extra-boolean-cast': 'warn', 'no-unused-vars': 0, - 'react/display-name': 0, - 'react/prop-types': 0, - 'react/react-in-jsx-scope': 0, 'unicorn/explicit-length-check': 'warn', 'unicorn/filename-case': 0, 'unicorn/no-array-for-each': 'warn', @@ -75,14 +72,22 @@ export const eslint = { '@typescript-eslint/no-unused-vars': 'warn', '@typescript-eslint/no-use-before-define': 'warn', '@typescript-eslint/no-empty-interface': 'warn', - 'react/jsx-sort-props': 'warn', - 'react/jsx-no-useless-fragment': 'off', 'array-callback-return': 'warn', 'guard-for-in': 'warn', 'import/newline-after-import': 'warn', 'import/no-duplicates': 'warn', + 'react/display-name': 0, + 'react/prop-types': 0, + 'react/react-in-jsx-scope': 0, + 'react/jsx-key': 'error', + 'react/jsx-no-useless-fragment': 'off', + 'react/jsx-sort-props': 'warn', + 'react/jsx-uses-react': 'error', + 'react/jsx-uses-vars': 'error', 'react/no-unescaped-entities': 'warn', 'react/no-unknown-property': 'warn', + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', // ~ merge from eslint-config-tenx 'unicorn/prefer-node-protocol': 0, 'unicorn/consistent-destructuring': 0, @@ -126,9 +131,6 @@ export const eslint = { allowEmptyReject: true, }, ], - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/jsx-key': 'error', ...eslintConfigPrettier.rules, }, overrides: [