-
Notifications
You must be signed in to change notification settings - Fork 35
/
eslint.config.js
47 lines (45 loc) · 1.18 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import eslint from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import jest from 'eslint-plugin-jest';
import unusedImports from 'eslint-plugin-unused-imports';
export default [
// eslint.configs.recommended,
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
plugins: {
react, "react-hooks": reactHooks, jest, "unused-imports": unusedImports
},
languageOptions: {
parserOptions: {
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
},
},
rules: {
"no-unused-vars": "warn",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"unused-imports/no-unused-imports": "error",
"react/display-name": 0,
"react/jsx-key": "warn",
"react/no-unescaped-entities": "warn",
"react/jsx-no-duplicate-props": "warn",
"react/jsx-no-target-blank": "off",
"react/no-unknown-property": "warn",
"react/prop-types": 0,
"semi": "off",
},
settings: {
react: {
version: "detect",
},
},
},
];