-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy patheslint.config.js
More file actions
33 lines (32 loc) 路 1 KB
/
Copy patheslint.config.js
File metadata and controls
33 lines (32 loc) 路 1 KB
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
30
31
32
33
import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import reactHooks from 'eslint-plugin-react-hooks';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
{
ignores: ['dist/**', 'demo/**', 'example/**', 'node_modules/**', '*.config.js', '*.config.ts'],
},
{
files: ['src/**/*.ts', 'src/**/*.tsx', 'test/**/*.ts', 'test/**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint,
'react-hooks': reactHooks,
prettier: prettierPlugin,
},
rules: {
...tseslint.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'prettier/prettier': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'react-hooks/exhaustive-deps': 'warn',
},
},
];