-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
140 lines (140 loc) · 5.44 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"extends":"eslint:recommended",
"parserOptions": {
"ecmaVersion": 8
},
"env": {
"browser": true,
"es2021": true
},
"ignorePatterns":["Libs/"],
"rules": {
"for-direction": "off",
"no-await-in-loop": "warn",
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"dot-notation": "error",
"default-param-last":"error",
"curly": "warn",
"consistent-this": ["warn", "that"],
"capitalized-comments": [
"warn",
"always",
{
"ignoreConsecutiveComments": true
}
],
"no-extra-bind": "error",
"array-bracket-newline" : [
"warn",
{
"multiline": true,
"minItems": 3
}
],
"array-bracket-spacing": ["warn", "never"],
"array-element-newline": ["warn", "always"],
"arrow-parens": ["warn", "as-needed"],
"arrow-spacing": ["warn", { "before": true, "after": true }],
"block-spacing": "warn",
"brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["warn", "never"],
"comma-spacing": ["warn", { "before": false, "after": true }],
"comma-style": ["warn", "last"],
"computed-property-spacing": ["warn", "never"],
"dot-location": ["warn", "property"],
"func-call-spacing": ["warn", "never"],
"function-call-argument-newline": ["warn", "consistent"],
"generator-star-spacing": ["warn", "after"],
"implicit-arrow-linebreak": ["warn", "beside"],
"indent": ["error", 4],
"jsx-quotes": ["warn", "prefer-double"],
"key-spacing": ["warn", { "beforeColon": false, "afterColon": true,"align": "colon" }],
"keyword-spacing": ["warn", { "before": true, "after": true }],
"linebreak-style": ["warn"],
"lines-around-comment": ["warn", {
"beforeBlockComment": true,
"beforeLineComment": true,
"allowBlockStart": true,
"allowClassStart": true
}],
"lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
"max-len": ["warn", {
"code": 120,
"tabWidth": 4,
"ignoreUrls": true,
"ignoreStrings": true,
"comments": 140
}],
"max-statements-per-line": ["warn", { "max": 1 }],
"multiline-ternary": ["warn", "never"],
"new-parens": "warn",
"newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 2 }],
"no-extra-parens": ["warn", "all", {
"nestedBinaryExpressions": true,
"enforceForArrowConditionals": true
}],
"no-mixed-spaces-and-tabs": "warn",
"no-multi-spaces": "warn",
"no-multiple-empty-lines": ["warn", { "max": 2 }],
"no-trailing-spaces": "warn",
"no-whitespace-before-property": "warn",
"object-curly-newline": ["warn", { "multiline": true, "minProperties": 3 }],
"object-curly-spacing": ["warn", "never"],
"object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
"operator-linebreak": ["warn", "after"],
"rest-spread-spacing": ["warn", "never"],
"semi": ["error", "always"],
"semi-spacing": ["warn", { "before": false, "after": false}],
"semi-style": ["error", "last"],
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", "never"],
"space-in-parens": ["warn", "never"],
"space-infix-ops": "warn",
"space-unary-ops": ["warn", { "words": true, "nonwords": false }],
"switch-colon-spacing": "warn",
"template-curly-spacing": ["warn", "never"],
"template-tag-spacing": ["warn", "always"],
"wrap-iife": ["warn", "inside"],
"yield-star-spacing": ["warn", "after"]
},
"overrides": [
{
"files": ["Web/**/*"],
"env": {
"jquery": true
}
},
{
// Override for the folders which contains script runned with nodejs.
"files": ["Server/**/*","Scripts/**/*"],
"parserOptions": {
"ecmaVersion": 11
},
"env": {
"node": true
}
},
{
"files": ["*.html"],
"plugins": ["@html-eslint"],
"parser": "@html-eslint/parser",
"rules": {
"@html-eslint/require-doctype": "warn",
"@html-eslint/no-duplicate-id": "error",
"@html-eslint/require-li-container": "error",
"@html-eslint/no-obsolete-tags": "error",
"@html-eslint/require-closing-tags": "warn",
"@html-eslint/no-duplicate-attrs": "error",
"@html-eslint/require-title": "error",
"@html-eslint/no-multiple-h1": "error",
"@html-eslint/require-img-alt": "error",
"@html-eslint/no-extra-spacing-attrs": "warn",
"@html-eslint/indent": "warn",
"@html-eslint/quotes": ["warn","double"],
"@html-eslint/no-multiple-empty-lines": "warn",
"capitalized-comments": "off"
}
}
]
}