-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.min.js
More file actions
29 lines (29 loc) · 1007 Bytes
/
eslint.config.min.js
File metadata and controls
29 lines (29 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
plugins: { react: reactPlugin, 'react-hooks': reactHooksPlugin },
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
},
{
files: ['**/__tests__/**', '*.config.*', '*.cjs'],
rules: { '@typescript-eslint/no-explicit-any': 'off' },
},
{ files: ['**/vite-plugin-*.ts'], rules: { '@typescript-eslint/no-this-alias': 'off' } },
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**', '*.cjs', '*.min.js', 'eslint.config.js'],
}
);