-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
executable file
·113 lines (113 loc) · 2.73 KB
/
.eslintrc
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"env": {
"browser": true
},
"parser": "babel-eslint",
"plugins": [
"react",
"prettier",
"react-hooks"
],
"rules": {
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "always",
"spaceBeforeFunctionParen": true,
"jsxMaxPropsPerLine": 1,
"maxLen": 500
}
],
"semi": [
2,
"never"
],
"arrow-parens": [
"error",
"always"
],
"object-curly-newline": [
"error",
{
"multiline": true
}
],
"import/extensions": 0,
"no-console": 0,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"react/jsx-filename-extension": 0,
"linebreak-style": 0,
"template-curly-spacing": "off",
"indent": "off",
"jsx-quotes": [
"error",
"prefer-single"
], // comillas simples
"max-len": [
"error",
{
"code": 500,
"tabWidth": 2
}
], // máximo length por fila
"no-empty": "error", // no lineas vacías
"no-multiple-empty-lines": [
2,
{
"max": 1
}
], // máximo 1 fila vacía
"react/prop-types": 0, // los proptypes no son obligatorios, pero es buena práctica
"react/react-in-jsx-scope": "off", // no es necesario declarar react en un archivo
"lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
], // nunca se deja espacio despues de las clases
"space-before-function-paren": [
"error",
{
// espacios despues del nombre de la función
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/jsx-one-expression-per-line": 0, // inhabilita sola una expreción por linea
"arrow-body-style": 0,
"react/no-array-index-key": 0,
"quote-props": [
"error",
"as-needed"
],
"no-plusplus": 0,
"react/no-danger": 0,
"no-underscore-dangle": 0,
"camelcase": 0,
"jsx-a11y/label-has-associated-control": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"comma-dangle": "off",
"react/button-has-type": 0,
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
}
}