This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
85 lines (85 loc) · 1.98 KB
/
.eslintrc.json
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"settings": {
"import/resolver": {
// https://stackoverflow.com/questions/67835072/vue-3-on-vite-js-with-eslint-unable-to-resolve-path-to-module-eslintimport-no
"typescript": {}
}
},
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"globals": {
// https://eslint.org/docs/user-guide/configuring/language-options#using-configuration-files-1
"React": "readonly"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"airbnb"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"semi": ["error", "never"],
"react/prop-types": "off",
"no-unused-vars": "off",
"no-plusplus": "off",
"import/prefer-default-export": "off",
"react/function-component-definition": "off",
"react/jsx-one-expression-per-line": [
"off"
],
"no-underscore-dangle": "off",
"no-useless-constructor": "off",
"no-empty-function": "off",
"no-use-before-define": "off",
"no-alert": "off",
"react/no-unescaped-entities": "off",
"react/jsx-no-bind": [
"error",
{
"allowArrowFunctions": true,
"allowFunctions": true
}
],
// @typescript-eslint é mais apropriado pra analisar "no-unused-vars"
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-empty-function": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"react/react-in-jsx-scope": "off",
"import/extensions": [
"error",
{
"ts": "never",
"tsx": "never"
}
],
"react/jsx-filename-extension": [
1,
{
"extensions": [
".tsx"
]
}
]
}
}