@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,11 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const MochaDisable = [
7
+ ID.Disable,
8
+ {
9
+ "prefer-arrow-callback": OFF,
10
+ } as const,
11
+ ] as const;
@@ -0,0 +1,53 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ WARN,
5
+ OFF,
6
+ } from "../../_strings";
7
+
8
+ export const MochaEnable = [
9
+ ID.Enable,
10
+ {
11
+ // DOC: https://github.com/lo1tuma/eslint-plugin-mocha/tree/main?tab=readme-ov-file#rules
12
+ "mocha/consistent-spacing-between-blocks": OFF,
13
+ "mocha/handle-done-callback": [
14
+ ERROR,
15
+ {
16
+ ignoreSkipped: false,
17
+ },
18
+ ],
19
+ "mocha/max-top-level-suites": [
20
+ ERROR,
21
+ {
22
+ limit: 1,
23
+ },
24
+ ],
25
+ "mocha/no-async-describe": ERROR,
26
+ "mocha/no-empty-description": ERROR,
27
+ "mocha/no-exclusive-tests": ERROR,
28
+ "mocha/no-exports": ERROR,
29
+ "mocha/no-global-tests": ERROR,
30
+ "mocha/no-hooks-for-single-case": OFF,
31
+ "mocha/no-hooks": OFF,
32
+ "mocha/no-identical-title": ERROR,
33
+ "mocha/no-mocha-arrows": ERROR,
34
+ "mocha/no-nested-tests": ERROR,
35
+ "mocha/no-pending-tests": WARN,
36
+ "mocha/no-return-and-callback": ERROR,
37
+ "mocha/no-return-from-async": ERROR,
38
+ "mocha/no-setup-in-describe": ERROR,
39
+ "mocha/no-sibling-hooks": ERROR,
40
+ "mocha/no-skipped-tests": ERROR,
41
+ "mocha/no-synchronous-tests": OFF,
42
+ "mocha/no-top-level-hooks": ERROR,
43
+ "mocha/prefer-arrow-callback": [
44
+ ERROR,
45
+ {
46
+ allowNamedFunctions: false,
47
+ allowUnboundThis: true,
48
+ },
49
+ ] /* MUST match ../js/enable.ts */,
50
+ "mocha/valid-suite-description": OFF,
51
+ "mocha/valid-test-description": OFF,
52
+ } as const,
53
+ ] as const;
@@ -0,0 +1,7 @@
1
+ import { MochaDisable } from "./disable";
2
+ import { MochaEnable } from "./enable";
3
+
4
+ export default [
5
+ MochaDisable,
6
+ MochaEnable,
7
+ ];
@@ -0,0 +1,13 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const SvelteDisableExtension = [
7
+ ID.DisableExtension,
8
+ {
9
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
10
+ "no-inner-declarations": OFF /* also disabled in svelte/disable per Svelte base config */,
11
+ "no-self-assign": OFF /* ESLint */,
12
+ } as const,
13
+ ] as const;
@@ -0,0 +1,12 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const SvelteDisableTs = [
7
+ `${ID.Disable}/ts`,
8
+ {
9
+ "no-unused-vars": OFF /* ESLint */,
10
+ "@typescript-eslint/no-unused-vars": OFF /* TS Extension */,
11
+ } as const,
12
+ ] as const;
@@ -0,0 +1,17 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const SvelteDisable = [
7
+ ID.Disable,
8
+ {
9
+ // Copied from Svelte base config:
10
+ // DOC: https://github.com/sveltejs/eslint-plugin-svelte/blob/ca37fbbe82d01019946e12eeb1b57c2a5736c018/packages/eslint-plugin-svelte/src/configs/base.ts
11
+
12
+ /* ESLint core rules known to cause problems with `.svelte`. */
13
+ "no-inner-declarations": OFF /* The AST generated by svelte-eslint-parser will false positives in it rule because the root node of the script is not the `Program`. */,
14
+ // "no-irregular-whitespace": OFF /* INFO: This is commented out in the config as well */,
15
+ "no-self-assign": OFF /* Self assign is one of way to update reactive value in Svelte */,
16
+ } as const,
17
+ ] as const;
@@ -0,0 +1,22 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ allow,
6
+ both,
7
+ } from "../../_strings";
8
+
9
+ export const SvelteEnableExtension = [
10
+ ID.EnableExtension,
11
+ {
12
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
13
+ "svelte/no-inner-declarations": [
14
+ ERROR,
15
+ both,
16
+ {
17
+ blockScopedFunctions: allow,
18
+ },
19
+ ] /* Same options as in JsEnable */,
20
+ "svelte/no-trailing-spaces": OFF /* Only applies to HTML comments, which I don't intend to use: http://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/ */,
21
+ } as const,
22
+ ] as const;
@@ -0,0 +1,232 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ ignore,
6
+ never,
7
+ always,
8
+ below,
9
+ double,
10
+ } from "../../_strings";
11
+
12
+ export const SvelteEnable = [
13
+ ID.Enable,
14
+ {
15
+ // #region ERRORS
16
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
17
+ "svelte/infinite-reactive-loop": ERROR,
18
+ "svelte/no-dom-manipulating": ERROR,
19
+ "svelte/no-dupe-else-if-blocks": ERROR,
20
+ "svelte/no-dupe-on-directives": ERROR,
21
+ "svelte/no-dupe-style-properties": ERROR,
22
+ "svelte/no-dupe-use-directives": ERROR,
23
+ "svelte/no-dynamic-slot-name": ERROR,
24
+ "svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
25
+ "svelte/no-not-function-handler": ERROR,
26
+ "svelte/no-object-in-text-mustaches": ERROR,
27
+ "svelte/no-reactive-reassign": [
28
+ ERROR,
29
+ {
30
+ props: true,
31
+ },
32
+ ],
33
+ "svelte/no-shorthand-style-property-overrides": ERROR,
34
+ "svelte/no-store-async": ERROR,
35
+ "svelte/no-unknown-style-directive-property": [
36
+ ERROR,
37
+ {
38
+ ignorePrefixed: true,
39
+ },
40
+ ],
41
+ "svelte/require-store-callbacks-use-set-param": ERROR,
42
+ "svelte/require-store-reactive-access": ERROR,
43
+ "svelte/valid-compile": [
44
+ ERROR,
45
+ {
46
+ ignoreWarnings: false,
47
+ },
48
+ ],
49
+ "svelte/valid-prop-names-in-kit-pages": ERROR,
50
+
51
+ // #endregion ERRORS
52
+
53
+ // #region SECURITY
54
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
55
+ "svelte/no-at-html-tags": ERROR,
56
+ "svelte/no-target-blank": [
57
+ ERROR,
58
+ {
59
+ allowReferrer: false,
60
+ enforceDynamicLinks: always,
61
+ },
62
+ ],
63
+
64
+ // #endregion SECURITY
65
+
66
+ // #region BEST PRACTICES
67
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
68
+ "svelte/block-lang": [
69
+ ERROR,
70
+ {
71
+ enforceScriptPresent: true,
72
+ enforceStylePresent: false,
73
+ script: ["ts"],
74
+ style: [
75
+ "css",
76
+ "scss",
77
+ ],
78
+ },
79
+ ], /* INVESTIGATE: */
80
+ "svelte/button-has-type": [
81
+ ERROR,
82
+ {
83
+ button: true,
84
+ submit: true,
85
+ reset: true,
86
+ },
87
+ ],
88
+ "svelte/no-at-debug-tags": ERROR,
89
+ "svelte/no-ignored-unsubscribe": ERROR,
90
+ "svelte/no-immutable-reactive-statements": ERROR,
91
+ "svelte/no-inline-styles": [
92
+ ERROR,
93
+ {
94
+ allowTransitions: false,
95
+ },
96
+ ],
97
+ "svelte/no-reactive-functions": ERROR,
98
+ "svelte/no-reactive-literals": ERROR,
99
+ "svelte/no-svelte-internal": ERROR,
100
+ "svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
101
+ "svelte/no-unused-svelte-ignore": ERROR,
102
+ "svelte/no-useless-mustaches": [
103
+ ERROR,
104
+ {
105
+ ignoreIncludesComment: false,
106
+ ignoreStringEscape: false,
107
+ },
108
+ ],
109
+ "svelte/prefer-destructured-store-props": ERROR,
110
+ "svelte/require-each-key": ERROR,
111
+ "svelte/require-event-dispatcher-types": ERROR,
112
+ "svelte/require-optimized-style-attribute": ERROR,
113
+ "svelte/require-stores-init": ERROR,
114
+ "svelte/valid-each-key": ERROR,
115
+
116
+ // #endregion BEST PRACTICES
117
+
118
+ // #region STYLE
119
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
120
+ "svelte/derived-has-same-inputs-outputs": ERROR,
121
+ "svelte/first-attribute-linebreak": [
122
+ ERROR,
123
+ {
124
+ multiline: below,
125
+ singleline: below,
126
+ },
127
+ ],
128
+ "svelte/html-closing-bracket-spacing": [
129
+ ERROR,
130
+ {
131
+ startTag: never,
132
+ endTag: never,
133
+ selfClosingTag: always,
134
+ },
135
+ ],
136
+ "svelte/html-quotes": [
137
+ ERROR,
138
+ {
139
+ prefer: double,
140
+ dynamic: {
141
+ quoted: false,
142
+ avoidInvalidUnquotedInHTML: true,
143
+ },
144
+ },
145
+ ],
146
+ "svelte/html-self-closing": [
147
+ ERROR,
148
+ {
149
+ "void": always,
150
+ foreign: always,
151
+ component: always,
152
+ svelte: always,
153
+ normal: ignore,
154
+ } /* always | never | ignore */,
155
+ ],
156
+ "svelte/indent": [
157
+ ERROR,
158
+ {
159
+ indent: 2,
160
+ switchCase: 1,
161
+ alignAttributesVertically: true,
162
+ },
163
+ ],
164
+ "svelte/max-attributes-per-line": [
165
+ ERROR,
166
+ {
167
+ multiline: 1,
168
+ singleline: 1,
169
+ },
170
+ ],
171
+ "svelte/mustache-spacing": [
172
+ ERROR,
173
+ {
174
+ textExpressions: never /* or ALWAYS */,
175
+ attributesAndProps: never /* or ALWAYS */,
176
+ directiveExpressions: never /* or ALWAYS */,
177
+ tags: {
178
+ openingBrace: never /* or ALWAYS */,
179
+ closingBrace: never /* or ALWAYS or "always-after-expression" */,
180
+ },
181
+ },
182
+ ],
183
+ "svelte/no-extra-reactive-curlies": ERROR,
184
+ "svelte/no-restricted-html-elements": OFF,
185
+ "svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
186
+ "svelte/prefer-class-directive": [
187
+ ERROR,
188
+ {
189
+ prefer: "empty",
190
+ },
191
+ ],
192
+ "svelte/prefer-style-directive": ERROR,
193
+ "svelte/shorthand-attribute": [
194
+ ERROR,
195
+ {
196
+ prefer: always,
197
+ },
198
+ ],
199
+ "svelte/shorthand-directive": [
200
+ ERROR,
201
+ {
202
+ prefer: always,
203
+ },
204
+ ],
205
+ "svelte/sort-attributes": OFF /* INVESTIGATE: */,
206
+ "svelte/spaced-html-comment": [
207
+ ERROR,
208
+ always,
209
+ ],
210
+
211
+ // #endregion STYLE
212
+
213
+ // #region SVELTE-KIT
214
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
215
+ "svelte/no-goto-without-base": ERROR,
216
+
217
+ // #endregion SVELTE-KIT
218
+
219
+ // #region REQUIRED
220
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
221
+ "svelte/comment-directive": [
222
+ ERROR,
223
+ {
224
+ reportUnusedDisableDirectives: true,
225
+ },
226
+ ],
227
+ "svelte/system": ERROR,
228
+
229
+ // #endregion REQUIRED
230
+
231
+ } as const,
232
+ ] as const;
@@ -0,0 +1,13 @@
1
+ import { SvelteDisable } from "./disable";
2
+ import { SvelteDisableTs } from "./disable-ts";
3
+ import { SvelteDisableExtension } from "./disable-ext";
4
+ import { SvelteEnable } from "./enable";
5
+ import { SvelteEnableExtension } from "./enable-ext";
6
+
7
+ export default [
8
+ SvelteDisable,
9
+ SvelteDisableTs,
10
+ SvelteDisableExtension,
11
+ SvelteEnable,
12
+ SvelteEnableExtension,
13
+ ];
@@ -0,0 +1,35 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const TsDisableExtension = [
7
+ ID.DisableExtension,
8
+ {
9
+ // DOC: https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
10
+ "class-methods-use-this": OFF,
11
+ "consistent-return": OFF,
12
+ "default-param-last": OFF,
13
+ "dot-notation": OFF,
14
+ "init-declarations": OFF,
15
+ "max-params": OFF,
16
+ "no-array-constructor": OFF,
17
+ "no-dupe-class-members": OFF,
18
+ "no-empty-function": OFF,
19
+ "no-implied-eval": OFF,
20
+ "no-invalid-this": OFF,
21
+ "no-loop-func": OFF,
22
+ "no-magic-numbers": OFF,
23
+ "no-redeclare": OFF,
24
+ "no-restricted-imports": OFF,
25
+ "no-shadow": OFF,
26
+ "no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
27
+ "no-unused-expressions": OFF,
28
+ "no-unused-vars": OFF,
29
+ "no-use-before-define": OFF,
30
+ "no-useless-constructor": OFF,
31
+ "prefer-destructuring": OFF,
32
+ "prefer-promise-reject-errors": OFF,
33
+ "require-await": OFF,
34
+ } as const,
35
+ ] as const;
@@ -0,0 +1,25 @@
1
+ import {
2
+ ID,
3
+ OFF,
4
+ } from "../../_strings";
5
+
6
+ export const TsDisable = [
7
+ ID.Disable,
8
+ {
9
+ // Handled by TypeScript compiler
10
+ "constructor-super": OFF,
11
+ "no-const-assign": OFF,
12
+ "no-dupe-args": OFF,
13
+ "no-dupe-class-members": OFF,
14
+ "no-dupe-keys": OFF,
15
+ "no-func-assign": OFF,
16
+ "no-obj-calls": OFF,
17
+ "no-setter-return": OFF,
18
+ "no-this-before-super": OFF,
19
+ "no-undef": OFF,
20
+ "no-unreachable": OFF,
21
+ "no-unsafe-negation": OFF,
22
+ "consistent-return": OFF,
23
+ "no-redeclare": OFF,
24
+ } as const,
25
+ ] as const;
@@ -0,0 +1,117 @@
1
+ import {
2
+ ID,
3
+ ERROR,
4
+ OFF,
5
+ always,
6
+ all,
7
+ } from "../../_strings";
8
+
9
+ export const TsEnableExtension = [
10
+ ID.EnableExtension,
11
+ {
12
+ // DOC: https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
13
+ "@typescript-eslint/class-methods-use-this": OFF /* preference -- eslint:off */,
14
+ "@typescript-eslint/consistent-return": OFF /* tsconfig: noImplicitReturns */,
15
+ "@typescript-eslint/default-param-last": ERROR,
16
+ "@typescript-eslint/dot-notation": [
17
+ ERROR,
18
+ {
19
+ allowKeywords: true,
20
+
21
+ // TS-only
22
+ allowPrivateClassPropertyAccess: true,
23
+ allowProtectedClassPropertyAccess: true,
24
+ allowIndexSignaturePropertyAccess: true,
25
+ },
26
+ ],
27
+ "@typescript-eslint/init-declarations": [
28
+ ERROR,
29
+ always,
30
+ ],
31
+ "@typescript-eslint/max-params": OFF /* preference */,
32
+ "@typescript-eslint/no-array-constructor": ERROR,
33
+ "@typescript-eslint/no-dupe-class-members": OFF /* tsc */,
34
+ "@typescript-eslint/no-empty-function": [
35
+ ERROR,
36
+ {
37
+ allow: [
38
+ "constructors",
39
+ "private-constructors",
40
+ "protected-constructors",
41
+ "decoratedFunctions",
42
+ ],
43
+ }, /* functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */
44
+ ],
45
+ "@typescript-eslint/no-implied-eval": ERROR,
46
+ "@typescript-eslint/no-invalid-this": OFF /* tsconfig: { strict, noImplicitThis } */,
47
+ "@typescript-eslint/no-loop-func": ERROR,
48
+ "@typescript-eslint/no-magic-numbers": OFF,
49
+ "@typescript-eslint/no-redeclare": OFF /* tsc (let, const, -var) */,
50
+ "@typescript-eslint/no-restricted-imports": OFF /* preference */,
51
+ "@typescript-eslint/no-shadow": OFF /* investigate */,
52
+ "@typescript-eslint/no-unused-expressions": [
53
+ ERROR,
54
+ {
55
+ allowShortCircuit: true,
56
+ allowTernary: true,
57
+ allowTaggedTemplates: true,
58
+ enforceForJSX: false,
59
+ },
60
+ ],
61
+ "@typescript-eslint/no-unused-vars": [
62
+ ERROR,
63
+ {
64
+ vars: all,
65
+ args: all,
66
+ caughtErrors: all,
67
+ ignoreRestSiblings: false,
68
+ ignoreClassWithStaticInitBlock: false,
69
+ reportUsedIgnorePattern: true,
70
+ },
71
+ ],
72
+ "@typescript-eslint/no-use-before-define": [
73
+ ERROR,
74
+ {
75
+ functions: true,
76
+ classes: true,
77
+ variables: true,
78
+ allowNamedExports: false,
79
+ enums: true,
80
+ typedefs: false /* changed 14.2.2 (still questionable) */,
81
+ ignoreTypeReferences: true,
82
+ },
83
+ ],
84
+ "@typescript-eslint/no-useless-constructor": ERROR,
85
+ "@typescript-eslint/only-throw-error": [
86
+ ERROR,
87
+ {
88
+ allowThrowingAny: false,
89
+ allowThrowingUnknown: false,
90
+ },
91
+ ],
92
+ "@typescript-eslint/prefer-destructuring": [
93
+ ERROR,
94
+ {
95
+ VariableDeclarator: {
96
+ array: true,
97
+ object: true,
98
+ },
99
+ AssignmentExpression: {
100
+ array: false,
101
+ object: false,
102
+ },
103
+ },
104
+ {
105
+ enforceForRenamedProperties: false,
106
+ enforceForDeclarationWithTypeAnnotation: false,
107
+ },
108
+ ],
109
+ "@typescript-eslint/prefer-promise-reject-errors": [
110
+ ERROR,
111
+ {
112
+ allowEmptyReject: false,
113
+ },
114
+ ],
115
+ "@typescript-eslint/require-await": ERROR,
116
+ } as const,
117
+ ] as const;