linted 16.1.0-rc.1 → 16.1.1-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. package/dist/imports/index.d.ts +1 -1
  2. package/dist/imports/index.d.ts.map +1 -1
  3. package/dist/imports/index.js +1 -1
  4. package/dist/imports/index.js.map +1 -1
  5. package/dist/index.d.ts +5 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/statics/index.d.ts +1 -1
  10. package/dist/statics/index.d.ts.map +1 -1
  11. package/dist/statics/index.js +1 -1
  12. package/dist/statics/index.js.map +1 -1
  13. package/dist/statics/rules/index.d.ts +23 -23
  14. package/dist/statics/rules/presets/Html.d.ts.map +1 -1
  15. package/dist/statics/rules/presets/Html.js +1 -4
  16. package/dist/statics/rules/presets/Html.js.map +1 -1
  17. package/dist/statics/rules/presets/Js.d.ts +4 -4
  18. package/dist/statics/rules/presets/Js.d.ts.map +1 -1
  19. package/dist/statics/rules/presets/Js.js +1 -4
  20. package/dist/statics/rules/presets/Js.js.map +1 -1
  21. package/dist/statics/rules/presets/Json.d.ts +1 -1
  22. package/dist/statics/rules/presets/Json.d.ts.map +1 -1
  23. package/dist/statics/rules/presets/Json.js +1 -4
  24. package/dist/statics/rules/presets/Json.js.map +1 -1
  25. package/dist/statics/rules/presets/Jsonc.d.ts +1 -1
  26. package/dist/statics/rules/presets/Jsonc.d.ts.map +1 -1
  27. package/dist/statics/rules/presets/Jsonc.js +1 -4
  28. package/dist/statics/rules/presets/Jsonc.js.map +1 -1
  29. package/dist/statics/rules/presets/Mocha.d.ts.map +1 -1
  30. package/dist/statics/rules/presets/Mocha.js +1 -4
  31. package/dist/statics/rules/presets/Mocha.js.map +1 -1
  32. package/dist/statics/rules/presets/Svelte.d.ts +8 -8
  33. package/dist/statics/rules/presets/Ts.d.ts +8 -8
  34. package/dist/statics/rules/presets/Yml.d.ts +1 -1
  35. package/dist/statics/rules/presets/Yml.d.ts.map +1 -1
  36. package/dist/statics/rules/presets/Yml.js +1 -4
  37. package/dist/statics/rules/presets/Yml.js.map +1 -1
  38. package/dist/statics/rules/presets/html/Enable.d.ts.map +1 -1
  39. package/dist/statics/rules/presets/html/Enable.js +1 -4
  40. package/dist/statics/rules/presets/html/Enable.js.map +1 -1
  41. package/dist/statics/rules/presets/html/Recommended.d.ts.map +1 -1
  42. package/dist/statics/rules/presets/html/Recommended.js +1 -4
  43. package/dist/statics/rules/presets/html/Recommended.js.map +1 -1
  44. package/dist/statics/rules/presets/index.d.ts +1 -1
  45. package/dist/statics/rules/presets/index.d.ts.map +1 -1
  46. package/dist/statics/rules/presets/index.js.map +1 -1
  47. package/dist/statics/rules/presets/js/Enable.d.ts.map +1 -1
  48. package/dist/statics/rules/presets/js/Enable.js +51 -254
  49. package/dist/statics/rules/presets/js/Enable.js.map +1 -1
  50. package/dist/statics/rules/presets/js/EnableStylistic.d.ts +4 -4
  51. package/dist/statics/rules/presets/js/EnableStylistic.d.ts.map +1 -1
  52. package/dist/statics/rules/presets/js/EnableStylistic.js +85 -486
  53. package/dist/statics/rules/presets/js/EnableStylistic.js.map +1 -1
  54. package/dist/statics/rules/presets/json/Enable.d.ts.map +1 -1
  55. package/dist/statics/rules/presets/json/Enable.js.map +1 -1
  56. package/dist/statics/rules/presets/json/EnableX.d.ts +1 -1
  57. package/dist/statics/rules/presets/json/EnableX.d.ts.map +1 -1
  58. package/dist/statics/rules/presets/json/EnableX.js +12 -66
  59. package/dist/statics/rules/presets/json/EnableX.js.map +1 -1
  60. package/dist/statics/rules/presets/jsonc/OverrideJson.d.ts.map +1 -1
  61. package/dist/statics/rules/presets/jsonc/OverrideJson.js +2 -11
  62. package/dist/statics/rules/presets/jsonc/OverrideJson.js.map +1 -1
  63. package/dist/statics/rules/presets/md/Enable.d.ts.map +1 -1
  64. package/dist/statics/rules/presets/md/Enable.js +11 -49
  65. package/dist/statics/rules/presets/md/Enable.js.map +1 -1
  66. package/dist/statics/rules/presets/mocha/Enable.d.ts.map +1 -1
  67. package/dist/statics/rules/presets/mocha/Enable.js +1 -4
  68. package/dist/statics/rules/presets/mocha/Enable.js.map +1 -1
  69. package/dist/statics/rules/presets/mocha/Recommended.d.ts.map +1 -1
  70. package/dist/statics/rules/presets/mocha/Recommended.js +1 -4
  71. package/dist/statics/rules/presets/mocha/Recommended.js.map +1 -1
  72. package/dist/statics/rules/presets/svelte/DisableJS.d.ts.map +1 -1
  73. package/dist/statics/rules/presets/svelte/DisableJS.js +1 -7
  74. package/dist/statics/rules/presets/svelte/DisableJS.js.map +1 -1
  75. package/dist/statics/rules/presets/svelte/DisableTS.d.ts.map +1 -1
  76. package/dist/statics/rules/presets/svelte/DisableTS.js +1 -7
  77. package/dist/statics/rules/presets/svelte/DisableTS.js.map +1 -1
  78. package/dist/statics/rules/presets/svelte/DisableX.d.ts.map +1 -1
  79. package/dist/statics/rules/presets/svelte/DisableX.js +1 -6
  80. package/dist/statics/rules/presets/svelte/DisableX.js.map +1 -1
  81. package/dist/statics/rules/presets/svelte/Enable.d.ts.map +1 -1
  82. package/dist/statics/rules/presets/svelte/Enable.js +19 -108
  83. package/dist/statics/rules/presets/svelte/Enable.js.map +1 -1
  84. package/dist/statics/rules/presets/svelte/EnableX.d.ts.map +1 -1
  85. package/dist/statics/rules/presets/svelte/EnableX.js +2 -12
  86. package/dist/statics/rules/presets/svelte/EnableX.js.map +1 -1
  87. package/dist/statics/rules/presets/ts/DisableX.d.ts.map +1 -1
  88. package/dist/statics/rules/presets/ts/DisableX.js.map +1 -1
  89. package/dist/statics/rules/presets/ts/Enable.d.ts +4 -4
  90. package/dist/statics/rules/presets/ts/Enable.d.ts.map +1 -1
  91. package/dist/statics/rules/presets/ts/Enable.js +38 -175
  92. package/dist/statics/rules/presets/ts/Enable.js.map +1 -1
  93. package/dist/statics/rules/presets/ts/EnableX.d.ts.map +1 -1
  94. package/dist/statics/rules/presets/ts/EnableX.js +4 -29
  95. package/dist/statics/rules/presets/ts/EnableX.js.map +1 -1
  96. package/dist/statics/rules/presets/yml/Enable.d.ts.map +1 -1
  97. package/dist/statics/rules/presets/yml/Enable.js +9 -50
  98. package/dist/statics/rules/presets/yml/Enable.js.map +1 -1
  99. package/dist/statics/rules/presets/yml/EnableX.d.ts +1 -1
  100. package/dist/statics/rules/presets/yml/EnableX.d.ts.map +1 -1
  101. package/dist/statics/rules/presets/yml/EnableX.js +9 -60
  102. package/dist/statics/rules/presets/yml/EnableX.js.map +1 -1
  103. package/dist/statics/rules/strings/level/index.d.ts +1 -1
  104. package/dist/statics/rules/strings/level/index.d.ts.map +1 -1
  105. package/dist/statics/rules/strings/level/index.js +1 -1
  106. package/dist/statics/rules/strings/level/index.js.map +1 -1
  107. package/dist/statics/rules/strings/state/index.d.ts +2 -2
  108. package/dist/statics/rules/strings/state/index.d.ts.map +1 -1
  109. package/dist/statics/rules/strings/state/index.js +2 -2
  110. package/dist/statics/rules/strings/state/index.js.map +1 -1
  111. package/package.json +3 -2
  112. package/src/imports/index.ts +1 -4
  113. package/src/index.ts +18 -7
  114. package/src/statics/index.ts +1 -4
  115. package/src/statics/rules/presets/Html.ts +1 -4
  116. package/src/statics/rules/presets/Js.ts +1 -4
  117. package/src/statics/rules/presets/Json.ts +1 -4
  118. package/src/statics/rules/presets/Jsonc.ts +1 -4
  119. package/src/statics/rules/presets/Mocha.ts +1 -4
  120. package/src/statics/rules/presets/Yml.ts +1 -4
  121. package/src/statics/rules/presets/html/Enable.ts +1 -4
  122. package/src/statics/rules/presets/html/Recommended.ts +2 -4
  123. package/src/statics/rules/presets/index.ts +1 -4
  124. package/src/statics/rules/presets/js/Enable.ts +53 -257
  125. package/src/statics/rules/presets/js/EnableStylistic.ts +86 -490
  126. package/src/statics/rules/presets/json/Enable.ts +0 -1
  127. package/src/statics/rules/presets/json/EnableX.ts +12 -67
  128. package/src/statics/rules/presets/jsonc/OverrideJson.ts +3 -19
  129. package/src/statics/rules/presets/md/Enable.ts +11 -50
  130. package/src/statics/rules/presets/mocha/Enable.ts +1 -4
  131. package/src/statics/rules/presets/mocha/Recommended.ts +2 -4
  132. package/src/statics/rules/presets/svelte/DisableJS.ts +3 -10
  133. package/src/statics/rules/presets/svelte/DisableTS.ts +1 -7
  134. package/src/statics/rules/presets/svelte/DisableX.ts +2 -11
  135. package/src/statics/rules/presets/svelte/Enable.ts +50 -137
  136. package/src/statics/rules/presets/svelte/EnableX.ts +3 -21
  137. package/src/statics/rules/presets/ts/DisableX.ts +1 -2
  138. package/src/statics/rules/presets/ts/Enable.ts +39 -191
  139. package/src/statics/rules/presets/ts/EnableX.ts +9 -41
  140. package/src/statics/rules/presets/yml/Enable.ts +9 -59
  141. package/src/statics/rules/presets/yml/EnableX.ts +9 -69
  142. package/src/statics/rules/strings/level/index.ts +1 -5
  143. package/src/statics/rules/strings/state/index.ts +2 -0
