linted 14.4.6-rc.9 → 15.0.0-rc.10

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 (40) hide show
  1. package/dist/defaults.d.ts +11 -0
  2. package/dist/defaults.d.ts.map +1 -0
  3. package/dist/defaults.js +21 -0
  4. package/dist/defaults.js.map +1 -0
  5. package/dist/index.d.ts +3 -3
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +3 -42
  8. package/dist/index.js.map +1 -1
  9. package/dist/parsers.d.ts +6 -6
  10. package/dist/parsers.d.ts.map +1 -1
  11. package/dist/parsers.js.map +1 -1
  12. package/dist/plugins.d.ts +26 -26
  13. package/dist/plugins.d.ts.map +1 -1
  14. package/dist/plugins.js +1 -2
  15. package/dist/plugins.js.map +1 -1
  16. package/dist/rulesets/rules/js/JsEnable.d.ts.map +1 -1
  17. package/dist/rulesets/rules/js/JsEnable.js +10 -21
  18. package/dist/rulesets/rules/js/JsEnable.js.map +1 -1
  19. package/dist/rulesets/rules/js/StylisticEnable.d.ts.map +1 -1
  20. package/dist/rulesets/rules/js/StylisticEnable.js +12 -18
  21. package/dist/rulesets/rules/js/StylisticEnable.js.map +1 -1
  22. package/dist/rulesets/rules/state.d.ts +2 -1
  23. package/dist/rulesets/rules/state.d.ts.map +1 -1
  24. package/dist/rulesets/rules/state.js +2 -1
  25. package/dist/rulesets/rules/state.js.map +1 -1
  26. package/dist/rulesets.d.ts +10 -9
  27. package/dist/rulesets.d.ts.map +1 -1
  28. package/dist/rulesets.js +1 -2
  29. package/dist/rulesets.js.map +1 -1
  30. package/package.json +3 -3
  31. package/src/defaults.ts +22 -0
  32. package/src/index.ts +8 -46
  33. package/src/parsers.ts +2 -2
  34. package/src/plugins.ts +3 -11
  35. package/src/rulesets/rules/js/JsEnable.ts +100 -109
  36. package/src/rulesets/rules/js/StylisticEnable.ts +12 -18
  37. package/src/rulesets/rules/state.ts +2 -0
  38. package/src/rulesets.ts +4 -4
  39. package/src/files.ts +0 -14
  40. package/src/scopes.ts +0 -13
