linted 16.3.2-rc.0 → 16.3.3-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/RELEASE.yml +35 -0
- package/.github/workflows/rc.yml +35 -0
- package/LICENSE +21 -21
- package/README.md +388 -388
- package/SECURITY.md +9 -9
- package/dist/imports/plugins/index.d.ts.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/declarations/markdownlint/index.d.ts +3 -3
- package/src/declarations/markdownlint/parser.d.ts +9 -9
- package/src/declarations/mocha/index.d.ts +8 -8
- package/src/imports/index.ts +4 -4
- package/src/imports/parsers/index.ts +16 -16
- package/src/imports/plugins/index.ts +20 -20
- package/src/index.ts +34 -34
- package/src/statics/files/html/index.ts +1 -1
- package/src/statics/files/index.ts +22 -22
- package/src/statics/files/js/index.ts +1 -1
- package/src/statics/files/json/index.ts +1 -1
- package/src/statics/files/jsonc/index.ts +4 -4
- package/src/statics/files/md/index.ts +1 -1
- package/src/statics/files/mocha/index.ts +1 -1
- package/src/statics/files/svelte/index.ts +1 -1
- package/src/statics/files/ts/index.ts +5 -5
- package/src/statics/files/yml/index.ts +5 -5
- package/src/statics/index.ts +4 -4
- package/src/statics/rules/index.ts +22 -22
- package/src/statics/rules/presets/Html.ts +5 -5
- package/src/statics/rules/presets/Js.ts +5 -5
- package/src/statics/rules/presets/Json.ts +5 -5
- package/src/statics/rules/presets/Jsonc.ts +5 -5
- package/src/statics/rules/presets/Md.ts +4 -4
- package/src/statics/rules/presets/Mocha.ts +5 -5
- package/src/statics/rules/presets/Svelte.ts +16 -16
- package/src/statics/rules/presets/Ts.ts +14 -14
- package/src/statics/rules/presets/Yml.ts +5 -5
- package/src/statics/rules/presets/html/Enable.ts +5 -5
- package/src/statics/rules/presets/html/Recommended.ts +7 -7
- package/src/statics/rules/presets/index.ts +10 -10
- package/src/statics/rules/presets/js/Enable.ts +288 -288
- package/src/statics/rules/presets/js/EnableStylistic.ts +288 -288
- package/src/statics/rules/presets/json/Enable.ts +33 -33
- package/src/statics/rules/presets/json/EnableX.ts +51 -51
- package/src/statics/rules/presets/jsonc/OverrideJson.ts +6 -6
- package/src/statics/rules/presets/md/Enable.ts +23 -23
- package/src/statics/rules/presets/mocha/Enable.ts +5 -5
- package/src/statics/rules/presets/mocha/Recommended.ts +7 -7
- package/src/statics/rules/presets/svelte/DisableJS.ts +7 -7
- package/src/statics/rules/presets/svelte/DisableTS.ts +5 -5
- package/src/statics/rules/presets/svelte/DisableX.ts +6 -6
- package/src/statics/rules/presets/svelte/Enable.ts +130 -130
- package/src/statics/rules/presets/svelte/EnableX.ts +6 -6
- package/src/statics/rules/presets/ts/DisableCompiler.ts +23 -23
- package/src/statics/rules/presets/ts/DisableX.ts +34 -34
- package/src/statics/rules/presets/ts/Enable.ts +407 -407
- package/src/statics/rules/presets/ts/EnableX.ts +87 -87
- package/src/statics/rules/presets/yml/Enable.ts +30 -30
- package/src/statics/rules/presets/yml/EnableX.ts +18 -18
- package/src/statics/rules/strings/id/index.ts +17 -17
- package/src/statics/rules/strings/index.ts +6 -6
- package/src/statics/rules/strings/level/index.ts +5 -5
- package/src/statics/rules/strings/state/index.ts +55 -55
- package/tsconfig.json +160 -160
@@ -1,51 +1,51 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const {
|
4
|
-
Id: { EnableX },
|
5
|
-
Level: { ERROR },
|
6
|
-
State: {
|
7
|
-
NEVER,
|
8
|
-
ALWAYS,
|
9
|
-
CONSISTENT,
|
10
|
-
STRICT,
|
11
|
-
LAST,
|
12
|
-
DOUBLE,
|
13
|
-
},
|
14
|
-
} = Strings;
|
15
|
-
|
16
|
-
export default [
|
17
|
-
EnableX,
|
18
|
-
{
|
19
|
-
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
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 }],
|
27
|
-
"jsonc/no-dupe-keys": ERROR,
|
28
|
-
"jsonc/no-floating-decimal": ERROR,
|
29
|
-
"jsonc/no-irregular-whitespace": [
|
30
|
-
ERROR,
|
31
|
-
{
|
32
|
-
skipStrings: true,
|
33
|
-
skipComments: true,
|
34
|
-
skipRegExps: true,
|
35
|
-
skipTemplates: true,
|
36
|
-
skipJSXText: true,
|
37
|
-
},
|
38
|
-
],
|
39
|
-
"jsonc/no-multi-str": ERROR,
|
40
|
-
"jsonc/no-octal-escape": ERROR,
|
41
|
-
"jsonc/no-octal": ERROR,
|
42
|
-
"jsonc/no-sparse-arrays": ERROR,
|
43
|
-
"jsonc/no-useless-escape": ERROR,
|
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 }],
|
49
|
-
"jsonc/space-unary-ops": ERROR,
|
50
|
-
},
|
51
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const {
|
4
|
+
Id: { EnableX },
|
5
|
+
Level: { ERROR },
|
6
|
+
State: {
|
7
|
+
NEVER,
|
8
|
+
ALWAYS,
|
9
|
+
CONSISTENT,
|
10
|
+
STRICT,
|
11
|
+
LAST,
|
12
|
+
DOUBLE,
|
13
|
+
},
|
14
|
+
} = Strings;
|
15
|
+
|
16
|
+
export default [
|
17
|
+
EnableX,
|
18
|
+
{
|
19
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
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 }],
|
27
|
+
"jsonc/no-dupe-keys": ERROR,
|
28
|
+
"jsonc/no-floating-decimal": ERROR,
|
29
|
+
"jsonc/no-irregular-whitespace": [
|
30
|
+
ERROR,
|
31
|
+
{
|
32
|
+
skipStrings: true,
|
33
|
+
skipComments: true,
|
34
|
+
skipRegExps: true,
|
35
|
+
skipTemplates: true,
|
36
|
+
skipJSXText: true,
|
37
|
+
},
|
38
|
+
],
|
39
|
+
"jsonc/no-multi-str": ERROR,
|
40
|
+
"jsonc/no-octal-escape": ERROR,
|
41
|
+
"jsonc/no-octal": ERROR,
|
42
|
+
"jsonc/no-sparse-arrays": ERROR,
|
43
|
+
"jsonc/no-useless-escape": ERROR,
|
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 }],
|
49
|
+
"jsonc/space-unary-ops": ERROR,
|
50
|
+
},
|
51
|
+
] as const satisfies RuleEntry;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { Override }, Level: { ERROR, OFF }, State: { ALWAYS_MULTILINE } } = Strings;
|
4
|
-
|
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;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { Override }, Level: { ERROR, OFF }, State: { ALWAYS_MULTILINE } } = Strings;
|
4
|
+
|
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;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
|
4
|
-
|
5
|
-
export default [
|
6
|
-
Enable,
|
7
|
-
{
|
8
|
-
// Rules 1-50 supported by this shit plugin: https://gitlab.com/pawelbbdrozd/eslint-plugin-markdownlint/-/tree/main/lib/rules?ref_type=heads
|
9
|
-
// Rules 1-56 supported by this good plugin: https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md
|
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 }],
|
14
|
-
"markdownlint/md013": OFF,
|
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" }],
|
22
|
-
},
|
23
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
|
4
|
+
|
5
|
+
export default [
|
6
|
+
Enable,
|
7
|
+
{
|
8
|
+
// Rules 1-50 supported by this shit plugin: https://gitlab.com/pawelbbdrozd/eslint-plugin-markdownlint/-/tree/main/lib/rules?ref_type=heads
|
9
|
+
// Rules 1-56 supported by this good plugin: https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md
|
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 }],
|
14
|
+
"markdownlint/md013": OFF,
|
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" }],
|
22
|
+
},
|
23
|
+
] as const satisfies RuleEntry;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { Enable } } = Strings;
|
4
|
-
|
5
|
-
export default [Enable, {}] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { Enable } } = Strings;
|
4
|
+
|
5
|
+
export default [Enable, {}] as const satisfies RuleEntry;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import mocha from "eslint-plugin-mocha";
|
2
|
-
import { Strings, type RuleEntry } from "../index.js";
|
3
|
-
|
4
|
-
const { Id: { Recommended } } = Strings;
|
5
|
-
|
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;
|
1
|
+
import mocha from "eslint-plugin-mocha";
|
2
|
+
import { Strings, type RuleEntry } from "../index.js";
|
3
|
+
|
4
|
+
const { Id: { Recommended } } = Strings;
|
5
|
+
|
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;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Level: { OFF } } = Strings;
|
4
|
-
|
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;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Level: { OFF } } = Strings;
|
4
|
+
|
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;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Level: { OFF } } = Strings;
|
4
|
-
|
5
|
-
export default ["disable-ts", { "no-unused-vars": OFF /* ESLint Core */, "@typescript-eslint/no-unused-vars": OFF /* TS Extension */ }] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Level: { OFF } } = Strings;
|
4
|
+
|
5
|
+
export default ["disable-ts", { "no-unused-vars": OFF /* ESLint Core */, "@typescript-eslint/no-unused-vars": OFF /* TS Extension */ }] as const satisfies RuleEntry;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { DisableX }, Level: { OFF } } = Strings;
|
4
|
-
|
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;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { DisableX }, Level: { OFF } } = Strings;
|
4
|
+
|
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;
|
@@ -1,130 +1,130 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const {
|
4
|
-
Id: { Enable },
|
5
|
-
Level: { ERROR, OFF },
|
6
|
-
State: {
|
7
|
-
NEVER,
|
8
|
-
ALWAYS,
|
9
|
-
BELOW,
|
10
|
-
DOUBLE,
|
11
|
-
},
|
12
|
-
} = Strings;
|
13
|
-
|
14
|
-
export default [
|
15
|
-
Enable,
|
16
|
-
{
|
17
|
-
// #region Possible Errors
|
18
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
19
|
-
"svelte/infinite-reactive-loop": ERROR,
|
20
|
-
"svelte/no-dom-manipulating": ERROR,
|
21
|
-
"svelte/no-dupe-else-if-blocks": ERROR,
|
22
|
-
"svelte/no-dupe-on-directives": ERROR,
|
23
|
-
"svelte/no-dupe-style-properties": ERROR,
|
24
|
-
"svelte/no-dupe-use-directives": ERROR,
|
25
|
-
"svelte/no-dynamic-slot-name": ERROR,
|
26
|
-
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
27
|
-
"svelte/no-not-function-handler": ERROR,
|
28
|
-
"svelte/no-object-in-text-mustaches": ERROR,
|
29
|
-
"svelte/no-reactive-reassign": [ERROR, { props: true }],
|
30
|
-
"svelte/no-shorthand-style-property-overrides": ERROR,
|
31
|
-
"svelte/no-store-async": ERROR,
|
32
|
-
"svelte/no-unknown-style-directive-property": [ERROR, { ignorePrefixed: true }],
|
33
|
-
"svelte/require-store-callbacks-use-set-param": ERROR,
|
34
|
-
"svelte/require-store-reactive-access": ERROR,
|
35
|
-
"svelte/valid-compile": [ERROR, { ignoreWarnings: false }],
|
36
|
-
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
37
|
-
|
38
|
-
// #endregion
|
39
|
-
|
40
|
-
// #region Security
|
41
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
42
|
-
"svelte/no-at-html-tags": ERROR,
|
43
|
-
"svelte/no-target-blank": [ERROR, { allowReferrer: false, enforceDynamicLinks: ALWAYS }],
|
44
|
-
|
45
|
-
// #endregion
|
46
|
-
|
47
|
-
// #region Best Practices
|
48
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
49
|
-
"svelte/block-lang": [
|
50
|
-
ERROR,
|
51
|
-
{
|
52
|
-
enforceScriptPresent: true,
|
53
|
-
enforceStylePresent: false,
|
54
|
-
script: ["ts"],
|
55
|
-
style: ["css", "scss"],
|
56
|
-
},
|
57
|
-
], /* INVESTIGATE: */
|
58
|
-
"svelte/button-has-type": [ERROR, { button: true, submit: true, reset: true }],
|
59
|
-
"svelte/no-at-debug-tags": ERROR,
|
60
|
-
"svelte/no-ignored-unsubscribe": ERROR,
|
61
|
-
"svelte/no-immutable-reactive-statements": ERROR,
|
62
|
-
"svelte/no-inline-styles": [ERROR, { allowTransitions: false }],
|
63
|
-
"svelte/no-reactive-functions": ERROR,
|
64
|
-
"svelte/no-reactive-literals": ERROR,
|
65
|
-
"svelte/no-svelte-internal": ERROR,
|
66
|
-
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
67
|
-
"svelte/no-unused-svelte-ignore": ERROR,
|
68
|
-
"svelte/no-useless-mustaches": [ERROR, { ignoreIncludesComment: false, ignoreStringEscape: false }],
|
69
|
-
"svelte/prefer-destructured-store-props": ERROR,
|
70
|
-
"svelte/require-each-key": ERROR,
|
71
|
-
"svelte/require-event-dispatcher-types": ERROR,
|
72
|
-
"svelte/require-optimized-style-attribute": ERROR,
|
73
|
-
"svelte/require-stores-init": ERROR,
|
74
|
-
"svelte/valid-each-key": ERROR,
|
75
|
-
|
76
|
-
// #endregion
|
77
|
-
|
78
|
-
// #region Style
|
79
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
80
|
-
"svelte/derived-has-same-inputs-outputs": ERROR,
|
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 } }],
|
84
|
-
"svelte/html-self-closing": [
|
85
|
-
ERROR,
|
86
|
-
{
|
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" */,
|
91
|
-
},
|
92
|
-
],
|
93
|
-
"svelte/indent": [ERROR, { indent: 2, switchCase: 1, alignAttributesVertically: true }],
|
94
|
-
"svelte/max-attributes-per-line": [ERROR, { multiline: 1, singleline: 1 }],
|
95
|
-
"svelte/mustache-spacing": [
|
96
|
-
ERROR,
|
97
|
-
{
|
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" */ },
|
102
|
-
},
|
103
|
-
],
|
104
|
-
"svelte/no-extra-reactive-curlies": ERROR,
|
105
|
-
"svelte/no-restricted-html-elements": OFF,
|
106
|
-
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
107
|
-
"svelte/prefer-class-directive": [ERROR, { prefer: "empty" }],
|
108
|
-
"svelte/prefer-style-directive": ERROR,
|
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
|
115
|
-
|
116
|
-
// #region svelte-kit
|
117
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
118
|
-
"svelte/no-goto-without-base": ERROR,
|
119
|
-
|
120
|
-
// #endregion
|
121
|
-
|
122
|
-
// #region System (REQUIRED)
|
123
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
124
|
-
"svelte/comment-directive": [ERROR, { reportUnusedDisableDirectives: true }],
|
125
|
-
"svelte/system": ERROR,
|
126
|
-
|
127
|
-
// #endregion
|
128
|
-
|
129
|
-
},
|
130
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const {
|
4
|
+
Id: { Enable },
|
5
|
+
Level: { ERROR, OFF },
|
6
|
+
State: {
|
7
|
+
NEVER,
|
8
|
+
ALWAYS,
|
9
|
+
BELOW,
|
10
|
+
DOUBLE,
|
11
|
+
},
|
12
|
+
} = Strings;
|
13
|
+
|
14
|
+
export default [
|
15
|
+
Enable,
|
16
|
+
{
|
17
|
+
// #region Possible Errors
|
18
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
19
|
+
"svelte/infinite-reactive-loop": ERROR,
|
20
|
+
"svelte/no-dom-manipulating": ERROR,
|
21
|
+
"svelte/no-dupe-else-if-blocks": ERROR,
|
22
|
+
"svelte/no-dupe-on-directives": ERROR,
|
23
|
+
"svelte/no-dupe-style-properties": ERROR,
|
24
|
+
"svelte/no-dupe-use-directives": ERROR,
|
25
|
+
"svelte/no-dynamic-slot-name": ERROR,
|
26
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
27
|
+
"svelte/no-not-function-handler": ERROR,
|
28
|
+
"svelte/no-object-in-text-mustaches": ERROR,
|
29
|
+
"svelte/no-reactive-reassign": [ERROR, { props: true }],
|
30
|
+
"svelte/no-shorthand-style-property-overrides": ERROR,
|
31
|
+
"svelte/no-store-async": ERROR,
|
32
|
+
"svelte/no-unknown-style-directive-property": [ERROR, { ignorePrefixed: true }],
|
33
|
+
"svelte/require-store-callbacks-use-set-param": ERROR,
|
34
|
+
"svelte/require-store-reactive-access": ERROR,
|
35
|
+
"svelte/valid-compile": [ERROR, { ignoreWarnings: false }],
|
36
|
+
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
37
|
+
|
38
|
+
// #endregion
|
39
|
+
|
40
|
+
// #region Security
|
41
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
42
|
+
"svelte/no-at-html-tags": ERROR,
|
43
|
+
"svelte/no-target-blank": [ERROR, { allowReferrer: false, enforceDynamicLinks: ALWAYS }],
|
44
|
+
|
45
|
+
// #endregion
|
46
|
+
|
47
|
+
// #region Best Practices
|
48
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
49
|
+
"svelte/block-lang": [
|
50
|
+
ERROR,
|
51
|
+
{
|
52
|
+
enforceScriptPresent: true,
|
53
|
+
enforceStylePresent: false,
|
54
|
+
script: ["ts"],
|
55
|
+
style: ["css", "scss"],
|
56
|
+
},
|
57
|
+
], /* INVESTIGATE: */
|
58
|
+
"svelte/button-has-type": [ERROR, { button: true, submit: true, reset: true }],
|
59
|
+
"svelte/no-at-debug-tags": ERROR,
|
60
|
+
"svelte/no-ignored-unsubscribe": ERROR,
|
61
|
+
"svelte/no-immutable-reactive-statements": ERROR,
|
62
|
+
"svelte/no-inline-styles": [ERROR, { allowTransitions: false }],
|
63
|
+
"svelte/no-reactive-functions": ERROR,
|
64
|
+
"svelte/no-reactive-literals": ERROR,
|
65
|
+
"svelte/no-svelte-internal": ERROR,
|
66
|
+
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
67
|
+
"svelte/no-unused-svelte-ignore": ERROR,
|
68
|
+
"svelte/no-useless-mustaches": [ERROR, { ignoreIncludesComment: false, ignoreStringEscape: false }],
|
69
|
+
"svelte/prefer-destructured-store-props": ERROR,
|
70
|
+
"svelte/require-each-key": ERROR,
|
71
|
+
"svelte/require-event-dispatcher-types": ERROR,
|
72
|
+
"svelte/require-optimized-style-attribute": ERROR,
|
73
|
+
"svelte/require-stores-init": ERROR,
|
74
|
+
"svelte/valid-each-key": ERROR,
|
75
|
+
|
76
|
+
// #endregion
|
77
|
+
|
78
|
+
// #region Style
|
79
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
80
|
+
"svelte/derived-has-same-inputs-outputs": ERROR,
|
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 } }],
|
84
|
+
"svelte/html-self-closing": [
|
85
|
+
ERROR,
|
86
|
+
{
|
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" */,
|
91
|
+
},
|
92
|
+
],
|
93
|
+
"svelte/indent": [ERROR, { indent: 2, switchCase: 1, alignAttributesVertically: true }],
|
94
|
+
"svelte/max-attributes-per-line": [ERROR, { multiline: 1, singleline: 1 }],
|
95
|
+
"svelte/mustache-spacing": [
|
96
|
+
ERROR,
|
97
|
+
{
|
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" */ },
|
102
|
+
},
|
103
|
+
],
|
104
|
+
"svelte/no-extra-reactive-curlies": ERROR,
|
105
|
+
"svelte/no-restricted-html-elements": OFF,
|
106
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
107
|
+
"svelte/prefer-class-directive": [ERROR, { prefer: "empty" }],
|
108
|
+
"svelte/prefer-style-directive": ERROR,
|
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
|
115
|
+
|
116
|
+
// #region svelte-kit
|
117
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
118
|
+
"svelte/no-goto-without-base": ERROR,
|
119
|
+
|
120
|
+
// #endregion
|
121
|
+
|
122
|
+
// #region System (REQUIRED)
|
123
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
124
|
+
"svelte/comment-directive": [ERROR, { reportUnusedDisableDirectives: true }],
|
125
|
+
"svelte/system": ERROR,
|
126
|
+
|
127
|
+
// #endregion
|
128
|
+
|
129
|
+
},
|
130
|
+
] as const satisfies RuleEntry;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { EnableX }, Level: { ERROR, OFF }, State: { ALLOW, BOTH } } = Strings;
|
4
|
-
|
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;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { EnableX }, Level: { ERROR, OFF }, State: { ALLOW, BOTH } } = Strings;
|
4
|
+
|
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;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Level: { OFF } } = Strings;
|
4
|
-
|
5
|
-
export default [
|
6
|
-
"disable-compiler",
|
7
|
-
{
|
8
|
-
"constructor-super": OFF,
|
9
|
-
"no-const-assign": OFF,
|
10
|
-
"no-dupe-args": OFF,
|
11
|
-
"no-dupe-class-members": OFF,
|
12
|
-
"no-dupe-keys": OFF,
|
13
|
-
"no-func-assign": OFF,
|
14
|
-
"no-obj-calls": OFF,
|
15
|
-
"no-setter-return": OFF,
|
16
|
-
"no-this-before-super": OFF,
|
17
|
-
"no-undef": OFF,
|
18
|
-
"no-unreachable": OFF,
|
19
|
-
"no-unsafe-negation": OFF,
|
20
|
-
"consistent-return": OFF,
|
21
|
-
"no-redeclare": OFF,
|
22
|
-
},
|
23
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Level: { OFF } } = Strings;
|
4
|
+
|
5
|
+
export default [
|
6
|
+
"disable-compiler",
|
7
|
+
{
|
8
|
+
"constructor-super": OFF,
|
9
|
+
"no-const-assign": OFF,
|
10
|
+
"no-dupe-args": OFF,
|
11
|
+
"no-dupe-class-members": OFF,
|
12
|
+
"no-dupe-keys": OFF,
|
13
|
+
"no-func-assign": OFF,
|
14
|
+
"no-obj-calls": OFF,
|
15
|
+
"no-setter-return": OFF,
|
16
|
+
"no-this-before-super": OFF,
|
17
|
+
"no-undef": OFF,
|
18
|
+
"no-unreachable": OFF,
|
19
|
+
"no-unsafe-negation": OFF,
|
20
|
+
"consistent-return": OFF,
|
21
|
+
"no-redeclare": OFF,
|
22
|
+
},
|
23
|
+
] as const satisfies RuleEntry;
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import { Strings, type RuleEntry } from "../index.js";
|
2
|
-
|
3
|
-
const { Id: { DisableX }, Level: { OFF } } = Strings;
|
4
|
-
|
5
|
-
export default [
|
6
|
-
DisableX,
|
7
|
-
{
|
8
|
-
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules ]
|
9
|
-
"class-methods-use-this": OFF,
|
10
|
-
"consistent-return": OFF,
|
11
|
-
"default-param-last": OFF,
|
12
|
-
"dot-notation": OFF,
|
13
|
-
"init-declarations": OFF,
|
14
|
-
"max-params": OFF,
|
15
|
-
"no-array-constructor": OFF,
|
16
|
-
"no-dupe-class-members": OFF,
|
17
|
-
"no-empty-function": OFF,
|
18
|
-
"no-implied-eval": OFF,
|
19
|
-
"no-invalid-this": OFF,
|
20
|
-
"no-loop-func": OFF,
|
21
|
-
"no-magic-numbers": OFF,
|
22
|
-
"no-redeclare": OFF,
|
23
|
-
"no-restricted-imports": OFF,
|
24
|
-
"no-shadow": OFF,
|
25
|
-
"no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
|
26
|
-
"no-unused-expressions": OFF,
|
27
|
-
"no-unused-vars": OFF,
|
28
|
-
"no-use-before-define": OFF,
|
29
|
-
"no-useless-constructor": OFF,
|
30
|
-
"prefer-destructuring": OFF,
|
31
|
-
"prefer-promise-reject-errors": OFF,
|
32
|
-
"require-await": OFF,
|
33
|
-
},
|
34
|
-
] as const satisfies RuleEntry;
|
1
|
+
import { Strings, type RuleEntry } from "../index.js";
|
2
|
+
|
3
|
+
const { Id: { DisableX }, Level: { OFF } } = Strings;
|
4
|
+
|
5
|
+
export default [
|
6
|
+
DisableX,
|
7
|
+
{
|
8
|
+
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules ]
|
9
|
+
"class-methods-use-this": OFF,
|
10
|
+
"consistent-return": OFF,
|
11
|
+
"default-param-last": OFF,
|
12
|
+
"dot-notation": OFF,
|
13
|
+
"init-declarations": OFF,
|
14
|
+
"max-params": OFF,
|
15
|
+
"no-array-constructor": OFF,
|
16
|
+
"no-dupe-class-members": OFF,
|
17
|
+
"no-empty-function": OFF,
|
18
|
+
"no-implied-eval": OFF,
|
19
|
+
"no-invalid-this": OFF,
|
20
|
+
"no-loop-func": OFF,
|
21
|
+
"no-magic-numbers": OFF,
|
22
|
+
"no-redeclare": OFF,
|
23
|
+
"no-restricted-imports": OFF,
|
24
|
+
"no-shadow": OFF,
|
25
|
+
"no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
|
26
|
+
"no-unused-expressions": OFF,
|
27
|
+
"no-unused-vars": OFF,
|
28
|
+
"no-use-before-define": OFF,
|
29
|
+
"no-useless-constructor": OFF,
|
30
|
+
"prefer-destructuring": OFF,
|
31
|
+
"prefer-promise-reject-errors": OFF,
|
32
|
+
"require-await": OFF,
|
33
|
+
},
|
34
|
+
] as const satisfies RuleEntry;
|