-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
46 lines (44 loc) · 1.44 KB
/
eslint.config.mjs
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
34
35
36
37
38
39
40
41
42
43
44
45
46
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import vitest from 'eslint-plugin-vitest';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
prettierConfig,
{
plugins: {
react,
'react-hooks': reactHooks,
vitest,
prettier,
},
languageOptions: {
parserOptions: {
project: ['./packages/*/tsconfig.json'],
},
},
rules: {
...reactHooks.configs.recommended.rules,
...vitest.configs.recommended.rules,
'no-shadow': 'off',
// '@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-shadow': 'warn',
'consistent-return': 'error',
// 'react-refresh/only-export-components': 'error',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
// 'no-use-before-define': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/unbound-method': 'warn',
},
},
);