@eslinted/defaults 12.11.1 → 12.12.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.
- package/.github/workflows/RELEASE.yml +36 -36
- package/.github/workflows/rc.yml +36 -36
- package/.markdownlint.jsonc +97 -97
- package/.mocharc.yml +15 -15
- package/LICENSE +20 -20
- package/README.md +4 -4
- package/eslint.config.js +3 -3
- package/package.json +56 -56
- package/src/files/_factory/index.ts +76 -76
- package/src/files/_factory/project/index.ts +2 -2
- package/src/files/_factory/project/roots.ts +4 -4
- package/src/files/_factory/project/subroots.ts +8 -8
- package/src/files/index.ts +23 -23
- package/src/files/scopes/css.ts +5 -5
- package/src/files/scopes/html.ts +5 -5
- package/src/files/scopes/js.ts +5 -5
- package/src/files/scopes/json.ts +5 -5
- package/src/files/scopes/jsonc.ts +5 -5
- package/src/files/scopes/jsoncc.ts +9 -9
- package/src/files/scopes/mocha.ts +5 -5
- package/src/files/scopes/svelte.ts +5 -5
- package/src/files/scopes/ts.ts +5 -5
- package/src/files/scopes/yml.ts +8 -8
- package/src/ignores/global.ts +5 -5
- package/src/ignores/index.ts +25 -25
- package/src/ignores/scopes/css.ts +1 -1
- package/src/ignores/scopes/html.ts +1 -1
- package/src/ignores/scopes/js.ts +1 -1
- package/src/ignores/scopes/json.ts +1 -1
- package/src/ignores/scopes/jsonc.ts +1 -1
- package/src/ignores/scopes/jsoncc.ts +1 -1
- package/src/ignores/scopes/mocha.ts +1 -1
- package/src/ignores/scopes/svelte.ts +1 -1
- package/src/ignores/scopes/ts.ts +1 -1
- package/src/ignores/scopes/yml.ts +1 -1
- package/src/index.ts +10 -10
- package/src/rules/_strings/id.ts +21 -21
- package/src/rules/_strings/index.ts +3 -3
- package/src/rules/_strings/option.ts +30 -30
- package/src/rules/_strings/state.spec.ts +64 -64
- package/src/rules/_strings/state.ts +4 -4
- package/src/rules/index.ts +23 -23
- package/src/rules/scopes/css/enable.ts +31 -31
- package/src/rules/scopes/css/index.ts +3 -3
- package/src/rules/scopes/enable.style.ts +507 -507
- package/src/rules/scopes/enable.ts +390 -390
- package/src/rules/scopes/html/index.ts +3 -3
- package/src/rules/scopes/html/plugin/index.ts +113 -113
- package/src/rules/scopes/index.ts +7 -7
- package/src/rules/scopes/json/enable.ts +18 -18
- package/src/rules/scopes/json/index.ts +9 -9
- package/src/rules/scopes/json/plugin/extension.ts +60 -60
- package/src/rules/scopes/json/plugin/index.ts +35 -35
- package/src/rules/scopes/jsonc/index.ts +3 -3
- package/src/rules/scopes/jsonc/plugin/index.ts +12 -12
- package/src/rules/scopes/jsoncc/index.ts +3 -3
- package/src/rules/scopes/jsoncc/plugin/index.ts +16 -16
- package/src/rules/scopes/mocha/chai/expect.ts +16 -16
- package/src/rules/scopes/mocha/chai/index.ts +18 -18
- package/src/rules/scopes/mocha/disable.ts +13 -13
- package/src/rules/scopes/mocha/enable.ts +36 -36
- package/src/rules/scopes/mocha/index.ts +11 -11
- package/src/rules/scopes/svelte/disable.ts +19 -19
- package/src/rules/scopes/svelte/enable.ts +157 -157
- package/src/rules/scopes/svelte/extension/disable.ts +14 -14
- package/src/rules/scopes/svelte/extension/index.ts +17 -17
- package/src/rules/scopes/svelte/index.ts +11 -11
- package/src/rules/scopes/ts/disable.ts +30 -30
- package/src/rules/scopes/ts/enable.ts +188 -188
- package/src/rules/scopes/ts/extension/disable.ts +35 -35
- package/src/rules/scopes/ts/extension/index.ts +62 -62
- package/src/rules/scopes/ts/index.ts +11 -11
- package/src/rules/scopes/yml/index.ts +7 -7
- package/src/rules/scopes/yml/plugin/extension.ts +55 -55
- package/src/rules/scopes/yml/plugin/index.ts +38 -38
- package/src/settings/global/index.ts +6 -6
- package/src/settings/index.ts +7 -7
- package/src/settings/registry/index.ts +23 -23
- package/src/settings/registry/manifests/css.ts +9 -9
- package/src/settings/registry/manifests/html.ts +10 -10
- package/src/settings/registry/manifests/js.ts +8 -8
- package/src/settings/registry/manifests/json.ts +7 -7
- package/src/settings/registry/manifests/jsonc.ts +9 -9
- package/src/settings/registry/manifests/jsoncc.ts +9 -9
- package/src/settings/registry/manifests/mocha.ts +8 -8
- package/src/settings/registry/manifests/svelte.ts +10 -10
- package/src/settings/registry/manifests/ts.ts +30 -30
- package/src/settings/registry/manifests/yml.ts +9 -9
- package/tsconfig.json +75 -75
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
OFF,
|
|
4
|
-
} from "../../_strings";
|
|
5
|
-
|
|
6
|
-
export const MochaDisable = {
|
|
7
|
-
id: ID.Disable.Disable,
|
|
8
|
-
rules: {
|
|
9
|
-
"prefer-arrow-callback": OFF /* TS-capable */,
|
|
10
|
-
"no-unused-expressions": OFF /* INFO: looks like these guys got the hint too ;) https://github.com/ihordiachenko/eslint-plugin-chai-friendly/releases/tag/v1.1.0 */,
|
|
11
|
-
// "@typescript-eslint/no-unused-expressions": OFF /* ESLint now supports TS */,
|
|
12
|
-
} as const,
|
|
13
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
OFF,
|
|
4
|
+
} from "../../_strings";
|
|
5
|
+
|
|
6
|
+
export const MochaDisable = {
|
|
7
|
+
id: ID.Disable.Disable,
|
|
8
|
+
rules: {
|
|
9
|
+
"prefer-arrow-callback": OFF /* TS-capable */,
|
|
10
|
+
"no-unused-expressions": OFF /* INFO: looks like these guys got the hint too ;) https://github.com/ihordiachenko/eslint-plugin-chai-friendly/releases/tag/v1.1.0 */,
|
|
11
|
+
// "@typescript-eslint/no-unused-expressions": OFF /* ESLint now supports TS */,
|
|
12
|
+
} as const,
|
|
13
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../_strings";
|
|
6
|
-
|
|
7
|
-
export const MochaEnable = {
|
|
8
|
-
id: ID.Enable.Enable,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://github.com/lo1tuma/eslint-plugin-mocha/tree/main?tab=readme-ov-file#rules
|
|
11
|
-
// "mocha/consistent-interface": OFF /* unable, must choose BDD or TDD first */,
|
|
12
|
-
// "mocha/consistent-spacing-between-blocks": OFF,
|
|
13
|
-
"mocha/handle-done-callback": ON,
|
|
14
|
-
"mocha/max-top-level-suites": ON,
|
|
15
|
-
"mocha/no-async-suite": ON,
|
|
16
|
-
"mocha/no-empty-title": ON,
|
|
17
|
-
"mocha/no-exclusive-tests": ON,
|
|
18
|
-
"mocha/no-exports": ON,
|
|
19
|
-
"mocha/no-global-tests": ON,
|
|
20
|
-
// "mocha/no-hooks-for-single-case": OFF,
|
|
21
|
-
// "mocha/no-hooks": OFF,
|
|
22
|
-
"mocha/no-identical-title": ON,
|
|
23
|
-
"mocha/no-mocha-arrows": ON,
|
|
24
|
-
"mocha/no-nested-tests": ON,
|
|
25
|
-
"mocha/no-pending-tests": ON,
|
|
26
|
-
"mocha/no-return-and-callback": ON,
|
|
27
|
-
"mocha/no-return-from-async": ON,
|
|
28
|
-
// "mocha/no-setup-in-describe": OFF /* pointless and arbitrary */,
|
|
29
|
-
"mocha/no-sibling-hooks": ON,
|
|
30
|
-
// "mocha/no-synchronous-tests": OFF,
|
|
31
|
-
"mocha/no-top-level-hooks": ON,
|
|
32
|
-
"mocha/prefer-arrow-callback": ON /* MUST match ../js/enable.ts, which is TS-capable -- is this?? */,
|
|
33
|
-
// "mocha/valid-suite-title": OFF /* preference */,
|
|
34
|
-
// "mocha/valid-test-title": OFF /* preference */,
|
|
35
|
-
} as const,
|
|
36
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../_strings";
|
|
6
|
+
|
|
7
|
+
export const MochaEnable = {
|
|
8
|
+
id: ID.Enable.Enable,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://github.com/lo1tuma/eslint-plugin-mocha/tree/main?tab=readme-ov-file#rules
|
|
11
|
+
// "mocha/consistent-interface": OFF /* unable, must choose BDD or TDD first */,
|
|
12
|
+
// "mocha/consistent-spacing-between-blocks": OFF,
|
|
13
|
+
"mocha/handle-done-callback": ON,
|
|
14
|
+
"mocha/max-top-level-suites": ON,
|
|
15
|
+
"mocha/no-async-suite": ON,
|
|
16
|
+
"mocha/no-empty-title": ON,
|
|
17
|
+
"mocha/no-exclusive-tests": ON,
|
|
18
|
+
"mocha/no-exports": ON,
|
|
19
|
+
"mocha/no-global-tests": ON,
|
|
20
|
+
// "mocha/no-hooks-for-single-case": OFF,
|
|
21
|
+
// "mocha/no-hooks": OFF,
|
|
22
|
+
"mocha/no-identical-title": ON,
|
|
23
|
+
"mocha/no-mocha-arrows": ON,
|
|
24
|
+
"mocha/no-nested-tests": ON,
|
|
25
|
+
"mocha/no-pending-tests": ON,
|
|
26
|
+
"mocha/no-return-and-callback": ON,
|
|
27
|
+
"mocha/no-return-from-async": ON,
|
|
28
|
+
// "mocha/no-setup-in-describe": OFF /* pointless and arbitrary */,
|
|
29
|
+
"mocha/no-sibling-hooks": ON,
|
|
30
|
+
// "mocha/no-synchronous-tests": OFF,
|
|
31
|
+
"mocha/no-top-level-hooks": ON,
|
|
32
|
+
"mocha/prefer-arrow-callback": ON /* MUST match ../js/enable.ts, which is TS-capable -- is this?? */,
|
|
33
|
+
// "mocha/valid-suite-title": OFF /* preference */,
|
|
34
|
+
// "mocha/valid-test-title": OFF /* preference */,
|
|
35
|
+
} as const,
|
|
36
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MochaDisable } from "./disable";
|
|
2
|
-
import { MochaEnable } from "./enable";
|
|
3
|
-
import { MochaEnablePluginChai } from "./chai";
|
|
4
|
-
import { MochaEnablePluginChaiExpect } from "./chai/expect";
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
MochaDisable,
|
|
8
|
-
MochaEnable,
|
|
9
|
-
MochaEnablePluginChai,
|
|
10
|
-
MochaEnablePluginChaiExpect,
|
|
11
|
-
];
|
|
1
|
+
import { MochaDisable } from "./disable";
|
|
2
|
+
import { MochaEnable } from "./enable";
|
|
3
|
+
import { MochaEnablePluginChai } from "./chai";
|
|
4
|
+
import { MochaEnablePluginChaiExpect } from "./chai/expect";
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
MochaDisable,
|
|
8
|
+
MochaEnable,
|
|
9
|
+
MochaEnablePluginChai,
|
|
10
|
+
MochaEnablePluginChaiExpect,
|
|
11
|
+
];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
OFF,
|
|
4
|
-
} from "../../_strings";
|
|
5
|
-
|
|
6
|
-
export const SvelteDisable = {
|
|
7
|
-
id: ID.Disable.Disable,
|
|
8
|
-
rules: {
|
|
9
|
-
// ESLint core rules known to cause problems with `.svelte`.
|
|
10
|
-
// DOC: https://github.com/sveltejs/eslint-plugin-svelte/blob/ca37fbbe82d01019946e12eeb1b57c2a5736c018/packages/eslint-plugin-svelte/src/configs/base.ts
|
|
11
|
-
"no-inner-declarations": OFF /* The AST generated by svelte-eslint-parser will false positive because the root node of the script is not `Program`. */,
|
|
12
|
-
"no-self-assign": OFF /* Self assign is one of way to update reactive value in Svelte */,
|
|
13
|
-
"no-unused-vars": OFF /* breaks use of svelte global */,
|
|
14
|
-
"@typescript-eslint/no-unused-vars": OFF /* TS: breaks use of svelte global */,
|
|
15
|
-
"prefer-const": OFF /* svelte/prefer-const */,
|
|
16
|
-
// My own
|
|
17
|
-
"@stylistic/indent": OFF /* Conflicts with `svelte/indent` */,
|
|
18
|
-
} as const,
|
|
19
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
OFF,
|
|
4
|
+
} from "../../_strings";
|
|
5
|
+
|
|
6
|
+
export const SvelteDisable = {
|
|
7
|
+
id: ID.Disable.Disable,
|
|
8
|
+
rules: {
|
|
9
|
+
// ESLint core rules known to cause problems with `.svelte`.
|
|
10
|
+
// DOC: https://github.com/sveltejs/eslint-plugin-svelte/blob/ca37fbbe82d01019946e12eeb1b57c2a5736c018/packages/eslint-plugin-svelte/src/configs/base.ts
|
|
11
|
+
"no-inner-declarations": OFF /* The AST generated by svelte-eslint-parser will false positive because the root node of the script is not `Program`. */,
|
|
12
|
+
"no-self-assign": OFF /* Self assign is one of way to update reactive value in Svelte */,
|
|
13
|
+
"no-unused-vars": OFF /* breaks use of svelte global */,
|
|
14
|
+
"@typescript-eslint/no-unused-vars": OFF /* TS: breaks use of svelte global */,
|
|
15
|
+
"prefer-const": OFF /* svelte/prefer-const */,
|
|
16
|
+
// My own
|
|
17
|
+
"@stylistic/indent": OFF /* Conflicts with `svelte/indent` */,
|
|
18
|
+
} as const,
|
|
19
|
+
};
|
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
all,
|
|
6
|
-
below,
|
|
7
|
-
double,
|
|
8
|
-
never,
|
|
9
|
-
} from "../../_strings";
|
|
10
|
-
|
|
11
|
-
export const SvelteEnable = {
|
|
12
|
-
id: ID.Enable.Enable,
|
|
13
|
-
rules: {
|
|
14
|
-
// #region ERRORS
|
|
15
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
|
16
|
-
"svelte/infinite-reactive-loop": ON,
|
|
17
|
-
"svelte/no-dom-manipulating": ON,
|
|
18
|
-
"svelte/no-dupe-else-if-blocks": ON,
|
|
19
|
-
"svelte/no-dupe-on-directives": ON,
|
|
20
|
-
"svelte/no-dupe-style-properties": ON,
|
|
21
|
-
"svelte/no-dupe-use-directives": ON,
|
|
22
|
-
"svelte/no-not-function-handler": ON,
|
|
23
|
-
"svelte/no-object-in-text-mustaches": ON,
|
|
24
|
-
"svelte/no-raw-special-elements": ON,
|
|
25
|
-
"svelte/no-reactive-reassign": ON,
|
|
26
|
-
"svelte/no-shorthand-style-property-overrides": ON,
|
|
27
|
-
"svelte/no-store-async": ON,
|
|
28
|
-
"svelte/no-top-level-browser-globals": ON,
|
|
29
|
-
"svelte/no-unknown-style-directive-property": ON,
|
|
30
|
-
"svelte/prefer-svelte-reactivity": ON,
|
|
31
|
-
"svelte/require-store-callbacks-use-set-param": ON,
|
|
32
|
-
"svelte/require-store-reactive-access": ON,
|
|
33
|
-
"svelte/valid-compile": ON,
|
|
34
|
-
"svelte/valid-style-parse": ON,
|
|
35
|
-
// #endregion
|
|
36
|
-
|
|
37
|
-
// #region SECURITY
|
|
38
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
|
39
|
-
"svelte/no-at-html-tags": ON,
|
|
40
|
-
"svelte/no-target-blank": ON,
|
|
41
|
-
// #endregion
|
|
42
|
-
|
|
43
|
-
// #region BEST PRACTICES
|
|
44
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
|
45
|
-
"svelte/block-lang": [
|
|
46
|
-
ON,
|
|
47
|
-
{
|
|
48
|
-
script: ["ts"],
|
|
49
|
-
style: ["css"],
|
|
50
|
-
},
|
|
51
|
-
], /* INVESTIGATE: */
|
|
52
|
-
"svelte/button-has-type": ON,
|
|
53
|
-
"svelte/no-add-event-listener": ON,
|
|
54
|
-
"svelte/no-at-debug-tags": ON,
|
|
55
|
-
"svelte/no-ignored-unsubscribe": ON,
|
|
56
|
-
"svelte/no-immutable-reactive-statements": ON,
|
|
57
|
-
"svelte/no-inline-styles": ON,
|
|
58
|
-
"svelte/no-reactive-functions": ON,
|
|
59
|
-
"svelte/no-reactive-literals": ON,
|
|
60
|
-
"svelte/no-svelte-internal": ON,
|
|
61
|
-
"svelte/no-unnecessary-state-wrap": ON,
|
|
62
|
-
// "svelte/no-unused-class-name": OFF /* incompatible: breaks if css class is located in another file; BUG: ESLint error if array empty */,
|
|
63
|
-
"svelte/no-unused-props": [
|
|
64
|
-
ON,
|
|
65
|
-
{
|
|
66
|
-
checkImportedTypes: true,
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
"svelte/no-unused-svelte-ignore": ON,
|
|
70
|
-
"svelte/no-useless-children-snippet": ON,
|
|
71
|
-
"svelte/no-useless-mustaches": ON,
|
|
72
|
-
"svelte/prefer-const": [
|
|
73
|
-
ON,
|
|
74
|
-
{
|
|
75
|
-
destructuring: all,
|
|
76
|
-
},
|
|
77
|
-
] /* same options: prefer-const */,
|
|
78
|
-
"svelte/prefer-destructured-store-props": ON,
|
|
79
|
-
"svelte/prefer-writable-derived": ON,
|
|
80
|
-
"svelte/require-each-key": ON,
|
|
81
|
-
"svelte/require-event-dispatcher-types": ON,
|
|
82
|
-
"svelte/require-optimized-style-attribute": ON,
|
|
83
|
-
"svelte/require-stores-init": ON,
|
|
84
|
-
"svelte/valid-each-key": ON,
|
|
85
|
-
// #endregion
|
|
86
|
-
|
|
87
|
-
// #region STYLE
|
|
88
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
|
89
|
-
"svelte/consistent-selector-style": [
|
|
90
|
-
ON,
|
|
91
|
-
{
|
|
92
|
-
checkGlobal: true /* @default false */,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
"svelte/derived-has-same-inputs-outputs": ON,
|
|
96
|
-
"svelte/first-attribute-linebreak": [
|
|
97
|
-
ON,
|
|
98
|
-
{
|
|
99
|
-
singleline: below,
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
"svelte/html-closing-bracket-new-line": ON,
|
|
103
|
-
"svelte/html-closing-bracket-spacing": [
|
|
104
|
-
ON,
|
|
105
|
-
{
|
|
106
|
-
selfClosingTag: never,
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
"svelte/html-quotes": [
|
|
110
|
-
ON,
|
|
111
|
-
{
|
|
112
|
-
prefer: double /* @default ? */,
|
|
113
|
-
dynamic: {
|
|
114
|
-
avoidInvalidUnquotedInHTML: true,
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
"svelte/html-self-closing": ON,
|
|
119
|
-
"svelte/indent": ON,
|
|
120
|
-
"svelte/max-attributes-per-line": ON,
|
|
121
|
-
"svelte/mustache-spacing": ON,
|
|
122
|
-
"svelte/no-extra-reactive-curlies": ON,
|
|
123
|
-
// "svelte/no-restricted-html-elements": OFF,
|
|
124
|
-
"svelte/no-spaces-around-equal-signs-in-attribute": ON,
|
|
125
|
-
"svelte/prefer-class-directive": [
|
|
126
|
-
ON,
|
|
127
|
-
{
|
|
128
|
-
prefer: "empty",
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
"svelte/prefer-style-directive": ON,
|
|
132
|
-
"svelte/require-event-prefix": ON,
|
|
133
|
-
"svelte/shorthand-attribute": ON,
|
|
134
|
-
"svelte/shorthand-directive": ON,
|
|
135
|
-
// "svelte/sort-attributes": OFF /* INVESTIGATE: */,
|
|
136
|
-
"svelte/spaced-html-comment": ON /* INFO: does not have third object option (exceptions/markers), unlike @stylistic/spaced-comment */,
|
|
137
|
-
// #endregion
|
|
138
|
-
|
|
139
|
-
// #region SVELTE-KIT
|
|
140
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
|
141
|
-
"svelte/no-export-load-in-svelte-module-in-kit-pages": ON,
|
|
142
|
-
"svelte/no-navigation-without-base": [
|
|
143
|
-
ON,
|
|
144
|
-
{
|
|
145
|
-
ignoreLinks: true /* ignore <a> links; @default false */,
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
"svelte/valid-prop-names-in-kit-pages": ON,
|
|
149
|
-
// #endregion
|
|
150
|
-
|
|
151
|
-
// #region REQUIRED
|
|
152
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
|
153
|
-
"svelte/comment-directive": ON,
|
|
154
|
-
"svelte/system": ON,
|
|
155
|
-
// #endregion
|
|
156
|
-
} as const,
|
|
157
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
all,
|
|
6
|
+
below,
|
|
7
|
+
double,
|
|
8
|
+
never,
|
|
9
|
+
} from "../../_strings";
|
|
10
|
+
|
|
11
|
+
export const SvelteEnable = {
|
|
12
|
+
id: ID.Enable.Enable,
|
|
13
|
+
rules: {
|
|
14
|
+
// #region ERRORS
|
|
15
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
|
16
|
+
"svelte/infinite-reactive-loop": ON,
|
|
17
|
+
"svelte/no-dom-manipulating": ON,
|
|
18
|
+
"svelte/no-dupe-else-if-blocks": ON,
|
|
19
|
+
"svelte/no-dupe-on-directives": ON,
|
|
20
|
+
"svelte/no-dupe-style-properties": ON,
|
|
21
|
+
"svelte/no-dupe-use-directives": ON,
|
|
22
|
+
"svelte/no-not-function-handler": ON,
|
|
23
|
+
"svelte/no-object-in-text-mustaches": ON,
|
|
24
|
+
"svelte/no-raw-special-elements": ON,
|
|
25
|
+
"svelte/no-reactive-reassign": ON,
|
|
26
|
+
"svelte/no-shorthand-style-property-overrides": ON,
|
|
27
|
+
"svelte/no-store-async": ON,
|
|
28
|
+
"svelte/no-top-level-browser-globals": ON,
|
|
29
|
+
"svelte/no-unknown-style-directive-property": ON,
|
|
30
|
+
"svelte/prefer-svelte-reactivity": ON,
|
|
31
|
+
"svelte/require-store-callbacks-use-set-param": ON,
|
|
32
|
+
"svelte/require-store-reactive-access": ON,
|
|
33
|
+
"svelte/valid-compile": ON,
|
|
34
|
+
"svelte/valid-style-parse": ON,
|
|
35
|
+
// #endregion
|
|
36
|
+
|
|
37
|
+
// #region SECURITY
|
|
38
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
|
39
|
+
"svelte/no-at-html-tags": ON,
|
|
40
|
+
"svelte/no-target-blank": ON,
|
|
41
|
+
// #endregion
|
|
42
|
+
|
|
43
|
+
// #region BEST PRACTICES
|
|
44
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
|
45
|
+
"svelte/block-lang": [
|
|
46
|
+
ON,
|
|
47
|
+
{
|
|
48
|
+
script: ["ts"],
|
|
49
|
+
style: ["css"],
|
|
50
|
+
},
|
|
51
|
+
], /* INVESTIGATE: */
|
|
52
|
+
"svelte/button-has-type": ON,
|
|
53
|
+
"svelte/no-add-event-listener": ON,
|
|
54
|
+
"svelte/no-at-debug-tags": ON,
|
|
55
|
+
"svelte/no-ignored-unsubscribe": ON,
|
|
56
|
+
"svelte/no-immutable-reactive-statements": ON,
|
|
57
|
+
"svelte/no-inline-styles": ON,
|
|
58
|
+
"svelte/no-reactive-functions": ON,
|
|
59
|
+
"svelte/no-reactive-literals": ON,
|
|
60
|
+
"svelte/no-svelte-internal": ON,
|
|
61
|
+
"svelte/no-unnecessary-state-wrap": ON,
|
|
62
|
+
// "svelte/no-unused-class-name": OFF /* incompatible: breaks if css class is located in another file; BUG: ESLint error if array empty */,
|
|
63
|
+
"svelte/no-unused-props": [
|
|
64
|
+
ON,
|
|
65
|
+
{
|
|
66
|
+
checkImportedTypes: true,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
"svelte/no-unused-svelte-ignore": ON,
|
|
70
|
+
"svelte/no-useless-children-snippet": ON,
|
|
71
|
+
"svelte/no-useless-mustaches": ON,
|
|
72
|
+
"svelte/prefer-const": [
|
|
73
|
+
ON,
|
|
74
|
+
{
|
|
75
|
+
destructuring: all,
|
|
76
|
+
},
|
|
77
|
+
] /* same options: prefer-const */,
|
|
78
|
+
"svelte/prefer-destructured-store-props": ON,
|
|
79
|
+
"svelte/prefer-writable-derived": ON,
|
|
80
|
+
"svelte/require-each-key": ON,
|
|
81
|
+
"svelte/require-event-dispatcher-types": ON,
|
|
82
|
+
"svelte/require-optimized-style-attribute": ON,
|
|
83
|
+
"svelte/require-stores-init": ON,
|
|
84
|
+
"svelte/valid-each-key": ON,
|
|
85
|
+
// #endregion
|
|
86
|
+
|
|
87
|
+
// #region STYLE
|
|
88
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
|
89
|
+
"svelte/consistent-selector-style": [
|
|
90
|
+
ON,
|
|
91
|
+
{
|
|
92
|
+
checkGlobal: true /* @default false */,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
"svelte/derived-has-same-inputs-outputs": ON,
|
|
96
|
+
"svelte/first-attribute-linebreak": [
|
|
97
|
+
ON,
|
|
98
|
+
{
|
|
99
|
+
singleline: below,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
"svelte/html-closing-bracket-new-line": ON,
|
|
103
|
+
"svelte/html-closing-bracket-spacing": [
|
|
104
|
+
ON,
|
|
105
|
+
{
|
|
106
|
+
selfClosingTag: never,
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
"svelte/html-quotes": [
|
|
110
|
+
ON,
|
|
111
|
+
{
|
|
112
|
+
prefer: double /* @default ? */,
|
|
113
|
+
dynamic: {
|
|
114
|
+
avoidInvalidUnquotedInHTML: true,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
"svelte/html-self-closing": ON,
|
|
119
|
+
"svelte/indent": ON,
|
|
120
|
+
"svelte/max-attributes-per-line": ON,
|
|
121
|
+
"svelte/mustache-spacing": ON,
|
|
122
|
+
"svelte/no-extra-reactive-curlies": ON,
|
|
123
|
+
// "svelte/no-restricted-html-elements": OFF,
|
|
124
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": ON,
|
|
125
|
+
"svelte/prefer-class-directive": [
|
|
126
|
+
ON,
|
|
127
|
+
{
|
|
128
|
+
prefer: "empty",
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
"svelte/prefer-style-directive": ON,
|
|
132
|
+
"svelte/require-event-prefix": ON,
|
|
133
|
+
"svelte/shorthand-attribute": ON,
|
|
134
|
+
"svelte/shorthand-directive": ON,
|
|
135
|
+
// "svelte/sort-attributes": OFF /* INVESTIGATE: */,
|
|
136
|
+
"svelte/spaced-html-comment": ON /* INFO: does not have third object option (exceptions/markers), unlike @stylistic/spaced-comment */,
|
|
137
|
+
// #endregion
|
|
138
|
+
|
|
139
|
+
// #region SVELTE-KIT
|
|
140
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
|
141
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": ON,
|
|
142
|
+
"svelte/no-navigation-without-base": [
|
|
143
|
+
ON,
|
|
144
|
+
{
|
|
145
|
+
ignoreLinks: true /* ignore <a> links; @default false */,
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
"svelte/valid-prop-names-in-kit-pages": ON,
|
|
149
|
+
// #endregion
|
|
150
|
+
|
|
151
|
+
// #region REQUIRED
|
|
152
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
|
153
|
+
"svelte/comment-directive": ON,
|
|
154
|
+
"svelte/system": ON,
|
|
155
|
+
// #endregion
|
|
156
|
+
} as const,
|
|
157
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
OFF,
|
|
4
|
-
} from "../../../_strings";
|
|
5
|
-
|
|
6
|
-
export const SvelteDisableExtension = {
|
|
7
|
-
id: ID.Disable.Extension,
|
|
8
|
-
rules: {
|
|
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,
|
|
12
|
-
"@stylistic/no-trailing-spaces": OFF /* replaces `no-trailing-spaces` */,
|
|
13
|
-
} as const,
|
|
14
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
OFF,
|
|
4
|
+
} from "../../../_strings";
|
|
5
|
+
|
|
6
|
+
export const SvelteDisableExtension = {
|
|
7
|
+
id: ID.Disable.Extension,
|
|
8
|
+
rules: {
|
|
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,
|
|
12
|
+
"@stylistic/no-trailing-spaces": OFF /* replaces `no-trailing-spaces` */,
|
|
13
|
+
} as const,
|
|
14
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
ON,
|
|
4
|
-
both,
|
|
5
|
-
} from "../../../_strings";
|
|
6
|
-
|
|
7
|
-
export const SvelteEnableExtension = {
|
|
8
|
-
id: ID.Enable.Extension,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
|
11
|
-
"svelte/no-inner-declarations": [
|
|
12
|
-
ON,
|
|
13
|
-
both,
|
|
14
|
-
] /* same options: no-inner-declarations */,
|
|
15
|
-
"svelte/no-trailing-spaces": ON /* same options: @stylistic/no-trailing-spaces */,
|
|
16
|
-
} as const,
|
|
17
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
ON,
|
|
4
|
+
both,
|
|
5
|
+
} from "../../../_strings";
|
|
6
|
+
|
|
7
|
+
export const SvelteEnableExtension = {
|
|
8
|
+
id: ID.Enable.Extension,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
|
11
|
+
"svelte/no-inner-declarations": [
|
|
12
|
+
ON,
|
|
13
|
+
both,
|
|
14
|
+
] /* same options: no-inner-declarations */,
|
|
15
|
+
"svelte/no-trailing-spaces": ON /* same options: @stylistic/no-trailing-spaces */,
|
|
16
|
+
} as const,
|
|
17
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SvelteDisable } from "./disable";
|
|
2
|
-
import { SvelteDisableExtension } from "./extension/disable";
|
|
3
|
-
import { SvelteEnable } from "./enable";
|
|
4
|
-
import { SvelteEnableExtension } from "./extension";
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
SvelteDisable,
|
|
8
|
-
SvelteDisableExtension,
|
|
9
|
-
SvelteEnable,
|
|
10
|
-
SvelteEnableExtension,
|
|
11
|
-
];
|
|
1
|
+
import { SvelteDisable } from "./disable";
|
|
2
|
+
import { SvelteDisableExtension } from "./extension/disable";
|
|
3
|
+
import { SvelteEnable } from "./enable";
|
|
4
|
+
import { SvelteEnableExtension } from "./extension";
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
SvelteDisable,
|
|
8
|
+
SvelteDisableExtension,
|
|
9
|
+
SvelteEnable,
|
|
10
|
+
SvelteEnableExtension,
|
|
11
|
+
];
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
OFF,
|
|
4
|
-
} from "../../_strings";
|
|
5
|
-
|
|
6
|
-
export const TsDisable = {
|
|
7
|
-
id: ID.Disable.Disable,
|
|
8
|
-
rules: {
|
|
9
|
-
// Handled by TypeScript compiler
|
|
10
|
-
"consistent-return": OFF /* TSLint BUT tsc */,
|
|
11
|
-
"constructor-super": OFF,
|
|
12
|
-
"getter-return": OFF,
|
|
13
|
-
"no-class-assign": OFF,
|
|
14
|
-
"no-const-assign": OFF,
|
|
15
|
-
"no-dupe-args": OFF,
|
|
16
|
-
"no-dupe-class-members": OFF /* TS-capable BUT tsc */,
|
|
17
|
-
"no-dupe-keys": OFF,
|
|
18
|
-
"no-func-assign": OFF,
|
|
19
|
-
"no-import-assign": OFF,
|
|
20
|
-
"no-invalid-this": OFF /* TS-capable BUT tsc */,
|
|
21
|
-
"no-new-native-nonconstructor": OFF,
|
|
22
|
-
"no-obj-calls": OFF,
|
|
23
|
-
"no-redeclare": OFF /* TSLint BUT tsc */,
|
|
24
|
-
"no-setter-return": OFF,
|
|
25
|
-
"no-this-before-super": OFF,
|
|
26
|
-
"no-undef": OFF,
|
|
27
|
-
"no-unreachable": OFF,
|
|
28
|
-
"no-unsafe-negation": OFF,
|
|
29
|
-
} as const,
|
|
30
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
OFF,
|
|
4
|
+
} from "../../_strings";
|
|
5
|
+
|
|
6
|
+
export const TsDisable = {
|
|
7
|
+
id: ID.Disable.Disable,
|
|
8
|
+
rules: {
|
|
9
|
+
// Handled by TypeScript compiler
|
|
10
|
+
"consistent-return": OFF /* TSLint BUT tsc */,
|
|
11
|
+
"constructor-super": OFF,
|
|
12
|
+
"getter-return": OFF,
|
|
13
|
+
"no-class-assign": OFF,
|
|
14
|
+
"no-const-assign": OFF,
|
|
15
|
+
"no-dupe-args": OFF,
|
|
16
|
+
"no-dupe-class-members": OFF /* TS-capable BUT tsc */,
|
|
17
|
+
"no-dupe-keys": OFF,
|
|
18
|
+
"no-func-assign": OFF,
|
|
19
|
+
"no-import-assign": OFF,
|
|
20
|
+
"no-invalid-this": OFF /* TS-capable BUT tsc */,
|
|
21
|
+
"no-new-native-nonconstructor": OFF,
|
|
22
|
+
"no-obj-calls": OFF,
|
|
23
|
+
"no-redeclare": OFF /* TSLint BUT tsc */,
|
|
24
|
+
"no-setter-return": OFF,
|
|
25
|
+
"no-this-before-super": OFF,
|
|
26
|
+
"no-undef": OFF,
|
|
27
|
+
"no-unreachable": OFF,
|
|
28
|
+
"no-unsafe-negation": OFF,
|
|
29
|
+
} as const,
|
|
30
|
+
};
|