-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
32 lines (31 loc) · 1.12 KB
/
eslint.config.js
File metadata and controls
32 lines (31 loc) · 1.12 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
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import reactHooksPlugin from 'eslint-plugin-react-hooks'
import prettierPlugin from 'eslint-plugin-prettier'
export default tseslint.config(
{
ignores: ['dist/**', 'docs/**', 'node_modules/**', '.eslintrc.cjs']
},
js.configs.recommended,
tseslint.configs.recommended,
reactHooksPlugin.configs.flat.recommended,
{
files: ['lib/**/*.{ts,tsx}', 'src/**/*.{ts,tsx}'],
plugins: {
prettier: prettierPlugin
},
rules: {
'no-control-regex': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
}
}
)