-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy patheslint.config.js
More file actions
45 lines (44 loc) · 1.28 KB
/
Copy patheslint.config.js
File metadata and controls
45 lines (44 loc) · 1.28 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
34
35
36
37
38
39
40
41
42
43
44
45
const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
const reactHooks = require('eslint-plugin-react-hooks');
const prettier = require('eslint-config-prettier');
module.exports = tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
plugins: {
'react-hooks': reactHooks,
},
rules: {
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-require-imports': 'off',
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/refs': 'warn',
'react-hooks/immutability': 'warn',
'react-hooks/purity': 'warn',
'react-hooks/set-state-in-effect': 'warn',
'no-useless-catch': 'warn',
'preserve-caught-error': 'warn',
'prefer-const': 'warn',
'no-undef': 'off',
'no-useless-escape': 'warn',
'no-useless-assignment': 'warn',
'no-constant-binary-expression': 'warn',
},
},
{
ignores: [
'node_modules/',
'dist/',
'.expo/',
'babel.config.js',
'jest.config.js',
'eslint.config.js',
],
},
);