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