@@ -16,45 +16,14 @@ const {
16
16
  export default [
17
17
  EnableX,
18
18
  {
19
-
20
19
  // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
21
- "jsonc/array-bracket-newline": [
22
- ERROR,
23
- CONSISTENT,
24
- ],
25
- "jsonc/array-bracket-spacing": [
26
- ERROR,
27
- NEVER,
28
- {
29
- singleValue: false,
30
- objectsInArrays: false,
31
- arraysInArrays: false,
32
- },
33
- ],
34
- "jsonc/array-element-newline": [
35
- ERROR,
36
- ALWAYS,
37
- ],
38
- "jsonc/comma-dangle": [
39
- ERROR,
40
- NEVER, // trailing commas are NOT allowed in JSON
41
- ],
42
- "jsonc/comma-style": [
43
- ERROR,
44
- LAST,
45
- ],
46
- "jsonc/indent": [
47
- ERROR,
48
- 2,
49
- ],
50
- "jsonc/key-spacing": [
51
- ERROR,
52
- {
53
- beforeColon: false,
54
- afterColon: true,
55
- mode: STRICT,
56
- },
57
- ],
20
+ "jsonc/array-bracket-newline": [ERROR, CONSISTENT],
21
+ "jsonc/array-bracket-spacing": [ERROR, NEVER, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
22
+ "jsonc/array-element-newline": [ERROR, ALWAYS],
23
+ "jsonc/comma-dangle": [ERROR, NEVER], /* // trailing commas are NOT allowed in JSON */
24
+ "jsonc/comma-style": [ERROR, LAST],
25
+ "jsonc/indent": [ERROR, 2],
26
+ "jsonc/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: STRICT }],
58
27
  "jsonc/no-dupe-keys": ERROR,
59
28
  "jsonc/no-floating-decimal": ERROR,
60
29
  "jsonc/no-irregular-whitespace": [
@@ -72,35 +41,11 @@ export default [
72
41
  "jsonc/no-octal": ERROR,
73
42
  "jsonc/no-sparse-arrays": ERROR,
74
43
  "jsonc/no-useless-escape": ERROR,
75
- "jsonc/object-curly-newline": [
76
- ERROR,
77
- {
78
- multiline: true,
79
- minProperties: 2,
80
- consistent: true,
81
- },
82
- ],
83
- "jsonc/object-curly-spacing": [
84
- ERROR,
85
- ALWAYS,
86
- {
87
- arraysInObjects: true,
88
- objectsInObjects: true,
89
- },
90
- ],
91
- "jsonc/object-property-newline": [
92
- ERROR,
93
- { allowAllPropertiesOnSameLine: false },
94
- ],
95
- "jsonc/quote-props": [
96
- ERROR,
97
- ALWAYS,
98
- ],
99
- "jsonc/quotes": [
100
- ERROR,
101
- DOUBLE,
102
- { avoidEscape: false },
103
- ],
44
+ "jsonc/object-curly-newline": [ERROR, { consistent: true, multiline: true, minProperties: 2 }],
45
+ "jsonc/object-curly-spacing": [ERROR, ALWAYS, { arraysInObjects: true, objectsInObjects: true }],
46
+ "jsonc/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: false }],
47
+ "jsonc/quote-props": [ERROR, ALWAYS],
48
+ "jsonc/quotes": [ERROR, DOUBLE, { avoidEscape: false }],
104
49
  "jsonc/space-unary-ops": ERROR,
105
50
  },
106
51
  ] as const satisfies RuleEntry;
@@ -1,22 +1,6 @@
1
1
  import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
- const {
4
- Id: { Override },
5
- Level: { ERROR, OFF },
6
- State: {
7
- ALWAYS_MULTILINE,
8
- },
9
- } = Strings;
3
+ const { Id: { Override }, Level: { ERROR, OFF }, State: { ALWAYS_MULTILINE } } = Strings;
10
4
 
11
- export default [
12
- Override,
13
- {
14
-
15
- // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
16
- "jsonc/no-comments": OFF, // comments are allowed in JSONC
17
- "jsonc/comma-dangle": [
18
- ERROR,
19
- ALWAYS_MULTILINE, // trailing commas are allowed in JSONC
20
- ],
21
- },
22
- ] as const satisfies RuleEntry;
5
+ // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
6
+ export default [Override, { "jsonc/no-comments": OFF /* comments are allowed in JSONC */, "jsonc/comma-dangle": [ERROR, ALWAYS_MULTILINE] /* trailing commas are allowed in JSONC */ }] as const satisfies RuleEntry;
@@ -5,58 +5,19 @@ const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
5
5
  export default [
6
6
  Enable,
7
7
  {
8
-
9
8
  // Rules 1-50 supported by this shit plugin: https://gitlab.com/pawelbbdrozd/eslint-plugin-markdownlint/-/tree/main/lib/rules?ref_type=heads
10
9
  // Rules 1-56 supported by this good plugin: https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md
11
- "markdownlint/md003": [
12
- ERROR,
13
- { style: "atx" },
14
- ],
15
- "markdownlint/md004": [
16
- ERROR,
17
- { style: "dash" },
18
- ],
19
- "markdownlint/md009": [
20
- ERROR,
21
- { br_spaces: 0 },
22
- ],
23
- "markdownlint/md010": [
24
- ERROR,
25
- { spaces_per_tab: 2 },
26
- ],
10
+ "markdownlint/md003": [ERROR, { style: "atx" }],
11
+ "markdownlint/md004": [ERROR, { style: "dash" }],
12
+ "markdownlint/md009": [ERROR, { br_spaces: 0 }],
13
+ "markdownlint/md010": [ERROR, { spaces_per_tab: 2 }],
27
14
  "markdownlint/md013": OFF,
28
- "markdownlint/md029": [
29
- ERROR,
30
- { style: "one" },
31
- ],
32
- "markdownlint/md033": [
33
- ERROR,
34
- {
35
- allowed_elements: [
36
- "details",
37
- "summary",
38
- ],
39
- },
40
- ],
41
- "markdownlint/md035": [
42
- ERROR,
43
- { style: "---" },
44
- ],
45
- "markdownlint/md046": [
46
- ERROR,
47
- { style: "fenced" },
48
- ],
49
- "markdownlint/md048": [
50
- ERROR,
51
- { style: "backtick" },
52
- ],
53
- "markdownlint/md049": [
54
- ERROR,
55
- { style: "underscore" },
56
- ],
57
- "markdownlint/md050": [
58
- ERROR,
59
- { style: "underscore" },
60
- ],
15
+ "markdownlint/md029": [ERROR, { style: "one" }],
16
+ "markdownlint/md033": [ERROR, { allowed_elements: ["details", "summary"] }],
17
+ "markdownlint/md035": [ERROR, { style: "---" }],
18
+ "markdownlint/md046": [ERROR, { style: "fenced" }],
19
+ "markdownlint/md048": [ERROR, { style: "backtick" }],
20
+ "markdownlint/md049": [ERROR, { style: "underscore" }],
21
+ "markdownlint/md050": [ERROR, { style: "underscore" }],
61
22
  },
62
23
  ] as const satisfies RuleEntry;
@@ -2,7 +2,4 @@ import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
3
  const { Id: { Enable } } = Strings;
4
4
 
5
- export default [
6
- Enable,
7
- {},
8
- ] as const satisfies RuleEntry;
5
+ export default [Enable, {}] as const satisfies RuleEntry;
@@ -3,7 +3,5 @@ import { Strings, type RuleEntry } from "../index.js";
3
3
 
4
4
  const { Id: { Recommended } } = Strings;
5
5
 
6
- export default [
7
- Recommended,
8
- (mocha.configs.flat.recommended as Record<"rules", RuleEntry.Object>).rules, // Remove shared config once manually configured
9
- ] as const satisfies RuleEntry;
6
+ // Remove shared config once manually configured
7
+ export default [Recommended, (mocha.configs.flat.recommended as Record<"rules", RuleEntry.Object>).rules] as const satisfies RuleEntry;
@@ -2,13 +2,6 @@ import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
3
  const { Level: { OFF } } = Strings;
4
4
 
5
- export default [
6
- "disable-js",
7
- {
8
-
9
- // Recommended by Svelte base config:
10
- // http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
11
- "no-inner-declarations": OFF, // ESLint Core
12
- "no-self-assign": OFF, // ESLint Core
13
- },
14
- ] as const satisfies RuleEntry;
5
+ // Recommended by Svelte base config:
6
+ // http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
7
+ export default ["disable-js", { "no-inner-declarations": OFF /* ESLint Core */, "no-self-assign": OFF /* ESLint Core */ }] as const satisfies RuleEntry;
@@ -2,10 +2,4 @@ import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
3
  const { Level: { OFF } } = Strings;
4
4
 
5
- export default [
6
- "disable-ts",
7
- {
8
- "no-unused-vars": OFF, // ESLint Core
9
- "@typescript-eslint/no-unused-vars": OFF, // TS Extension
10
- },
11
- ] as const satisfies RuleEntry;
5
+ export default ["disable-ts", { "no-unused-vars": OFF /* ESLint Core */, "@typescript-eslint/no-unused-vars": OFF /* TS Extension */ }] as const satisfies RuleEntry;
@@ -2,14 +2,5 @@ import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
3
  const { Id: { DisableX }, Level: { OFF } } = Strings;
4
4
 
5
- export default [
6
- DisableX,
7
- {
8
-
9
- // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
10
- "no-inner-declarations": OFF, // also disabled in SvelteDisableConflictJs per Svelte base config
11
-
12
- // "@stylistic/no-trailing-spaces": OFF,
13
-
14
- },
15
- ] as const satisfies RuleEntry;
5
+ // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
6
+ export default [DisableX, { "no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */ }] as const satisfies RuleEntry;
@@ -14,8 +14,7 @@ const {
14
14
  export default [
15
15
  Enable,
16
16
  {
17
-
18
- // Possible Errors
17
+ // #region Possible Errors
19
18
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
20
19
  "svelte/infinite-reactive-loop": ERROR,
21
20
  "svelte/no-dom-manipulating": ERROR,
@@ -27,86 +26,46 @@ export default [
27
26
  "svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
28
27
  "svelte/no-not-function-handler": ERROR,
29
28
  "svelte/no-object-in-text-mustaches": ERROR,
30
- "svelte/no-reactive-reassign": [
31
- ERROR,
32
- { props: true },
33
- ],
29
+ "svelte/no-reactive-reassign": [ERROR, { props: true }],
34
30
  "svelte/no-shorthand-style-property-overrides": ERROR,
35
31
  "svelte/no-store-async": ERROR,
36
- "svelte/no-unknown-style-directive-property": [
37
- ERROR,
38
- {
39
- // ignoreProperties: [], // ESLint error if array empty
40
- ignorePrefixed: true,
41
- },
42
- ],
32
+ "svelte/no-unknown-style-directive-property": [ERROR, { ignorePrefixed: true }],
43
33
  "svelte/require-store-callbacks-use-set-param": ERROR,
44
34
  "svelte/require-store-reactive-access": ERROR,
45
- "svelte/valid-compile": [
46
- ERROR,
47
- { ignoreWarnings: false },
48
- ],
35
+ "svelte/valid-compile": [ERROR, { ignoreWarnings: false }],
49
36
  "svelte/valid-prop-names-in-kit-pages": ERROR,
50
37
 
51
- // Security
38
+ // #endregion
39
+
40
+ // #region Security
52
41
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
53
42
  "svelte/no-at-html-tags": ERROR,
54
- "svelte/no-target-blank": [
55
- ERROR,
56
- {
57
- allowReferrer: false,
58
- enforceDynamicLinks: ALWAYS,
59
- },
60
- ],
43
+ "svelte/no-target-blank": [ERROR, { allowReferrer: false, enforceDynamicLinks: ALWAYS }],
61
44
 
62
- // Best Practices
45
+ // #endregion
46
+
47
+ // #region Best Practices
63
48
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
64
49
  "svelte/block-lang": [
65
50
  ERROR,
66
51
  {
67
- enforceScriptPresent: true, // investigate
68
- enforceStylePresent: false, // investigate
52
+ enforceScriptPresent: true,
53
+ enforceStylePresent: false,
69
54
  script: ["ts"],
70
- style: [
71
- "css",
72
- "scss",
73
- ],
74
- },
75
- ],
76
- "svelte/button-has-type": [
77
- ERROR,
78
- {
79
- button: true,
80
- submit: true,
81
- reset: true,
55
+ style: ["css", "scss"],
82
56
  },
83
- ],
57
+ ], /* INVESTIGATE: */
58
+ "svelte/button-has-type": [ERROR, { button: true, submit: true, reset: true }],
84
59
  "svelte/no-at-debug-tags": ERROR,
85
60
  "svelte/no-ignored-unsubscribe": ERROR,
86
61
  "svelte/no-immutable-reactive-statements": ERROR,
87
- "svelte/no-inline-styles": [
88
- ERROR,
89
- { allowTransitions: false },
90
- ],
62
+ "svelte/no-inline-styles": [ERROR, { allowTransitions: false }],
91
63
  "svelte/no-reactive-functions": ERROR,
92
64
  "svelte/no-reactive-literals": ERROR,
93
65
  "svelte/no-svelte-internal": ERROR,
94
- "svelte/no-unused-class-name": ERROR, // ESLint error if array empty
95
-
96
- /*
97
- "svelte/no-unused-class-name": [
98
- ERROR,
99
- { allowedClassNames: [] },
100
- ],
101
- */
66
+ "svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
102
67
  "svelte/no-unused-svelte-ignore": ERROR,
103
- "svelte/no-useless-mustaches": [
104
- ERROR,
105
- {
106
- ignoreIncludesComment: false,
107
- ignoreStringEscape: false,
108
- },
109
- ],
68
+ "svelte/no-useless-mustaches": [ERROR, { ignoreIncludesComment: false, ignoreStringEscape: false }],
110
69
  "svelte/prefer-destructured-store-props": ERROR,
111
70
  "svelte/require-each-key": ERROR,
112
71
  "svelte/require-event-dispatcher-types": ERROR,
@@ -114,104 +73,58 @@ export default [
114
73
  "svelte/require-stores-init": ERROR,
115
74
  "svelte/valid-each-key": ERROR,
116
75
 
117
- // Style
76
+ // #endregion
77
+
78
+ // #region Style
118
79
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
119
80
  "svelte/derived-has-same-inputs-outputs": ERROR,
120
- "svelte/first-attribute-linebreak": [
121
- ERROR,
122
- {
123
- multiline: BELOW,
124
- singleline: BELOW,
125
- },
126
- ],
127
- "svelte/html-closing-bracket-spacing": [
128
- ERROR,
129
- {
130
- startTag: NEVER,
131
- endTag: NEVER,
132
- selfClosingTag: ALWAYS,
133
- },
134
- ],
135
- "svelte/html-quotes": [
136
- ERROR,
137
- {
138
- prefer: DOUBLE,
139
- dynamic: {
140
- quoted: false,
141
- avoidInvalidUnquotedInHTML: true,
142
- },
143
- },
144
- ],
81
+ "svelte/first-attribute-linebreak": [ERROR, { multiline: BELOW, singleline: BELOW }],
82
+ "svelte/html-closing-bracket-spacing": [ERROR, { startTag: NEVER, endTag: NEVER, selfClosingTag: ALWAYS }],
83
+ "svelte/html-quotes": [ERROR, { prefer: DOUBLE, dynamic: { quoted: false, avoidInvalidUnquotedInHTML: true } }],
145
84
  "svelte/html-self-closing": [
146
85
  ERROR,
147
86
  {
148
- "void": ALWAYS, // or NEVER or "ignore"
149
- normal: ALWAYS, // or NEVER or "ignore"
150
- component: ALWAYS, // or NEVER or "ignore"
151
- svelte: ALWAYS, // or NEVER or "ignore"
152
- },
153
- ],
154
- "svelte/indent": [
155
- ERROR,
156
- {
157
- indent: 2,
158
-
159
- // ignoredNodes: [], // ESLint error if array empty
160
- switchCase: 1,
161
- alignAttributesVertically: true,
162
- },
163
- ],
164
- "svelte/max-attributes-per-line": [
165
- ERROR,
166
- {
167
- multiline: 1,
168
- singleline: 1,
87
+ "void": ALWAYS /* or NEVER or "ignore" */,
88
+ normal: ALWAYS /* or NEVER or "ignore" */,
89
+ component: ALWAYS /* or NEVER or "ignore" */,
90
+ svelte: ALWAYS /* or NEVER or "ignore" */,
169
91
  },
170
92
  ],
93
+ "svelte/indent": [ERROR, { indent: 2, switchCase: 1, alignAttributesVertically: true }],
94
+ "svelte/max-attributes-per-line": [ERROR, { multiline: 1, singleline: 1 }],
171
95
  "svelte/mustache-spacing": [
172
96
  ERROR,
173
97
  {
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
- },
98
+ textExpressions: NEVER /* or ALWAYS */,
99
+ attributesAndProps: NEVER /* or ALWAYS */,
100
+ directiveExpressions: NEVER /* or ALWAYS */,
101
+ tags: { openingBrace: NEVER /* or ALWAYS */, closingBrace: NEVER /* or ALWAYS or "always-after-expression" */ },
181
102
  },
182
103
  ],
183
104
  "svelte/no-extra-reactive-curlies": ERROR,
184
105
  "svelte/no-restricted-html-elements": OFF,
185
106
  "svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
186
- "svelte/prefer-class-directive": [
187
- ERROR,
188
- { prefer: "empty" },
189
- ],
107
+ "svelte/prefer-class-directive": [ERROR, { prefer: "empty" }],
190
108
  "svelte/prefer-style-directive": ERROR,
191
- "svelte/shorthand-attribute": [
192
- ERROR,
193
- { prefer: ALWAYS },
194
- ],
195
- "svelte/shorthand-directive": [
196
- ERROR,
197
- { prefer: ALWAYS },
198
- ],
199
- "svelte/sort-attributes": OFF, // TBD
200
- "svelte/spaced-html-comment": [
201
- ERROR,
202
- ALWAYS, // or NEVER
203
- ],
109
+ "svelte/shorthand-attribute": [ERROR, { prefer: ALWAYS }],
110
+ "svelte/shorthand-directive": [ERROR, { prefer: ALWAYS }],
111
+ "svelte/sort-attributes": OFF, // INVESTIGATE:
112
+ "svelte/spaced-html-comment": [ERROR, ALWAYS],
113
+
114
+ // #endregion
204
115
 
205
- // svelte-kit
116
+ // #region svelte-kit
206
117
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
207
118
  "svelte/no-goto-without-base": ERROR,
208
119
 
209
- // System (REQUIRED)
120
+ // #endregion
121
+
122
+ // #region System (REQUIRED)
210
123
  // http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
211
- "svelte/comment-directive": [
212
- ERROR,
213
- { reportUnusedDisableDirectives: true },
214
- ],
124
+ "svelte/comment-directive": [ERROR, { reportUnusedDisableDirectives: true }],
215
125
  "svelte/system": ERROR,
126
+
127
+ // #endregion
128
+
216
129
  },
217
130
  ] as const satisfies RuleEntry;
@@ -1,24 +1,6 @@
1
1
  import { Strings, type RuleEntry } from "../index.js";
2
2
 
3
- const {
4
- Id: { EnableX },
5
- Level: { ERROR, OFF },
6
- State: {
7
- ALLOW,
8
- BOTH,
9
- },
10
- } = Strings;
3
+ const { Id: { EnableX }, Level: { ERROR, OFF }, State: { ALLOW, BOTH } } = Strings;
11
4
 
12
- export default [
13
- EnableX,
14
- {
15
-
16
- // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
17
- "svelte/no-inner-declarations": [
18
- ERROR,
19
- BOTH,
20
- { blockScopedFunctions: ALLOW },
21
- ], /* Same options as in JsEnable */
22
- "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/ */
23
- },
24
- ] as const satisfies RuleEntry;
5
+ // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
6
+ export default [EnableX, { "svelte/no-inner-declarations": [ERROR, BOTH, { blockScopedFunctions: ALLOW }] /* Same options as in JsEnable */, "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/ */ }] as const satisfies RuleEntry;
@@ -5,7 +5,6 @@ const { Id: { DisableX }, Level: { OFF } } = Strings;
5
5
  export default [
6
6
  DisableX,
7
7
  {
8
-
9
8
  // https://typescript-eslint.io/rules/?=extension-xdeprecated#rules ]
10
9
  "class-methods-use-this": OFF,
11
10
  "consistent-return": OFF,
@@ -23,7 +22,7 @@ export default [
23
22
  "no-redeclare": OFF,
24
23
  "no-restricted-imports": OFF,
25
24
  "no-shadow": OFF,
26
- "no-throw-literal": OFF, /* @typescript-eslint/only-throw-error */
25
+ "no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
27
26
  "no-unused-expressions": OFF,
28
27
  "no-unused-vars": OFF,
29
28
  "no-use-before-define": OFF,