- Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy patheslint.js.react.jest.config.base.mjs
43 lines (42 loc) · 1.01 KB
/
eslint.js.react.jest.config.base.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
importeslintfrom'@eslint/js';
importreactfrom'eslint-plugin-react';
import{fixupPluginRules}from'@eslint/compat';
importeslintPluginReactHooksfrom'eslint-plugin-react-hooks';
importjestfrom'eslint-plugin-jest';
importeslintConfigPrettierfrom'eslint-config-prettier';
exportdefault[
{
files: ['test/**/*.js','test/**/*.jsx'],
...eslint.configs.recommended,
},
{
files: ['test/**/*.js','test/**/*.jsx'],
...react.configs.flat.recommended,
},
{
files: ['test/**/*.js','test/**/*.jsx'],
settings: {
react: {
version: 'detect',
},
},
},
{
files: ['test/**/*.js','test/**/*.jsx'],
plugins: {
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
},
},
{
files: ['test/**/*.js','test/**/*.jsx'],
...jest.configs['flat/recommended'],
},
{
files: ['test/**/*.js','test/**/*.jsx'],
...jest.configs['jest/style'],
},
{
files: ['test/**/*.js','test/**/*.jsx'],
...eslintConfigPrettier,
},
];