@@ -1,11 +1,12 @@
1
- declare const rulesets: {
2
- readonly js: import("@eslinted/core").Ruleset<string>;
3
- readonly ts: import("@eslinted/core").Ruleset<string>;
4
- readonly svelte: import("@eslinted/core").Ruleset<string>;
5
- readonly html: import("@eslinted/core").Ruleset<string>;
6
- readonly json: import("@eslinted/core").Ruleset<string>;
7
- readonly jsonc: import("@eslinted/core").Ruleset<string>;
8
- readonly yml: import("@eslinted/core").Ruleset<string>;
1
+ import type { Ruleset } from "@eslinted/core";
2
+ declare const _default: {
3
+ readonly js: Ruleset<string>;
4
+ readonly ts: Ruleset<string>;
5
+ readonly svelte: Ruleset<string>;
6
+ readonly html: Ruleset<string>;
7
+ readonly json: Ruleset<string>;
8
+ readonly jsonc: Ruleset<string>;
9
+ readonly yml: Ruleset<string>;
9
10
  };
10
- export default rulesets;
11
+ export default _default;
11
12
  //# sourceMappingURL=rulesets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rulesets.d.ts","sourceRoot":"","sources":["../src/rulesets.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,QAAQ;;;;;;;;CAQJ,CAAC;AAEX,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"rulesets.d.ts","sourceRoot":"","sources":["../src/rulesets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;;AAS9C,wBAQkD"}
package/dist/rulesets.js CHANGED
@@ -5,7 +5,7 @@ import HtmlRuleset from "./rulesets/HtmlRuleset.js";
5
5
  import JsonRuleset from "./rulesets/JsonRuleset.js";
6
6
  import JsoncRuleset from "./rulesets/JsoncRuleset.js";
7
7
  import YmlRuleset from "./rulesets/YmlRuleset.js";
8
- const rulesets = {
8
+ export default {
9
9
  js: JsRuleset,
10
10
  ts: TsRuleset,
11
11
  svelte: SvelteRuleset,
@@ -14,5 +14,4 @@ const rulesets = {
14
14
  jsonc: JsoncRuleset,
15
15
  yml: YmlRuleset,
16
16
  };
17
- export default rulesets;
18
17
  //# sourceMappingURL=rulesets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rulesets.js","sourceRoot":"","sources":["../src/rulesets.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CACP,CAAC;AAEX,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"rulesets.js","sourceRoot":"","sources":["../src/rulesets.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CACgC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linted",
3
- "version": "14.4.6-rc.9",
3
+ "version": "15.0.0-rc.10",
4
4
  "description": "Zero-config ESLint flat config factory for (strict, agglutinative) entire-stack formatting and linting: TypeScript, JavaScript, Svelte, HTML, (Tailwind) CSS, Mocha, JSON(C), and sadly YAML.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@eslinted/core": "~0.0.1",
55
+ "@eslinted/core": "~0.4.1",
56
56
  "@html-eslint/eslint-plugin": "~0.25.0",
57
57
  "@html-eslint/parser": "~0.25.0",
58
58
  "@stylistic/eslint-plugin": "~2.3.0",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "eslint": "~8.57.0",
72
- "linted": "~14.4.6-rc.8",
72
+ "linted": "~15.0.0-rc.8",
73
73
  "npm-run-all": "^4.1.5",
74
74
  "typescript": "^5.5.3"
75
75
  },
@@ -0,0 +1,22 @@
1
+ import type { Scope } from "@eslinted/core";
2
+
3
+ export default {
4
+ js: ["**/*.config.js"],
5
+ ts: [
6
+ "**/*.config.ts",
7
+ "src/**/*.ts",
8
+ "types/**/*.d.ts",
9
+ ],
10
+ svelte: ["src/**/*.svelte"],
11
+ html: ["src/**/*.html"],
12
+ json: ["**/*.json"],
13
+ jsonc: [
14
+ "**/*.jsonc",
15
+ "**/tsconfig.json",
16
+ ],
17
+ yml: [
18
+ "**/*.yml",
19
+ "**/*.yaml",
20
+ ".github/workflows/*.yml",
21
+ ],
22
+ } as const satisfies Record<Scope, string[]>;
package/src/index.ts CHANGED
@@ -1,61 +1,23 @@
1
1
  import core from "@eslinted/core";
2
- import files from "./files.js";
2
+ import defaults from "./defaults.js";
3
3
  import parsers from "./parsers.js";
4
4
  import plugins from "./plugins.js";
5
5
  import rulesets from "./rulesets.js";
6
- import type { Scopes } from "@eslinted/core";
6
+ import type { Scope } from "@eslinted/core";
7
7
  import type { Rule } from "@eslinted/core";
8
8
 
9
9
  export default function (
10
- scope: Partial<typeof files> = {},
11
- override: Partial<Record<`override${Capitalize<Scopes>}`, Rule["rules"]>> = {},
10
+ includes: Partial<typeof defaults> = {},
11
+ overrides: Partial<Record<Scope, Rule["rules"]>> = {},
12
12
  ) {
13
13
  try {
14
- const overridenRulesets: typeof rulesets = {
15
- js: rulesets.js.override(override.overrideJs),
16
- ts: rulesets.ts.override(override.overrideTs),
17
- svelte: rulesets.svelte.override(override.overrideSvelte),
18
- html: rulesets.html.override(override.overrideHtml),
19
- json: rulesets.json.override(override.overrideJson),
20
- jsonc: rulesets.jsonc.override(override.overrideJsonc),
21
- yml: rulesets.yml.override(override.overrideYml),
22
- };
23
- const combinedFiles = {
24
- js: [
25
- ...files.js,
26
- ...scope.js ?? [],
27
- ],
28
- ts: [
29
- ...files.ts,
30
- ...scope.ts ?? [],
31
- ],
32
- svelte: [
33
- ...files.svelte,
34
- ...scope.svelte ?? [],
35
- ],
36
- html: [
37
- ...files.html,
38
- ...scope.html ?? [],
39
- ],
40
- json: [
41
- ...files.json,
42
- ...scope.json ?? [],
43
- ],
44
- jsonc: [
45
- ...files.jsonc,
46
- ...scope.jsonc ?? [],
47
- ],
48
- yml: [
49
- ...files.yml,
50
- ...scope.yml ?? [],
51
- ],
52
- };
53
-
54
14
  return core(
55
15
  plugins,
56
16
  parsers,
57
- combinedFiles,
58
- overridenRulesets,
17
+ defaults,
18
+ includes,
19
+ rulesets,
20
+ overrides,
59
21
  );
60
22
  }
61
23
  catch (e) {
package/src/parsers.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Scopes } from "./scopes.js";
1
+ import type { Scope } from "@eslinted/core";
2
2
  import ts from "@typescript-eslint/parser";
3
3
  import svelte from "svelte-eslint-parser";
4
4
  import html from "@html-eslint/parser";
@@ -12,4 +12,4 @@ export default {
12
12
  json: jsonc,
13
13
  jsonc,
14
14
  yml,
15
- } satisfies Partial<Record<Scopes, unknown>>;
15
+ } as const satisfies Partial<Record<Scope, unknown>>;
package/src/plugins.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Scopes } from "./scopes.js";
1
+ import type { Scope } from "@eslinted/core";
2
2
  import stylistic from "@stylistic/eslint-plugin";
3
3
  import ts from "@typescript-eslint/eslint-plugin";
4
4
  import svelte from "eslint-plugin-svelte";
@@ -6,7 +6,7 @@ import html from "@html-eslint/eslint-plugin";
6
6
  import jsonc from "eslint-plugin-jsonc";
7
7
  import yml from "eslint-plugin-yml";
8
8
 
9
- const Plugins = {
9
+ export default {
10
10
  js: { "@stylistic": stylistic },
11
11
  ts: {
12
12
  "@stylistic": stylistic,
@@ -21,12 +21,4 @@ const Plugins = {
21
21
  json: { jsonc },
22
22
  jsonc: { jsonc },
23
23
  yml: { yml },
24
- } satisfies Record<
25
- Scopes,
26
- Record<
27
- string,
28
- { configs: unknown }
29
- >
30
- >;
31
-
32
- export default Plugins;
24
+ } as const satisfies Record<Scope, Record<string, { configs: unknown }>>;
@@ -5,8 +5,8 @@ import {
5
5
  NEVER,
6
6
  ALWAYS,
7
7
  AS_NEEDED,
8
+ CONSECUTIVE,
8
9
  ALL,
9
- MULTI,
10
10
  BOTH,
11
11
  } from "../state.js";
12
12
  import { Enable } from "../id.js";
@@ -15,7 +15,7 @@ const JsEnable = new Rule(
15
15
  Enable,
16
16
  {
17
17
 
18
- /* #region Problems */
18
+ // #region Problems
19
19
  // [ https://eslint.org/docs/latest/rules/#possible-problems ]
20
20
  "array-callback-return": [
21
21
  ERROR,
@@ -25,12 +25,12 @@ const JsEnable = new Rule(
25
25
  allowVoid: true,
26
26
  },
27
27
  ],
28
- "constructor-super": ERROR, // tsc
28
+ "constructor-super": ERROR, /* tsc */
29
29
  "for-direction": ERROR,
30
30
  "getter-return": [
31
31
  ERROR,
32
32
  { allowImplicit: false },
33
- ], // tsc
33
+ ], /* tsc */
34
34
  "no-async-promise-executor": ERROR,
35
35
  "no-await-in-loop": ERROR,
36
36
  "no-class-assign": ERROR,
@@ -39,34 +39,30 @@ const JsEnable = new Rule(
39
39
  ERROR,
40
40
  ALWAYS,
41
41
  ],
42
-
43
- /* #endregion */
44
-
45
- /* #region Gunner */
46
- "no-const-assign": ERROR, // tsc
42
+ "no-const-assign": ERROR, /* tsc */
47
43
  "no-constant-binary-expression": ERROR,
48
44
  "no-constant-condition": [
49
45
  ERROR,
50
- { checkLoops: true },
46
+ { checkLoops: ALL },
51
47
  ],
52
48
  "no-constructor-return": ERROR,
53
49
  "no-control-regex": ERROR,
54
50
  "no-debugger": ERROR,
55
- "no-dupe-args": ERROR, // tsc
56
- "no-dupe-class-members": ERROR, // tsc -- TSLint:off: tsc
51
+ "no-dupe-args": ERROR, /* tsc */
52
+ "no-dupe-class-members": ERROR, /* tsc -- TSLint:off: tsc */
57
53
  "no-dupe-else-if": ERROR,
58
- "no-dupe-keys": ERROR, // tsc
54
+ "no-dupe-keys": ERROR, /* tsc */
59
55
  "no-duplicate-case": ERROR,
60
- "no-duplicate-imports": OFF, // BUG: breaks separation of TS type-only imports from value imports
56
+ "no-duplicate-imports": OFF, /* BUG: breaks separation of TS type-only imports from value imports */
61
57
  "no-empty-character-class": ERROR,
62
58
  "no-empty-pattern": [
63
59
  ERROR,
64
- { allowObjectPatternsAsParameters: true },
60
+ { allowObjectPatternsAsParameters: false },
65
61
  ],
66
62
  "no-ex-assign": ERROR,
67
- "no-fallthrough": OFF, // BUG:
68
- "no-func-assign": ERROR, // tsc
69
- "no-import-assign": ERROR, // tsc (except Object.assign())
63
+ "no-fallthrough": OFF, /* BUG: */
64
+ "no-func-assign": ERROR, /* tsc */
65
+ "no-import-assign": ERROR, /* tsc (except Object.assign()) */
70
66
  "no-inner-declarations": [
71
67
  ERROR,
72
68
  BOTH,
@@ -85,10 +81,10 @@ const JsEnable = new Rule(
85
81
  skipJSXText: true,
86
82
  },
87
83
  ],
88
- "no-loss-of-precision": ERROR, // TSLint
84
+ "no-loss-of-precision": ERROR, /* TSLint */
89
85
  "no-misleading-character-class": ERROR,
90
86
  "no-new-native-nonconstructor": ERROR,
91
- "no-obj-calls": ERROR, // tsc
87
+ "no-obj-calls": ERROR, /* tsc */
92
88
  "no-promise-executor-return": [
93
89
  ERROR,
94
90
  { allowVoid: true },
@@ -99,23 +95,23 @@ const JsEnable = new Rule(
99
95
  { props: true },
100
96
  ],
101
97
  "no-self-compare": ERROR,
102
- "no-setter-return": ERROR, // tsc
98
+ "no-setter-return": ERROR, /* tsc */
103
99
  "no-sparse-arrays": ERROR,
104
100
  "no-template-curly-in-string": ERROR,
105
- "no-this-before-super": ERROR, // tsc
106
- "no-undef": ERROR, // tsc
101
+ "no-this-before-super": ERROR, /* tsc */
102
+ "no-undef": ERROR, /* tsc */
107
103
  "no-unexpected-multiline": ERROR,
108
104
  "no-unmodified-loop-condition": ERROR,
109
- "no-unreachable": ERROR, // tsc
105
+ "no-unreachable": ERROR, /* tsc */
110
106
  "no-unreachable-loop": [
111
107
  ERROR,
112
- { ignore: [] }, // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
108
+ { ignore: [] }, /* WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement */
113
109
  ],
114
110
  "no-unsafe-finally": ERROR,
115
111
  "no-unsafe-negation": [
116
112
  ERROR,
117
113
  { enforceForOrderingRelations: true },
118
- ], // tsc
114
+ ], /* tsc */
119
115
  "no-unsafe-optional-chaining": [
120
116
  ERROR,
121
117
  { disallowArithmeticOperators: true },
@@ -129,7 +125,7 @@ const JsEnable = new Rule(
129
125
  caughtErrors: ALL,
130
126
  ignoreRestSiblings: false,
131
127
  },
132
- ], // TSLint
128
+ ], /* TSLint */
133
129
  "no-use-before-define": [
134
130
  ERROR,
135
131
  {
@@ -138,7 +134,7 @@ const JsEnable = new Rule(
138
134
  variables: true,
139
135
  allowNamedExports: false,
140
136
  },
141
- ], // TSLint
137
+ ], /* TSLint */
142
138
  "no-useless-backreference": ERROR,
143
139
  "require-atomic-updates": [
144
140
  ERROR,
@@ -156,7 +152,9 @@ const JsEnable = new Rule(
156
152
  { requireStringLiterals: true },
157
153
  ],
158
154
 
159
- // Suggestions
155
+ // #endregion
156
+
157
+ // # region Suggestions
160
158
  // [ https://eslint.org/docs/latest/rules/#suggestions ]
161
159
  "accessor-pairs": [
162
160
  ERROR,
@@ -172,58 +170,58 @@ const JsEnable = new Rule(
172
170
  { requireReturnForObjectLiteral: true },
173
171
  ],
174
172
  "block-scoped-var": ERROR,
175
- camelcase: OFF, // preference
176
- "capitalized-comments": OFF, // preference
177
- "class-methods-use-this": OFF, // preference -- TSLint
178
- complexity: OFF, // preference
173
+ camelcase: OFF, /* preference */
174
+ "capitalized-comments": OFF, /* preference */
175
+ "class-methods-use-this": OFF, /* preference -- TSLint */
176
+ complexity: OFF, /* preference */
179
177
  "consistent-return": [
180
178
  ERROR,
181
179
  { treatUndefinedAsUnspecified: false },
182
- ], // tsc -- TSLint:off: tsconfig: noImplicitReturns
183
- "consistent-this": [ERROR],
180
+ ], /* tsc -- TSLint:off: tsconfig: noImplicitReturns */
181
+ "consistent-this": ERROR,
184
182
  curly: [
185
183
  ERROR,
186
- MULTI,
184
+ "multi-or-nest",
187
185
  ],
188
- "default-case": OFF, // preference: don't care
186
+ "default-case": OFF, /* preference: don't care */
189
187
  "default-case-last": ERROR,
190
- "default-param-last": ERROR, // TSLint
188
+ "default-param-last": ERROR, /* TSLint */
191
189
  "dot-notation": [
192
190
  ERROR,
193
191
  { allowKeywords: true },
194
- ], // TSLint
192
+ ], /* TSLint */
195
193
  eqeqeq: [
196
194
  ERROR,
197
195
  ALWAYS,
198
196
  ],
199
- "func-name-matching": OFF, // preference
200
- "func-names": OFF, // preference
201
- "func-style": OFF, // preference
202
- "grouped-accessor-pairs": OFF, // preference -- BUG: requires adjacency, not as described in documentation
203
- "guard-for-in": ERROR,
204
- "id-denylist": OFF, // preference
205
- "id-length": OFF, // preference
206
- "id-match": OFF, // preference
197
+ "func-name-matching": OFF, /* preference */
198
+ "func-names": OFF, /* preference */
199
+ "func-style": OFF, /* preference */
200
+ "grouped-accessor-pairs": OFF, /* preference -- BUG: requires adjacency, not as described in documentation */
201
+ "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 */
202
+ "id-denylist": OFF, /* preference */
203
+ "id-length": OFF, /* preference */
204
+ "id-match": OFF, /* preference */
207
205
  "init-declarations": [
208
206
  ERROR,
209
207
  ALWAYS,
210
- ], // TSLint
208
+ ], /* TSLint */
211
209
  "logical-assignment-operators": [
212
210
  ERROR,
213
211
  ALWAYS,
214
212
  { enforceForIfStatements: true },
215
213
  ],
216
- "max-classes-per-file": OFF, // preference
217
- "max-depth": OFF, // preference
218
- "max-lines": OFF, // preference
219
- "max-lines-per-function": OFF, // preference
220
- "max-nested-callbacks": OFF, // preference
221
- "max-params": OFF, // preference -- TSLint:off: preference
222
- "max-statements": OFF, // preference
223
- "multiline-comment-style": OFF, // preference
224
- "new-cap": OFF, // preference -- breaks Scriptable
214
+ "max-classes-per-file": OFF, /* preference */
215
+ "max-depth": OFF, /* preference */
216
+ "max-lines": OFF, /* preference */
217
+ "max-lines-per-function": OFF, /* preference */
218
+ "max-nested-callbacks": OFF, /* preference */
219
+ "max-params": OFF, /* preference -- TSLint:off: preference */
220
+ "max-statements": OFF, /* preference */
221
+ "multiline-comment-style": OFF, /* preference */
222
+ "new-cap": OFF, /* preference -- breaks Scriptable */
225
223
  "no-alert": ERROR,
226
- "no-array-constructor": ERROR, // TSLint
224
+ "no-array-constructor": ERROR, /* TSLint */
227
225
  "no-bitwise": [
228
226
  ERROR,
229
227
  {
@@ -233,11 +231,11 @@ const JsEnable = new Rule(
233
231
  ],
234
232
  "no-caller": ERROR,
235
233
  "no-case-declarations": ERROR,
236
- "no-console": OFF, // preference -- breaks Node.js
234
+ "no-console": OFF, /* preference -- breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */
237
235
  "no-continue": ERROR,
238
236
  "no-delete-var": ERROR,
239
237
  "no-div-regex": ERROR,
240
- "no-else-return": OFF, // preference
238
+ "no-else-return": OFF, /* preference */
241
239
  "no-empty": [
242
240
  ERROR,
243
241
  { allowEmptyCatch: false },
@@ -245,7 +243,7 @@ const JsEnable = new Rule(
245
243
  "no-empty-function": [
246
244
  ERROR,
247
245
  { allow: ["constructors"] }, /** functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */
248
- ], // TSLint
246
+ ], /* TSLint */
249
247
  "no-empty-static-block": ERROR,
250
248
  "no-eq-null": ERROR,
251
249
  "no-eval": [
@@ -276,36 +274,26 @@ const JsEnable = new Rule(
276
274
  allow: [], /** "~" | "!!" | "+" | "- -" | "-" | "*" */
277
275
  },
278
276
  ],
279
- "no-implicit-globals": OFF, // investigate (breaks Scriptable? breaks Sveltekit?)
280
- "no-implied-eval": ERROR, // TSLint
281
- "no-inline-comments": OFF, // preference
277
+ "no-implicit-globals": OFF, /* investigate (breaks Scriptable? breaks Sveltekit?) */
278
+ "no-implied-eval": ERROR, /* TSLint */
279
+ "no-inline-comments": OFF, /* preference */
282
280
  "no-invalid-this": [
283
281
  ERROR,
284
282
  { capIsConstructor: false },
285
- ], // TSLint:off: tsconfig: { strict, noImplicitThis }
283
+ ], /* TSLint:off: tsconfig: { strict, noImplicitThis } */
286
284
  "no-iterator": ERROR,
287
285
  "no-label-var": ERROR,
288
286
  "no-lone-blocks": ERROR,
289
- "no-lonely-if": OFF, // preference
290
- "no-loop-func": ERROR, // TSLint
291
- "no-magic-numbers": [
292
- OFF,
293
- {
294
- ignore: [],
295
- ignoreArrayIndexes: true,
296
- ignoreDefaultValues: true,
297
- ignoreClassFieldInitialValues: true,
298
- enforceConst: true,
299
- detectObjects: false,
300
- },
301
- ], // TSLint
287
+ "no-lonely-if": OFF, /* preference */
288
+ "no-loop-func": ERROR, /* TSLint */
289
+ "no-magic-numbers": OFF, /* preference - breaks TypeScript number literals, even with most liberal exceptions */
302
290
  "no-multi-assign": [
303
291
  ERROR,
304
292
  { ignoreNonDeclaration: false },
305
293
  ],
306
294
  "no-multi-str": ERROR,
307
- "no-negated-condition": OFF, // preference
308
- "no-nested-ternary": OFF, // preference
295
+ "no-negated-condition": OFF, /* preference */
296
+ "no-nested-ternary": OFF, /* preference */
309
297
  "no-new": ERROR,
310
298
  "no-new-func": ERROR,
311
299
  "no-new-wrappers": ERROR,
@@ -329,29 +317,29 @@ const JsEnable = new Rule(
329
317
  "no-redeclare": [
330
318
  ERROR,
331
319
  { builtinGlobals: true },
332
- ], // tsc -- TSLint:off: tsc (let, const, -var)
333
- "no-regex-spaces": OFF, // preference
334
- "no-restricted-exports": OFF, // preference
335
- "no-restricted-globals": OFF, // preference
336
- "no-restricted-imports": OFF, // preference -- TSLint:off: preference
337
- "no-restricted-properties": OFF, // preference
338
- "no-restricted-syntax": OFF, // preference
320
+ ], /* tsc -- TSLint:off: tsc (let, const, -var) */
321
+ "no-regex-spaces": OFF, /* preference */
322
+ "no-restricted-exports": OFF, /* preference */
323
+ "no-restricted-globals": OFF, /* preference */
324
+ "no-restricted-imports": OFF, /* preference -- TSLint:off */
325
+ "no-restricted-properties": OFF, /* preference */
326
+ "no-restricted-syntax": OFF, /* preference */
339
327
  "no-return-assign": [
340
328
  ERROR,
341
- ALWAYS, // ALWAYS | "except-parens" (disallow assignments unless enclosed in parens)
329
+ ALWAYS, /* ALWAYS | "except-parens" (disallow assignments unless enclosed in parens) */
342
330
  ],
343
331
  "no-script-url": ERROR,
344
332
  "no-sequences": [
345
333
  ERROR,
346
334
  { allowInParentheses: true },
347
335
  ],
348
- "no-shadow": OFF, // investigate -- TSLint:off: investigate
336
+ "no-shadow": OFF, /* investigate -- TSLint:off: investigate */
349
337
  "no-shadow-restricted-names": ERROR,
350
- "no-ternary": OFF, // preference
351
- "no-throw-literal": ERROR, // TSLint
338
+ "no-ternary": OFF, /* preference */
339
+ "no-throw-literal": ERROR, /* TSLint */
352
340
  "no-undef-init": ERROR,
353
- "no-undefined": OFF, // investigate (breaks Scriptable? breaks Sveltekit?)
354
- "no-underscore-dangle": OFF, // preference
341
+ "no-undefined": OFF, /* investigate (breaks Scriptable? breaks Sveltekit?) */
342
+ "no-underscore-dangle": OFF, /* preference */
355
343
  "no-unneeded-ternary": [
356
344
  ERROR,
357
345
  { defaultAssignment: false },
@@ -364,7 +352,7 @@ const JsEnable = new Rule(
364
352
  allowTaggedTemplates: true,
365
353
  enforceForJSX: false,
366
354
  },
367
- ], // TSLint
355
+ ], /* TSLint */
368
356
  "no-unused-labels": ERROR,
369
357
  "no-useless-call": ERROR,
370
358
  "no-useless-catch": ERROR,
@@ -373,7 +361,7 @@ const JsEnable = new Rule(
373
361
  { enforceForClassMembers: true },
374
362
  ],
375
363
  "no-useless-concat": ERROR,
376
- "no-useless-constructor": ERROR, // TSLint
364
+ "no-useless-constructor": ERROR, /* TSLint */
377
365
  "no-useless-escape": ERROR,
378
366
  "no-useless-rename": [
379
367
  ERROR,
@@ -389,7 +377,7 @@ const JsEnable = new Rule(
389
377
  ERROR,
390
378
  { allowAsStatement: true },
391
379
  ],
392
- "no-warning-comments": OFF, // preference
380
+ "no-warning-comments": OFF, /* preference */
393
381
  "no-with": ERROR,
394
382
  "object-shorthand": [
395
383
  ERROR,
@@ -403,9 +391,9 @@ const JsEnable = new Rule(
403
391
  "one-var": [
404
392
  ERROR,
405
393
  {
406
- "var": NEVER,
407
- let: NEVER,
408
- "const": NEVER,
394
+ "var": CONSECUTIVE,
395
+ let: CONSECUTIVE,
396
+ "const": CONSECUTIVE,
409
397
  separateRequires: true,
410
398
  },
411
399
  ],
@@ -440,7 +428,7 @@ const JsEnable = new Rule(
440
428
  },
441
429
  },
442
430
  { enforceForRenamedProperties: true },
443
- ], // TSLint
431
+ ], /* TSLint */
444
432
  "prefer-exponentiation-operator": ERROR,
445
433
  "prefer-named-capture-group": OFF,
446
434
  "prefer-numeric-literals": ERROR,
@@ -453,7 +441,7 @@ const JsEnable = new Rule(
453
441
  "prefer-regex-literals": [
454
442
  ERROR,
455
443
  { disallowRedundantWrapping: true },
456
- ], // TSLint
444
+ ], /* TSLint */
457
445
  "prefer-rest-params": ERROR,
458
446
  "prefer-spread": ERROR,
459
447
  "prefer-template": ERROR,
@@ -461,14 +449,14 @@ const JsEnable = new Rule(
461
449
  ERROR,
462
450
  AS_NEEDED,
463
451
  ],
464
- "require-await": ERROR, // TSLint
452
+ "require-await": ERROR, /* TSLint */
465
453
  "require-unicode-regexp": ERROR,
466
454
  "require-yield": ERROR,
467
- "sort-imports": OFF, // preference
468
- "sort-keys": OFF, // preference
469
- "sort-vars": OFF, // preference
470
- strict: OFF, // preference
471
- "symbol-description": OFF, // preference
455
+ "sort-imports": OFF, /* preference */
456
+ "sort-keys": OFF, /* preference */
457
+ "sort-vars": OFF, /* preference */
458
+ strict: OFF, /* preference */
459
+ "symbol-description": OFF, /* preference */
472
460
  "vars-on-top": ERROR,
473
461
  yoda: [
474
462
  ERROR,
@@ -479,10 +467,13 @@ const JsEnable = new Rule(
479
467
  },
480
468
  ],
481
469
 
470
+ // #endregion
471
+
482
472
  // Layout & Formatting
483
473
  // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
484
- "line-comment-position": OFF, // preference
485
- "unicode-bom": OFF, // preference: don't care
474
+ "unicode-bom": OFF, /* preference: don't care */
475
+
476
+ // #endregion
486
477
  },
487
478
  );
488
479