forked from tmedwards/sugarcube-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
157 lines (157 loc) · 9.88 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{
"parserOptions" : {
"ecmaVersion": 2021
},
"env" : {
"browser" : true,
"es2021" : true,
"jquery" : true
},
"globals": {
"DEBUG" : false,
"TWINE1" : false,
"LZString" : false,
"saveAs" : false
},
"rules" : {
"array-bracket-spacing" : ["error", "never"],
"arrow-body-style" : ["error", "as-needed"],
"arrow-parens" : ["error", "as-needed"],
"arrow-spacing" : ["error", { "before" : true, "after" : true }],
"brace-style" : ["error", "stroustrup", { "allowSingleLine" : true }],
"camelcase" : ["error", { "properties" : "always" }],
"class-methods-use-this" : "error",
"comma-dangle" : ["error", "never"],
"comma-style" : ["error", "last"],
"consistent-return" : "off",
"default-case" : "off",
"dot-location" : ["error", "property"],
"dot-notation" : "error",
"eol-last" : "error",
"eqeqeq" : ["error", "always", { "null" : "ignore" }],
"func-call-spacing" : ["error", "never"],
"func-name-matching" : ["error", "always"],
"generator-star-spacing" : ["error", "after"],
"id-length" : ["error", { "exceptions": ["O", "P", "T", "_", "a", "b", "i", "j", "m", "w", "x", "y"] }],
"indent" : ["error", "tab", { "ArrayExpression" : "first", "CallExpression" : { "arguments" : "first" }, "FunctionDeclaration" : { "body" : 1, "parameters" : "first" }, "FunctionExpression" : { "body" : 1, "parameters" : "first" }, "ObjectExpression" : "first", "SwitchCase" : 0, "VariableDeclarator" : 1 }],
"key-spacing" : ["error", { "align" : "colon", "beforeColon" : true, "afterColon" : true }],
"keyword-spacing" : "error",
"linebreak-style" : ["error", "unix"],
"lines-around-directive" : ["error", { "before" : "never", "after" : "always" }],
"max-depth" : ["error", { "max" : 6 }],
"max-len" : ["warn", { "code" : 120, "tabWidth" : 4, "comments" : 120, "ignoreTrailingComments" : true, "ignoreUrls" : true, "ignoreStrings" : true, "ignoreTemplateLiterals" : true, "ignoreRegExpLiterals" : true }],
"max-nested-callbacks" : ["error", { "max" : 5 }],
"max-params" : ["error", { "max" : 5 }],
"multiline-ternary" : "off",
"new-cap" : "error",
"new-parens" : "error",
"newline-after-var" : ["off", "always"],
"newline-before-return" : "off",
"newline-per-chained-call" : ["error", { "ignoreChainWithDepth" : 3 }],
"no-alert" : "error",
"no-array-constructor" : "error",
"no-case-declarations" : "error",
"no-compare-neg-zero" : "error",
"no-confusing-arrow" : ["off", { "allowParens" : true }],
"no-console" : ["off", { "allow" : ["assert", "debug", "error", "info", "warn"] }],
"no-const-assign" : "error",
"no-control-regex" : "error",
"no-debugger" : "error",
"no-div-regex" : "error",
"no-dupe-args" : "error",
"no-dupe-class-members" : "error",
"no-dupe-keys" : "error",
"no-duplicate-case" : "error",
"no-duplicate-imports" : "error",
"no-else-return" : "error",
"no-eval" : "error",
"no-extra-boolean-cast" : "error",
"no-extra-label" : "error",
"no-extra-parens" : ["warn", "all", { "conditionalAssign" : false }],
"no-extra-semi" : "error",
"no-fallthrough" : "error",
"no-floating-decimal" : "error",
"no-global-assign" : "error",
"no-implicit-coercion" : ["error", { "boolean" : false }],
"no-import-assign" : "error",
"no-iterator" : "error",
"no-labels" : ["error", { "allowLoop" : true, "allowSwitch" : true }],
"no-label-var" : "error",
"no-loop-func" : "error",
"no-mixed-spaces-and-tabs" : ["off", "smart-tabs"],
"no-multi-assign" : "off",
"no-multi-spaces" : "off",
"no-multiple-empty-lines" : ["error", { "max" : 2 }],
"no-nested-ternary" : "error",
"no-new" : "off",
"no-new-func" : "error",
"no-new-object" : "error",
"no-new-require" : "error",
"no-new-symbol" : "error",
"no-new-wrappers" : "error",
"no-param-reassign" : ["error", { "props" : true }],
"no-plusplus" : "off",
"no-regex-spaces" : "error",
"no-restricted-globals" : ["error", "isFinite", "isNaN"],
"no-restricted-syntax" : ["error", "WithStatement"],
"no-return-await" : "error",
"no-self-assign" : ["error", { "props": true }],
"no-sequences" : "error",
"no-template-curly-in-string" : "error",
"no-throw-literal" : "error",
"no-trailing-spaces" : ["error", { "skipBlankLines" : true }],
"no-undef" : "error",
"no-undef-init" : "error",
"no-underscore-dangle" : ["off", { "allowAfterSuper" : true, "allowAfterThis" : true }],
"no-unneeded-ternary" : "error",
"no-unsafe-finally" : "error",
"no-unsafe-negation" : "error",
"no-unused-vars" : ["error", { "vars" : "all", "args" : "after-used" }],
"no-use-before-define" : ["error", { "functions" : false, "classes" : true, "variables" : true }],
"no-useless-call" : "error",
"no-useless-computed-key" : "error",
"no-useless-concat" : "error",
"no-useless-constructor" : "error",
"no-useless-escape" : "error",
"no-useless-rename" : "error",
"no-useless-return" : "error",
"no-var" : "error",
"no-whitespace-before-property" : "error",
"nonblock-statement-body-position" : ["error", "beside"],
"object-curly-spacing" : ["error", "always"],
"object-shorthand" : ["error", "always", { "ignoreConstructors" : false }],
"one-var" : ["error", "never"],
"padded-blocks" : ["error", "never"],
"prefer-arrow-callback" : "error",
"prefer-const" : "error",
"prefer-destructuring" : ["off", { "array" : false, "object" : true }, { "enforceForRenamedProperties" : true }],
"prefer-numeric-literals" : "error",
"prefer-promise-reject-errors" : "error",
"prefer-rest-params" : "off",
"prefer-spread" : "warn",
"prefer-template" : "error",
"quote-props" : ["error", "as-needed"],
"quotes" : ["warn", "single", "avoid-escape"],
"radix" : ["error", "always"],
"require-await" : "error",
"semi" : ["error", "always"],
"sort-keys" : ["off", "asc", { "caseSensitive" : true, "natural" : true }],
"sort-imports" : "error",
"sort-vars" : ["off", { "ignoreCase" : false }],
"space-before-blocks" : ["error", "always"],
"space-before-function-paren" : ["error", { "anonymous" : "always", "asyncArrow" : "always", "named" : "never" }],
"space-in-parens" : ["error", "never"],
"space-infix-ops" : "error",
"space-unary-ops" : ["error", { "words" : true, "nonwords" : false }],
"spaced-comment" : ["error", "always", { "block" : { "exceptions" : ["*"], "markers": ["!"], "balanced" : true }, "line" : { "exceptions" : ["-"], "markers" : ["/"] } }],
"strict" : ["warn", "safe"],
"switch-colon-spacing" : "error",
"symbol-description" : "error",
"template-curly-spacing" : ["error", "never"],
"template-tag-spacing" : ["error", "never"],
"valid-typeof" : ["error", { "requireStringLiterals" : true }],
"wrap-iife" : ["error", "inside", { "functionPrototypeMethods" : true }],
"wrap-regex" : "off",
"yoda" : ["error", "never", { "exceptRange" : true }]
}
}