forked from Accenture/sfmc-devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
110 lines (109 loc) · 3.34 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
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
{
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"ssjs",
"plugin:jsdoc/recommended",
"plugin:prettier/recommended",
"plugin:unicorn/recommended"
],
"plugins": ["prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"root": true,
"settings": {
"jsdoc": {
"mode": "jsdoc",
"preferredTypes": {
"array": "Array",
"array.<>": "[]",
"Array.<>": "[]",
"array<>": "[]",
"Array<>": "[]",
"Object": "object",
"object.<>": "Object.<>",
"object<>": "Object.<>",
"Object<>": "Object.<>",
"promise": "Promise",
"promise.<>": "Promise.<>",
"promise<>": "Promise.<>",
"Promise<>": "Promise.<>"
}
}
},
"rules": {
"logical-assignment-operators": ["error", "always"],
"unicorn/better-regex": "off",
"unicorn/catch-error-name": [
"error",
{
"name": "ex"
}
],
"unicorn/explicit-length-check": "off",
"unicorn/no-null": "off",
"unicorn/prefer-module": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-hex-escape": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/no-static-only-class": "off",
"unicorn/no-unused-properties": "warn",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-some": "off",
"unicorn/prefer-set-has": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-string-replace-all": "error",
"arrow-body-style": ["error", "as-needed"],
"curly": "error",
"no-console": "error",
"jsdoc/check-line-alignment": 2,
"jsdoc/require-jsdoc": [
"warn",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": false,
"FunctionExpression": true
}
}
],
"jsdoc/require-param-type": "error",
"jsdoc/tag-lines": ["warn", "any", { "startLines": 1 }],
"spaced-comment": ["warn", "always", { "block": { "exceptions": ["*"], "balanced": true } }]
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"no-var": "error",
"prefer-const": "error",
"prettier/prettier": "warn",
"prefer-arrow-callback": "warn"
}
},
{
"files": ["test/*.js"],
"extends": ["plugin:mocha/recommended"],
"plugins": ["mocha"],
"rules": {
"mocha/no-mocha-arrows": "off",
"mocha/no-pending-tests": "off"
}
}
]
}