/
githubmirror
/
react-hook-form
Обзор
Документация
Войти
/
githubmirror
/
react-hook-form
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
eslint.config.mjs
104 строки
3 KB
Bill
🥗 migrate to playwright & fix delay error feature (#13589)
11 июл 2026, 12:39
Не верифицирован
11 июл 2026, 12:39
11bd6df
Код
Авторство
О чём код?
// @ts-check import pluginPlaywright from 'eslint-plugin-playwright'; import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import reactPlugin from 'eslint-plugin-react'; import reactHookPlugin from 'eslint-plugin-react-hooks'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; import tseslint from 'typescript-eslint'; export default tseslint.config( { ignores: [ 'app', 'examples', 'node_modules', 'dist', 'coverage', 'src/types/global.d.ts', '!.*.js', 'reports', 'scripts/README', ], }, reactPlugin.configs.flat.recommended, ...tseslint.configs.recommended, eslintPluginPrettierRecommended, { files: ['e2e/**/*.ts'], ...pluginPlaywright.configs['flat/recommended'], }, { plugins: { 'react-hooks': reactHookPlugin, 'simple-import-sort': simpleImportSort, }, languageOptions: { ecmaVersion: 2020, sourceType: 'module', parserOptions: { ecmaFeatures: { jsx: true, }, }, }, settings: { react: { pragma: 'React', version: 'detect', }, }, rules: { 'no-extra-boolean-cast': 'error', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-unused-vars': [ 'warn', { ignoreRestSiblings: true }, ], 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'error', 'react/display-name': 'warn', 'react/prop-types': 'off', 'no-console': ['error'], 'simple-import-sort/imports': [ 'error', { groups: [ // Side effect imports. ['^\\u0000'], // Packages. `react` related packages come first. ['^react', '^@?\\w'], // Parent imports. Put `..` last. ['^\\.\\.(?!/?$)', '^\\.\\./?$'], // Other relative imports. Put same-folder imports and `.` last. ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], ], }, ], 'simple-import-sort/exports': 'error', '@typescript-eslint/no-unused-expressions': 'off', '@typescript-eslint/no-unsafe-function-type': 'off', }, }, { files: ['scripts/**/*.cjs'], languageOptions: { sourceType: 'commonjs', }, rules: { '@typescript-eslint/no-require-imports': 'off', }, }, { files: ['*.test.ts', '*.test.tsx'], rules: { // Allow testing runtime errors to suppress TS errors '@typescript-eslint/ban-ts-comment': 'off', }, }, );