@eslinted/defaults 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/.github/workflows/RELEASE.yml +36 -0
  2. package/.github/workflows/rc.yml +36 -0
  3. package/.markdownlint.jsonc +122 -0
  4. package/LICENSE +21 -0
  5. package/README.md +5 -0
  6. package/SECURITY.md +9 -0
  7. package/dist/_strings/id.d.ts +2 -0
  8. package/dist/_strings/id.d.ts.map +1 -0
  9. package/dist/_strings/id.js +2 -0
  10. package/dist/_strings/id.js.map +1 -0
  11. package/dist/_strings/index.d.ts +4 -0
  12. package/dist/_strings/index.d.ts.map +1 -0
  13. package/dist/_strings/index.js +4 -0
  14. package/dist/_strings/index.js.map +1 -0
  15. package/dist/_strings/option.d.ts +2 -0
  16. package/dist/_strings/option.d.ts.map +1 -0
  17. package/dist/_strings/option.js +2 -0
  18. package/dist/_strings/option.js.map +1 -0
  19. package/dist/_strings/state.d.ts +2 -0
  20. package/dist/_strings/state.d.ts.map +1 -0
  21. package/dist/_strings/state.js +2 -0
  22. package/dist/_strings/state.js.map +1 -0
  23. package/dist/_strings/state.spec.d.ts +2 -0
  24. package/dist/_strings/state.spec.d.ts.map +1 -0
  25. package/dist/_strings/state.spec.js +31 -0
  26. package/dist/_strings/state.spec.js.map +1 -0
  27. package/dist/files/index.d.ts +12 -0
  28. package/dist/files/index.d.ts.map +1 -0
  29. package/dist/files/index.js +20 -0
  30. package/dist/files/index.js.map +1 -0
  31. package/dist/files/scopes/html.d.ts +3 -0
  32. package/dist/files/scopes/html.d.ts.map +1 -0
  33. package/dist/files/scopes/html.js +2 -0
  34. package/dist/files/scopes/html.js.map +1 -0
  35. package/dist/files/scopes/js.d.ts +3 -0
  36. package/dist/files/scopes/js.d.ts.map +1 -0
  37. package/dist/files/scopes/js.js +5 -0
  38. package/dist/files/scopes/js.js.map +1 -0
  39. package/dist/files/scopes/json.d.ts +3 -0
  40. package/dist/files/scopes/json.d.ts.map +1 -0
  41. package/dist/files/scopes/json.js +2 -0
  42. package/dist/files/scopes/json.js.map +1 -0
  43. package/dist/files/scopes/jsonc.d.ts +3 -0
  44. package/dist/files/scopes/jsonc.d.ts.map +1 -0
  45. package/dist/files/scopes/jsonc.js +6 -0
  46. package/dist/files/scopes/jsonc.js.map +1 -0
  47. package/dist/files/scopes/mocha.d.ts +3 -0
  48. package/dist/files/scopes/mocha.d.ts.map +1 -0
  49. package/dist/files/scopes/mocha.js +5 -0
  50. package/dist/files/scopes/mocha.js.map +1 -0
  51. package/dist/files/scopes/svelte.d.ts +3 -0
  52. package/dist/files/scopes/svelte.d.ts.map +1 -0
  53. package/dist/files/scopes/svelte.js +2 -0
  54. package/dist/files/scopes/svelte.js.map +1 -0
  55. package/dist/files/scopes/ts.d.ts +3 -0
  56. package/dist/files/scopes/ts.d.ts.map +1 -0
  57. package/dist/files/scopes/ts.js +2 -0
  58. package/dist/files/scopes/ts.js.map +1 -0
  59. package/dist/files/scopes/yml.d.ts +3 -0
  60. package/dist/files/scopes/yml.d.ts.map +1 -0
  61. package/dist/files/scopes/yml.js +2 -0
  62. package/dist/files/scopes/yml.js.map +1 -0
  63. package/dist/ignores/index.d.ts +12 -0
  64. package/dist/ignores/index.d.ts.map +1 -0
  65. package/dist/ignores/index.js +29 -0
  66. package/dist/ignores/index.js.map +1 -0
  67. package/dist/ignores/scopes/html.d.ts +3 -0
  68. package/dist/ignores/scopes/html.d.ts.map +1 -0
  69. package/dist/ignores/scopes/html.js +2 -0
  70. package/dist/ignores/scopes/html.js.map +1 -0
  71. package/dist/ignores/scopes/js.d.ts +3 -0
  72. package/dist/ignores/scopes/js.d.ts.map +1 -0
  73. package/dist/ignores/scopes/js.js +2 -0
  74. package/dist/ignores/scopes/js.js.map +1 -0
  75. package/dist/ignores/scopes/json.d.ts +3 -0
  76. package/dist/ignores/scopes/json.d.ts.map +1 -0
  77. package/dist/ignores/scopes/json.js +2 -0
  78. package/dist/ignores/scopes/json.js.map +1 -0
  79. package/dist/ignores/scopes/jsonc.d.ts +3 -0
  80. package/dist/ignores/scopes/jsonc.d.ts.map +1 -0
  81. package/dist/ignores/scopes/jsonc.js +2 -0
  82. package/dist/ignores/scopes/jsonc.js.map +1 -0
  83. package/dist/ignores/scopes/mocha.d.ts +3 -0
  84. package/dist/ignores/scopes/mocha.d.ts.map +1 -0
  85. package/dist/ignores/scopes/mocha.js +2 -0
  86. package/dist/ignores/scopes/mocha.js.map +1 -0
  87. package/dist/ignores/scopes/svelte.d.ts +3 -0
  88. package/dist/ignores/scopes/svelte.d.ts.map +1 -0
  89. package/dist/ignores/scopes/svelte.js +2 -0
  90. package/dist/ignores/scopes/svelte.js.map +1 -0
  91. package/dist/ignores/scopes/ts.d.ts +3 -0
  92. package/dist/ignores/scopes/ts.d.ts.map +1 -0
  93. package/dist/ignores/scopes/ts.js +2 -0
  94. package/dist/ignores/scopes/ts.js.map +1 -0
  95. package/dist/ignores/scopes/yml.d.ts +3 -0
  96. package/dist/ignores/scopes/yml.d.ts.map +1 -0
  97. package/dist/ignores/scopes/yml.js +2 -0
  98. package/dist/ignores/scopes/yml.js.map +1 -0
  99. package/dist/index.d.ts +6 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +5 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/rules/html/enable.d.ts +62 -0
  104. package/dist/rules/html/enable.d.ts.map +1 -0
  105. package/dist/rules/html/enable.js +93 -0
  106. package/dist/rules/html/enable.js.map +1 -0
  107. package/dist/rules/html/index.d.ts +63 -0
  108. package/dist/rules/html/index.d.ts.map +1 -0
  109. package/dist/rules/html/index.js +3 -0
  110. package/dist/rules/html/index.js.map +1 -0
  111. package/dist/rules/index.d.ts +1521 -0
  112. package/dist/rules/index.d.ts.map +1 -0
  113. package/dist/rules/index.js +19 -0
  114. package/dist/rules/index.js.map +1 -0
  115. package/dist/rules/js/enable-stylistic.d.ts +420 -0
  116. package/dist/rules/js/enable-stylistic.d.ts.map +1 -0
  117. package/dist/rules/js/enable-stylistic.js +641 -0
  118. package/dist/rules/js/enable-stylistic.js.map +1 -0
  119. package/dist/rules/js/enable.d.ts +347 -0
  120. package/dist/rules/js/enable.d.ts.map +1 -0
  121. package/dist/rules/js/enable.js +519 -0
  122. package/dist/rules/js/enable.js.map +1 -0
  123. package/dist/rules/js/index.d.ts +766 -0
  124. package/dist/rules/js/index.d.ts.map +1 -0
  125. package/dist/rules/js/index.js +7 -0
  126. package/dist/rules/js/index.js.map +1 -0
  127. package/dist/rules/json/enable-ext.d.ts +49 -0
  128. package/dist/rules/json/enable-ext.d.ts.map +1 -0
  129. package/dist/rules/json/enable-ext.js +80 -0
  130. package/dist/rules/json/enable-ext.js.map +1 -0
  131. package/dist/rules/json/enable.d.ts +26 -0
  132. package/dist/rules/json/enable.d.ts.map +1 -0
  133. package/dist/rules/json/enable.js +30 -0
  134. package/dist/rules/json/enable.js.map +1 -0
  135. package/dist/rules/json/index.d.ts +74 -0
  136. package/dist/rules/json/index.d.ts.map +1 -0
  137. package/dist/rules/json/index.js +7 -0
  138. package/dist/rules/json/index.js.map +1 -0
  139. package/dist/rules/jsonc/index.d.ts +6 -0
  140. package/dist/rules/jsonc/index.d.ts.map +1 -0
  141. package/dist/rules/jsonc/index.js +3 -0
  142. package/dist/rules/jsonc/index.js.map +1 -0
  143. package/dist/rules/jsonc/override.d.ts +5 -0
  144. package/dist/rules/jsonc/override.d.ts.map +1 -0
  145. package/dist/rules/jsonc/override.js +12 -0
  146. package/dist/rules/jsonc/override.js.map +1 -0
  147. package/dist/rules/mocha/disable.d.ts +4 -0
  148. package/dist/rules/mocha/disable.d.ts.map +1 -0
  149. package/dist/rules/mocha/disable.js +8 -0
  150. package/dist/rules/mocha/disable.js.map +1 -0
  151. package/dist/rules/mocha/enable.d.ts +34 -0
  152. package/dist/rules/mocha/enable.d.ts.map +1 -0
  153. package/dist/rules/mocha/enable.js +47 -0
  154. package/dist/rules/mocha/enable.js.map +1 -0
  155. package/dist/rules/mocha/index.d.ts +37 -0
  156. package/dist/rules/mocha/index.d.ts.map +1 -0
  157. package/dist/rules/mocha/index.js +7 -0
  158. package/dist/rules/mocha/index.js.map +1 -0
  159. package/dist/rules/svelte/disable-ext.d.ts +5 -0
  160. package/dist/rules/svelte/disable-ext.d.ts.map +1 -0
  161. package/dist/rules/svelte/disable-ext.js +9 -0
  162. package/dist/rules/svelte/disable-ext.js.map +1 -0
  163. package/dist/rules/svelte/disable-ts.d.ts +5 -0
  164. package/dist/rules/svelte/disable-ts.d.ts.map +1 -0
  165. package/dist/rules/svelte/disable-ts.js +9 -0
  166. package/dist/rules/svelte/disable-ts.js.map +1 -0
  167. package/dist/rules/svelte/disable.d.ts +5 -0
  168. package/dist/rules/svelte/disable.d.ts.map +1 -0
  169. package/dist/rules/svelte/disable.js +9 -0
  170. package/dist/rules/svelte/disable.js.map +1 -0
  171. package/dist/rules/svelte/enable-ext.d.ts +7 -0
  172. package/dist/rules/svelte/enable-ext.d.ts.map +1 -0
  173. package/dist/rules/svelte/enable-ext.js +15 -0
  174. package/dist/rules/svelte/enable-ext.js.map +1 -0
  175. package/dist/rules/svelte/enable.d.ts +126 -0
  176. package/dist/rules/svelte/enable.d.ts.map +1 -0
  177. package/dist/rules/svelte/enable.js +193 -0
  178. package/dist/rules/svelte/enable.js.map +1 -0
  179. package/dist/rules/svelte/index.d.ts +141 -0
  180. package/dist/rules/svelte/index.d.ts.map +1 -0
  181. package/dist/rules/svelte/index.js +13 -0
  182. package/dist/rules/svelte/index.js.map +1 -0
  183. package/dist/rules/ts/disable-ext.d.ts +27 -0
  184. package/dist/rules/ts/disable-ext.d.ts.map +1 -0
  185. package/dist/rules/ts/disable-ext.js +31 -0
  186. package/dist/rules/ts/disable-ext.js.map +1 -0
  187. package/dist/rules/ts/disable.d.ts +17 -0
  188. package/dist/rules/ts/disable.d.ts.map +1 -0
  189. package/dist/rules/ts/disable.js +21 -0
  190. package/dist/rules/ts/disable.js.map +1 -0
  191. package/dist/rules/ts/enable-ext.d.ts +71 -0
  192. package/dist/rules/ts/enable-ext.d.ts.map +1 -0
  193. package/dist/rules/ts/enable-ext.js +108 -0
  194. package/dist/rules/ts/enable-ext.js.map +1 -0
  195. package/dist/rules/ts/enable.d.ts +264 -0
  196. package/dist/rules/ts/enable.d.ts.map +1 -0
  197. package/dist/rules/ts/enable.js +520 -0
  198. package/dist/rules/ts/enable.js.map +1 -0
  199. package/dist/rules/ts/index.d.ts +374 -0
  200. package/dist/rules/ts/index.d.ts.map +1 -0
  201. package/dist/rules/ts/index.js +11 -0
  202. package/dist/rules/ts/index.js.map +1 -0
  203. package/dist/rules/yml/enable-ext.d.ts +36 -0
  204. package/dist/rules/yml/enable-ext.d.ts.map +1 -0
  205. package/dist/rules/yml/enable-ext.js +66 -0
  206. package/dist/rules/yml/enable-ext.js.map +1 -0
  207. package/dist/rules/yml/enable.d.ts +38 -0
  208. package/dist/rules/yml/enable.d.ts.map +1 -0
  209. package/dist/rules/yml/enable.js +68 -0
  210. package/dist/rules/yml/enable.js.map +1 -0
  211. package/dist/rules/yml/index.d.ts +73 -0
  212. package/dist/rules/yml/index.d.ts.map +1 -0
  213. package/dist/rules/yml/index.js +7 -0
  214. package/dist/rules/yml/index.js.map +1 -0
  215. package/dist/settings.d.ts +7 -0
  216. package/dist/settings.d.ts.map +1 -0
  217. package/dist/settings.js +7 -0
  218. package/dist/settings.js.map +1 -0
  219. package/eslint.config.js +3 -0
  220. package/package.json +94 -0
  221. package/src/_strings/id.ts +8 -0
  222. package/src/_strings/index.ts +3 -0
  223. package/src/_strings/option.ts +29 -0
  224. package/src/_strings/state.spec.ts +31 -0
  225. package/src/_strings/state.ts +4 -0
  226. package/src/files/index.ts +20 -0
  227. package/src/files/scopes/html.ts +1 -0
  228. package/src/files/scopes/js.ts +4 -0
  229. package/src/files/scopes/json.ts +1 -0
  230. package/src/files/scopes/jsonc.ts +5 -0
  231. package/src/files/scopes/mocha.ts +4 -0
  232. package/src/files/scopes/svelte.ts +1 -0
  233. package/src/files/scopes/ts.ts +1 -0
  234. package/src/files/scopes/yml.ts +1 -0
  235. package/src/ignores/index.ts +31 -0
  236. package/src/ignores/scopes/html.ts +1 -0
  237. package/src/ignores/scopes/js.ts +1 -0
  238. package/src/ignores/scopes/json.ts +1 -0
  239. package/src/ignores/scopes/jsonc.ts +1 -0
  240. package/src/ignores/scopes/mocha.ts +1 -0
  241. package/src/ignores/scopes/svelte.ts +1 -0
  242. package/src/ignores/scopes/ts.ts +1 -0
  243. package/src/ignores/scopes/yml.ts +1 -0
  244. package/src/index.ts +5 -0
  245. package/src/rules/html/enable.ts +117 -0
  246. package/src/rules/html/index.ts +3 -0
  247. package/src/rules/index.ts +19 -0
  248. package/src/rules/js/enable-stylistic.ts +664 -0
  249. package/src/rules/js/enable.ts +547 -0
  250. package/src/rules/js/index.ts +7 -0
  251. package/src/rules/json/enable-ext.ts +91 -0
  252. package/src/rules/json/enable.ts +35 -0
  253. package/src/rules/json/index.ts +7 -0
  254. package/src/rules/jsonc/index.ts +3 -0
  255. package/src/rules/jsonc/override.ts +18 -0
  256. package/src/rules/mocha/disable.ts +11 -0
  257. package/src/rules/mocha/enable.ts +53 -0
  258. package/src/rules/mocha/index.ts +7 -0
  259. package/src/rules/svelte/disable-ext.ts +13 -0
  260. package/src/rules/svelte/disable-ts.ts +12 -0
  261. package/src/rules/svelte/disable.ts +17 -0
  262. package/src/rules/svelte/enable-ext.ts +22 -0
  263. package/src/rules/svelte/enable.ts +232 -0
  264. package/src/rules/svelte/index.ts +13 -0
  265. package/src/rules/ts/disable-ext.ts +35 -0
  266. package/src/rules/ts/disable.ts +25 -0
  267. package/src/rules/ts/enable-ext.ts +117 -0
  268. package/src/rules/ts/enable.ts +569 -0
  269. package/src/rules/ts/index.ts +11 -0
  270. package/src/rules/yml/enable-ext.ts +73 -0
  271. package/src/rules/yml/enable.ts +76 -0
  272. package/src/rules/yml/index.ts +7 -0
  273. package/src/settings.ts +6 -0
  274. package/tsconfig.json +163 -0
