-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
32 lines (30 loc) · 891 Bytes
/
eslint.config.js
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
// @ts-check
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginReact from 'eslint-plugin-react';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';
import eslint from '@eslint/js';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginReact.configs.flat.recommended,
eslintPluginReact.configs.flat['jsx-runtime'],
{
files: ['src/**/*.jsx', 'src/**/*.tsx'],
plugins: {
'react-hooks': eslintPluginReactHooks
},
rules: {
...eslintPluginReactHooks.configs.recommended.rules
}
},
eslintConfigPrettier,
{
settings: {
react: {
version: 'detect'
}
},
ignores: ['dist', 'node_modules', '.yarn']
}
);