-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
64 lines (64 loc) · 1.35 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
"plugin:@joao-cst/recommended",
"xo",
"plugin:import/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
{
files: ["**/*.spec.js", "**/*.spec.jsx", "jest-before-each-test.js"],
env: {
jest: true,
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
indent: ["error", 2],
"import/no-unresolved": 2,
semi: ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
"object-curly-spacing": [
"error",
"always",
{
arraysInObjects: false,
},
],
"import/extensions": ["error", "always"],
"unicorn/prevent-abbreviations": "off",
"unicorn/no-array-for-each": "off",
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
"new-cap": "off",
// No var shadowing
"no-shadow": "error",
"unicorn/no-array-reduce": "off",
"unicorn/prefer-optional-catch-binding": "off",
"capitalized-comments": "off",
camelcase: "off",
"unicorn/no-array-callback-reference": "off",
},
};