@@ -0,0 +1,547 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ never,
6
+ always,
7
+ as_needed,
8
+ consecutive,
9
+ allow,
10
+ all,
11
+ multi,
12
+ both,
13
+ } from "../../_strings";
14
+
15
+ export const Enable = [
16
+ ID.Enable,
17
+ {
18
+ // #region PROBLEMS
19
+ // DOC: https://eslint.org/docs/latest/rules/#possible-problems
20
+ "array-callback-return": [
21
+ ERROR,
22
+ {
23
+ allowImplicit: false,
24
+ checkForEach: true,
25
+ allowVoid: true,
26
+ },
27
+ ],
28
+ "constructor-super": ERROR, /* tsc */
29
+ "for-direction": ERROR,
30
+ "getter-return": [
31
+ ERROR,
32
+ {
33
+ allowImplicit: false,
34
+ },
35
+ ], /* tsc */
36
+ "no-async-promise-executor": ERROR,
37
+ "no-await-in-loop": ERROR,
38
+ "no-class-assign": ERROR,
39
+ "no-compare-neg-zero": ERROR,
40
+ "no-cond-assign": [
41
+ ERROR,
42
+ always,
43
+ ],
44
+ "no-const-assign": ERROR, /* tsc */
45
+ "no-constant-binary-expression": ERROR,
46
+ "no-constant-condition": [
47
+ ERROR,
48
+ {
49
+ checkLoops: true,
50
+ },
51
+ ] /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */,
52
+ "no-constructor-return": ERROR,
53
+ "no-control-regex": ERROR,
54
+ "no-debugger": ERROR,
55
+ "no-dupe-args": ERROR, /* tsc */
56
+ "no-dupe-class-members": ERROR, /* tsc -- TSLint:off: tsc */
57
+ "no-dupe-else-if": ERROR,
58
+ "no-dupe-keys": ERROR, /* tsc */
59
+ "no-duplicate-case": ERROR,
60
+ "no-duplicate-imports": OFF /* BUG: breaks separation of TS type-only imports from value imports */,
61
+ "no-empty-character-class": ERROR,
62
+ "no-empty-pattern": [
63
+ ERROR,
64
+ {
65
+ allowObjectPatternsAsParameters: false,
66
+ },
67
+ ],
68
+ "no-ex-assign": ERROR,
69
+ "no-fallthrough": [
70
+ ERROR,
71
+ {
72
+ allowEmptyCase: true,
73
+ reportUnusedFallthroughComment: true,
74
+ },
75
+ ],
76
+ "no-func-assign": ERROR, /* tsc */
77
+ "no-import-assign": ERROR, /* tsc (except Object.assign()) */
78
+ "no-inner-declarations": [
79
+ ERROR,
80
+ both,
81
+ {
82
+ blockScopedFunctions: allow,
83
+ },
84
+ ],
85
+ "no-invalid-regexp": [
86
+ ERROR,
87
+ {
88
+ allowConstructorFlags: [],
89
+ },
90
+ ],
91
+ "no-irregular-whitespace": [
92
+ ERROR,
93
+ {
94
+ skipStrings: true,
95
+ skipComments: true,
96
+ skipRegExps: true,
97
+ skipTemplates: true,
98
+ skipJSXText: true,
99
+ },
100
+ ],
101
+ "no-loss-of-precision": ERROR /* TSLint */,
102
+ "no-misleading-character-class": ERROR,
103
+ "no-new-native-nonconstructor": ERROR,
104
+ "no-obj-calls": ERROR, /* tsc */
105
+ "no-promise-executor-return": [
106
+ ERROR,
107
+ {
108
+ allowVoid: true,
109
+ },
110
+ ],
111
+ "no-prototype-builtins": ERROR,
112
+ "no-self-assign": [
113
+ ERROR,
114
+ {
115
+ props: true,
116
+ },
117
+ ],
118
+ "no-self-compare": ERROR,
119
+ "no-setter-return": ERROR, /* tsc */
120
+ "no-sparse-arrays": ERROR,
121
+ "no-template-curly-in-string": ERROR,
122
+ "no-this-before-super": ERROR, /* tsc */
123
+ "no-undef": ERROR, /* tsc */
124
+ "no-unexpected-multiline": ERROR,
125
+ "no-unmodified-loop-condition": ERROR,
126
+ "no-unreachable": ERROR, /* tsc */
127
+ "no-unreachable-loop": [
128
+ ERROR,
129
+ {
130
+ ignore: [] /* WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement */,
131
+ },
132
+ ],
133
+ "no-unsafe-finally": ERROR,
134
+ "no-unsafe-negation": [
135
+ ERROR,
136
+ {
137
+ enforceForOrderingRelations: true,
138
+ },
139
+ ], /* tsc */
140
+ "no-unsafe-optional-chaining": [
141
+ ERROR,
142
+ {
143
+ disallowArithmeticOperators: true,
144
+ },
145
+ ],
146
+ "no-unused-private-class-members": ERROR,
147
+ "no-unused-vars": [
148
+ ERROR,
149
+ {
150
+ vars: all,
151
+ args: all,
152
+ caughtErrors: all,
153
+ ignoreRestSiblings: false,
154
+ ignoreClassWithStaticInitBlock: false,
155
+ reportUsedIgnorePattern: true,
156
+ },
157
+ ] /* TSLint */,
158
+ "no-use-before-define": [
159
+ ERROR,
160
+ {
161
+ functions: true,
162
+ classes: true,
163
+ variables: true,
164
+ allowNamedExports: false,
165
+ },
166
+ ] /* TSLint */,
167
+ "no-useless-assignment": ERROR,
168
+ "no-useless-backreference": ERROR,
169
+ "require-atomic-updates": [
170
+ ERROR,
171
+ {
172
+ allowProperties: false,
173
+ },
174
+ ],
175
+ "use-isnan": [
176
+ ERROR,
177
+ {
178
+ enforceForSwitchCase: true,
179
+ enforceForIndexOf: true,
180
+ },
181
+ ],
182
+ "valid-typeof": [
183
+ ERROR,
184
+ {
185
+ requireStringLiterals: true,
186
+ },
187
+ ],
188
+
189
+ // #endregion PROBLEMS
190
+
191
+ // #region SUGGESTIONS
192
+ // [ https://eslint.org/docs/latest/rules/#suggestions ]
193
+ "accessor-pairs": [
194
+ ERROR,
195
+ {
196
+ setWithoutGet: true,
197
+ getWithoutSet: false,
198
+ enforceForClassMembers: true,
199
+ },
200
+ ],
201
+ "arrow-body-style": [
202
+ ERROR,
203
+ as_needed,
204
+ {
205
+ requireReturnForObjectLiteral: true,
206
+ },
207
+ ],
208
+ "block-scoped-var": ERROR,
209
+ camelcase: OFF /* preference */,
210
+ "capitalized-comments": OFF /* preference */,
211
+ "class-methods-use-this": OFF, /* preference -- TSLint */
212
+ complexity: OFF /* preference */,
213
+ "consistent-return": [
214
+ ERROR,
215
+ {
216
+ treatUndefinedAsUnspecified: false,
217
+ },
218
+ ] /* tsc -- TSLint:off: tsconfig: noImplicitReturns */,
219
+ "consistent-this": ERROR,
220
+ curly: [
221
+ ERROR,
222
+ multi,
223
+ ],
224
+ "default-case": OFF, /* preference: don't care */
225
+ "default-case-last": ERROR,
226
+ "default-param-last": ERROR /* TSLint */,
227
+ "dot-notation": [
228
+ ERROR,
229
+ {
230
+ allowKeywords: true,
231
+ },
232
+ ] /* TSLint */,
233
+ eqeqeq: [
234
+ ERROR,
235
+ always,
236
+ ],
237
+ "func-name-matching": OFF /* preference */,
238
+ "func-names": OFF /* preference */,
239
+ "func-style": OFF /* preference */,
240
+ "grouped-accessor-pairs": OFF /* preference -- BUG: requires adjacency, not as described in documentation */,
241
+ "guard-for-in": OFF, /* preference - not helpful because using for-in on non-literal objects is bad practice and this rule doesn't guard against that anyway, while adding a pointless check to known object literals */
242
+ "id-denylist": OFF /* preference */,
243
+ "id-length": OFF /* preference */,
244
+ "id-match": OFF /* preference */,
245
+ "init-declarations": [
246
+ ERROR,
247
+ always,
248
+ ] /* TSLint */,
249
+ "logical-assignment-operators": [
250
+ ERROR,
251
+ always,
252
+ {
253
+ enforceForIfStatements: true,
254
+ },
255
+ ],
256
+ "max-classes-per-file": OFF /* preference */,
257
+ "max-depth": OFF /* preference */,
258
+ "max-lines": OFF /* preference */,
259
+ "max-lines-per-function": OFF /* preference */,
260
+ "max-nested-callbacks": OFF /* preference */,
261
+ "max-params": OFF, /* preference -- TSLint:off: preference */
262
+ "max-statements": OFF /* preference */,
263
+ "multiline-comment-style": OFF /* preference */,
264
+ "new-cap": OFF, /* preference -- breaks Scriptable */
265
+ "no-alert": ERROR,
266
+ "no-array-constructor": ERROR /* TSLint */,
267
+ "no-bitwise": [
268
+ ERROR,
269
+ {
270
+ allow: [],
271
+ int32Hint: true,
272
+ },
273
+ ],
274
+ "no-caller": ERROR,
275
+ "no-case-declarations": ERROR,
276
+ "no-console": OFF, /* preference -- breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */
277
+ "no-continue": ERROR,
278
+ "no-delete-var": ERROR,
279
+ "no-div-regex": ERROR,
280
+ "no-else-return": OFF /* preference */,
281
+ "no-empty": [
282
+ ERROR,
283
+ {
284
+ allowEmptyCatch: false,
285
+ },
286
+ ],
287
+ "no-empty-function": [
288
+ ERROR,
289
+ {
290
+ allow:
291
+ ["constructors"] /** functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */,
292
+ },
293
+ ] /* TSLint */,
294
+ "no-empty-static-block": ERROR,
295
+ "no-eq-null": ERROR,
296
+ "no-eval": [
297
+ ERROR,
298
+ {
299
+ allowIndirect: false,
300
+ },
301
+ ],
302
+ "no-extend-native": [
303
+ ERROR,
304
+ {
305
+ exceptions: [],
306
+ },
307
+ ],
308
+ "no-extra-bind": ERROR,
309
+ "no-extra-boolean-cast": [
310
+ ERROR,
311
+ {
312
+ enforceForLogicalOperands: true,
313
+ },
314
+ ],
315
+ "no-extra-label": ERROR,
316
+ "no-global-assign": [
317
+ ERROR,
318
+ {
319
+ exceptions: [],
320
+ },
321
+ ],
322
+ "no-implicit-coercion": [
323
+ ERROR,
324
+ {
325
+ "boolean": true,
326
+ number: true,
327
+ string: true,
328
+ disallowTemplateShorthand: true,
329
+ allow: [] /** "~" | "!!" | "+" | "- -" | "-" | "*" */,
330
+ },
331
+ ],
332
+ "no-implicit-globals": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
333
+ "no-implied-eval": ERROR /* TSLint */,
334
+ "no-inline-comments": OFF /* preference */,
335
+ "no-invalid-this": [
336
+ ERROR,
337
+ { capIsConstructor: false },
338
+ ] /* TSLint:off: tsconfig: { strict, noImplicitThis } */,
339
+ "no-iterator": ERROR,
340
+ "no-label-var": ERROR,
341
+ "no-lone-blocks": ERROR,
342
+ "no-lonely-if": OFF /* preference */,
343
+ "no-loop-func": ERROR /* TSLint */,
344
+ "no-magic-numbers": OFF /* preference - breaks TypeScript number literals, even with most liberal exceptions */,
345
+ "no-multi-assign": [
346
+ ERROR,
347
+ {
348
+ ignoreNonDeclaration: false,
349
+ },
350
+ ],
351
+ "no-multi-str": ERROR,
352
+ "no-negated-condition": OFF /* preference */,
353
+ "no-nested-ternary": OFF /* preference */,
354
+ "no-new": ERROR,
355
+ "no-new-func": ERROR,
356
+ "no-new-wrappers": ERROR,
357
+ "no-nonoctal-decimal-escape": ERROR,
358
+ "no-object-constructor": ERROR,
359
+ "no-octal": ERROR,
360
+ "no-octal-escape": ERROR,
361
+ "no-param-reassign": [
362
+ ERROR,
363
+ {
364
+ props: true,
365
+ ignorePropertyModificationsFor: [],
366
+ ignorePropertyModificationsForRegex: [],
367
+ },
368
+ ],
369
+ "no-plusplus": [
370
+ ERROR,
371
+ {
372
+ allowForLoopAfterthoughts: true,
373
+ },
374
+ ],
375
+ "no-proto": ERROR,
376
+ "no-redeclare": [
377
+ ERROR,
378
+ { builtinGlobals: true },
379
+ ] /* tsc -- TSLint:off: tsc (let, const, -var) */,
380
+ "no-regex-spaces": OFF /* preference */,
381
+ "no-restricted-exports": OFF /* preference */,
382
+ "no-restricted-globals": OFF /* preference */,
383
+ "no-restricted-imports": OFF /* preference -- TSLint:off */,
384
+ "no-restricted-properties": OFF /* preference */,
385
+ "no-restricted-syntax": OFF /* preference */,
386
+ "no-return-assign": OFF /* "always" | "except-parens" (disallow assignments unless enclosed in parens) */,
387
+ "no-script-url": ERROR,
388
+ "no-sequences": [
389
+ ERROR,
390
+ {
391
+ allowInParentheses: true,
392
+ },
393
+ ],
394
+ "no-shadow": OFF /* investigate -- TSLint:off: investigate */,
395
+ "no-shadow-restricted-names": ERROR,
396
+ "no-ternary": OFF /* preference */,
397
+ "no-throw-literal": ERROR /* TSLint */,
398
+ "no-undef-init": ERROR,
399
+ "no-undefined": OFF /* investigate (breaks Scriptable? breaks Sveltekit?) */,
400
+ "no-underscore-dangle": OFF /* preference */,
401
+ "no-unneeded-ternary": [
402
+ ERROR,
403
+ {
404
+ defaultAssignment: false,
405
+ },
406
+ ],
407
+ "no-unused-expressions": [
408
+ ERROR,
409
+ {
410
+ allowShortCircuit: true,
411
+ allowTernary: true,
412
+ allowTaggedTemplates: true,
413
+ enforceForJSX: false,
414
+ },
415
+ ] /* TSLint */,
416
+ "no-unused-labels": ERROR,
417
+ "no-useless-call": ERROR,
418
+ "no-useless-catch": ERROR,
419
+ "no-useless-computed-key": [
420
+ ERROR,
421
+ {
422
+ enforceForClassMembers: true,
423
+ },
424
+ ],
425
+ "no-useless-concat": ERROR,
426
+ "no-useless-constructor": ERROR /* TSLint */,
427
+ "no-useless-escape": ERROR,
428
+ "no-useless-rename": [
429
+ ERROR,
430
+ {
431
+ ignoreImport: false,
432
+ ignoreExport: false,
433
+ ignoreDestructuring: false,
434
+ },
435
+ ],
436
+ "no-useless-return": ERROR,
437
+ "no-var": ERROR,
438
+ "no-void": [
439
+ ERROR,
440
+ {
441
+ allowAsStatement: true,
442
+
443
+ },
444
+ ],
445
+ "no-warning-comments": OFF /* preference */,
446
+ "no-with": ERROR,
447
+ "object-shorthand": [
448
+ ERROR,
449
+ always,
450
+ {
451
+ avoidQuotes: true,
452
+ ignoreConstructors: false,
453
+ avoidExplicitReturnArrows: false,
454
+ },
455
+ ],
456
+ "one-var": [
457
+ ERROR,
458
+ {
459
+ "var": consecutive,
460
+ let: consecutive,
461
+ "const": consecutive,
462
+ separateRequires: true,
463
+ },
464
+ ],
465
+ "operator-assignment": [
466
+ ERROR,
467
+ always,
468
+ ],
469
+ "prefer-arrow-callback": [
470
+ ERROR,
471
+ {
472
+ allowNamedFunctions: false,
473
+ allowUnboundThis: true,
474
+ },
475
+ ],
476
+ "prefer-const": [
477
+ ERROR,
478
+ {
479
+ destructuring: all,
480
+ ignoreReadBeforeAssign: false,
481
+ },
482
+ ],
483
+ "prefer-destructuring": [
484
+ ERROR,
485
+ {
486
+ VariableDeclarator: {
487
+ array: true,
488
+ object: true,
489
+ },
490
+ AssignmentExpression: {
491
+ array: false,
492
+ object: false,
493
+ },
494
+ },
495
+ { enforceForRenamedProperties: true },
496
+ ] /* TSLint */,
497
+ "prefer-exponentiation-operator": ERROR,
498
+ "prefer-named-capture-group": OFF,
499
+ "prefer-numeric-literals": ERROR,
500
+ "prefer-object-has-own": ERROR,
501
+ "prefer-object-spread": ERROR,
502
+ "prefer-promise-reject-errors": [
503
+ ERROR,
504
+ {
505
+ allowEmptyReject: false,
506
+ },
507
+ ],
508
+ "prefer-regex-literals": [
509
+ ERROR,
510
+ {
511
+ disallowRedundantWrapping: true,
512
+ },
513
+ ] /* TSLint */,
514
+ "prefer-rest-params": ERROR,
515
+ "prefer-spread": ERROR,
516
+ "prefer-template": ERROR,
517
+ radix: [
518
+ ERROR,
519
+ as_needed,
520
+ ],
521
+ "require-await": ERROR /* TSLint */,
522
+ "require-unicode-regexp": ERROR,
523
+ "require-yield": ERROR,
524
+ "sort-imports": OFF /* preference */,
525
+ "sort-keys": OFF /* preference */,
526
+ "sort-vars": OFF /* preference */,
527
+ strict: OFF /* preference */,
528
+ "symbol-description": OFF /* preference */,
529
+ "vars-on-top": ERROR,
530
+ yoda: [
531
+ ERROR,
532
+ never,
533
+ {
534
+ exceptRange: false,
535
+ onlyEquality: false,
536
+ },
537
+ ],
538
+
539
+ // #endregion SUGGESTIONS
540
+
541
+ // #region LAYOUT & FORMATTING
542
+ // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
543
+ "unicode-bom": OFF /* preference: don't care */,
544
+
545
+ // #endregion LAYOUT & FORMATTING
546
+ } as const,
547
+ ] as const;
@@ -0,0 +1,7 @@
1
+ import { Enable } from "./enable";
2
+ import { EnableStylistic } from "./enable-stylistic";
3
+
4
+ export default [
5
+ Enable,
6
+ EnableStylistic,
7
+ ];
@@ -0,0 +1,91 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ always,
6
+ consistent,
7
+ double,
8
+ last,
9
+ never,
10
+ strict,
11
+ } from "../../_strings";
12
+
13
+ export const JsonEnableExtension = [
14
+ ID.EnableExtension,
15
+ {
16
+ // DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
17
+ "jsonc/array-bracket-newline": OFF /* DO NOT CHANGE */,
18
+ "jsonc/array-bracket-spacing": [
19
+ ERROR,
20
+ never,
21
+ {
22
+ singleValue: false,
23
+ objectsInArrays: false,
24
+ arraysInArrays: false,
25
+ },
26
+ ] /* MUST match ../js/stylistic.ts */,
27
+ "jsonc/array-element-newline": [
28
+ ERROR,
29
+ consistent,
30
+ ],
31
+ "jsonc/comma-dangle": [ERROR, never] /* trailing commas are NOT allowed in JSON */,
32
+ "jsonc/comma-style": [ERROR, last],
33
+ "jsonc/indent": [ERROR, 2],
34
+ "jsonc/key-spacing": [
35
+ ERROR,
36
+ {
37
+ beforeColon: false,
38
+ afterColon: true,
39
+ mode: strict,
40
+ },
41
+ ] /* MUST match ../js/stylistic.ts */,
42
+ "jsonc/no-dupe-keys": ERROR,
43
+ "jsonc/no-floating-decimal": ERROR,
44
+ "jsonc/no-irregular-whitespace": [
45
+ ERROR,
46
+ {
47
+ skipStrings: true,
48
+ skipComments: true,
49
+ skipRegExps: true,
50
+ skipTemplates: true,
51
+ skipJSXText: true,
52
+ },
53
+ ],
54
+ "jsonc/no-multi-str": ERROR,
55
+ "jsonc/no-octal-escape": ERROR,
56
+ "jsonc/no-octal": ERROR,
57
+ "jsonc/no-sparse-arrays": ERROR,
58
+ "jsonc/no-useless-escape": ERROR,
59
+ "jsonc/object-curly-newline": [
60
+ ERROR,
61
+ {
62
+ consistent: true,
63
+ multiline: true,
64
+ minProperties: 4,
65
+ },
66
+ ] /* MUST match CHILD of ../js/stylistic.ts */,
67
+ "jsonc/object-curly-spacing": [
68
+ ERROR,
69
+ always,
70
+ {
71
+ arraysInObjects: true,
72
+ objectsInObjects: true,
73
+ },
74
+ ] /* MUST match ../js/stylistic.ts */,
75
+ "jsonc/object-property-newline": [
76
+ ERROR,
77
+ {
78
+ allowAllPropertiesOnSameLine: true,
79
+ },
80
+ ] /* MUST match ../js/stylistic.ts */,
81
+ "jsonc/quote-props": [ERROR, always],
82
+ "jsonc/quotes": [
83
+ ERROR,
84
+ double,
85
+ {
86
+ avoidEscape: false,
87
+ },
88
+ ],
89
+ "jsonc/space-unary-ops": ERROR,
90
+ } as const,
91
+ ] as const;
@@ -0,0 +1,35 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ } from "../../_strings";
6
+
7
+ export const JsonEnable = [
8
+ ID.Enable,
9
+ {
10
+ // DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
11
+ "jsonc/auto": OFF,
12
+ "jsonc/key-name-casing": OFF,
13
+ "jsonc/no-bigint-literals": ERROR,
14
+ "jsonc/no-binary-expression": ERROR,
15
+ "jsonc/no-binary-numeric-literals": ERROR,
16
+ "jsonc/no-comments": ERROR /* comments are NOT allowed in JSON */,
17
+ "jsonc/no-escape-sequence-in-identifier": ERROR,
18
+ "jsonc/no-hexadecimal-numeric-literals": ERROR,
19
+ "jsonc/no-infinity": ERROR,
20
+ "jsonc/no-nan": ERROR,
21
+ "jsonc/no-number-props": ERROR,
22
+ "jsonc/no-numeric-separators": ERROR,
23
+ "jsonc/no-octal-numeric-literals": ERROR,
24
+ "jsonc/no-parenthesized": ERROR,
25
+ "jsonc/no-plus-sign": ERROR,
26
+ "jsonc/no-regexp-literals": ERROR,
27
+ "jsonc/no-template-literals": ERROR,
28
+ "jsonc/no-undefined-value": ERROR,
29
+ "jsonc/no-unicode-codepoint-escapes": ERROR,
30
+ "jsonc/sort-array-values": OFF,
31
+ "jsonc/sort-keys": OFF,
32
+ "jsonc/valid-json-number": ERROR,
33
+ "jsonc/vue-custom-block/no-parsing-error": ERROR,
34
+ } as const,
35
+ ] as const;
@@ -0,0 +1,7 @@
1
+ import { JsonEnable } from "./enable";
2
+ import { JsonEnableExtension } from "./enable-ext";
3
+
4
+ export default [
5
+ JsonEnable,
6
+ JsonEnableExtension,
7
+ ];
@@ -0,0 +1,3 @@
1
+ import { JsoncOverride } from "./override";
2
+
3
+ export default [JsoncOverride];
@@ -0,0 +1,18 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ always_multiline,
6
+ } from "../../_strings";
7
+
8
+ export const JsoncOverride = [
9
+ ID.Override,
10
+ {
11
+ // DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
12
+ "jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
13
+ "jsonc/comma-dangle": [
14
+ ERROR,
15
+ always_multiline,
16
+ ] /* trailing commas ARE allowed in JSONC */,
17
+ } as const,
18
+ ] as const;