@eslinted/defaults 12.10.0 → 12.11.1
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/dist/index.d.ts +99 -912
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/index.d.ts +99 -492
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/scopes/enable.d.ts +0 -2
- package/dist/rules/scopes/enable.d.ts.map +1 -1
- package/dist/rules/scopes/enable.js +0 -3
- package/dist/rules/scopes/enable.js.map +1 -1
- package/dist/rules/scopes/enable.style.d.ts +24 -134
- package/dist/rules/scopes/enable.style.d.ts.map +1 -1
- package/dist/rules/scopes/enable.style.js +22 -192
- package/dist/rules/scopes/enable.style.js.map +1 -1
- package/dist/rules/scopes/index.d.ts +24 -136
- package/dist/rules/scopes/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/index.d.ts +7 -20
- package/dist/rules/scopes/json/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.d.ts +7 -20
- package/dist/rules/scopes/json/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.js +7 -41
- package/dist/rules/scopes/json/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.d.ts +0 -2
- package/dist/rules/scopes/mocha/chai/index.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.js +0 -2
- package/dist/rules/scopes/mocha/chai/index.js.map +1 -1
- package/dist/rules/scopes/mocha/enable.d.ts +3 -10
- package/dist/rules/scopes/mocha/enable.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/enable.js +3 -19
- package/dist/rules/scopes/mocha/enable.js.map +1 -1
- package/dist/rules/scopes/mocha/index.d.ts +3 -12
- package/dist/rules/scopes/mocha/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.d.ts +19 -91
- package/dist/rules/scopes/svelte/enable.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.js +20 -153
- package/dist/rules/scopes/svelte/enable.js.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.d.ts +2 -7
- package/dist/rules/scopes/svelte/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.js +2 -11
- package/dist/rules/scopes/svelte/extension/index.js.map +1 -1
- package/dist/rules/scopes/svelte/index.d.ts +21 -98
- package/dist/rules/scopes/svelte/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.d.ts +31 -163
- package/dist/rules/scopes/ts/enable.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.js +32 -380
- package/dist/rules/scopes/ts/enable.js.map +1 -1
- package/dist/rules/scopes/ts/extension/index.d.ts +1 -20
- package/dist/rules/scopes/ts/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/extension/index.js +2 -25
- package/dist/rules/scopes/ts/extension/index.js.map +1 -1
- package/dist/rules/scopes/ts/index.d.ts +32 -183
- package/dist/rules/scopes/ts/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/index.d.ts +12 -43
- package/dist/rules/scopes/yml/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.d.ts +5 -22
- package/dist/rules/scopes/yml/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.js +5 -36
- package/dist/rules/scopes/yml/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.d.ts +7 -21
- package/dist/rules/scopes/yml/plugin/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.js +8 -44
- package/dist/rules/scopes/yml/plugin/index.js.map +1 -1
- 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 -705
- package/src/rules/scopes/enable.ts +390 -401
- 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 -98
- 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 -20
- package/src/rules/scopes/mocha/disable.ts +13 -13
- package/src/rules/scopes/mocha/enable.ts +36 -52
- 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 -292
- package/src/rules/scopes/svelte/extension/disable.ts +14 -14
- package/src/rules/scopes/svelte/extension/index.ts +17 -27
- 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 -578
- package/src/rules/scopes/ts/extension/disable.ts +35 -35
- package/src/rules/scopes/ts/extension/index.ts +62 -87
- 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 -88
- package/src/rules/scopes/yml/plugin/index.ts +38 -88
- 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 -156
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HtmlEnablePlugin } from "./plugin";
|
|
2
|
-
|
|
3
|
-
export default [HtmlEnablePlugin];
|
|
1
|
+
import { HtmlEnablePlugin } from "./plugin";
|
|
2
|
+
|
|
3
|
+
export default [HtmlEnablePlugin];
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../../_strings";
|
|
6
|
-
|
|
7
|
-
export const HtmlEnablePlugin = {
|
|
8
|
-
id: ID.Enable.Plugin.Plugin,
|
|
9
|
-
rules: {
|
|
10
|
-
// #region BEST PRACTICE
|
|
11
|
-
// DOC: https://html-eslint.org/docs/rules#best-practice
|
|
12
|
-
// "@html-eslint/max-element-depth": OFF /* @preference: simply do not care */,
|
|
13
|
-
"@html-eslint/no-duplicate-attrs": ON,
|
|
14
|
-
"@html-eslint/no-duplicate-class": ON,
|
|
15
|
-
"@html-eslint/no-duplicate-id": ON,
|
|
16
|
-
"@html-eslint/no-duplicate-in-head": ON,
|
|
17
|
-
// "@html-eslint/no-inline-styles": OFF /* @CONFLICT: breaks Svelte app.html */,
|
|
18
|
-
"@html-eslint/no-invalid-entity": ON,
|
|
19
|
-
"@html-eslint/no-nested-interactive": ON,
|
|
20
|
-
"@html-eslint/no-obsolete-tags": ON,
|
|
21
|
-
// "@html-eslint/no-restricted-attr-values": OFF,
|
|
22
|
-
// "@html-eslint/no-restricted-attrs": OFF,
|
|
23
|
-
// "@html-eslint/no-script-style-type": OFF,
|
|
24
|
-
"@html-eslint/no-target-blank": ON,
|
|
25
|
-
// "@html-eslint/prefer-https": OFF /* @CONFLICT: not everything is https */,
|
|
26
|
-
// "@html-eslint/require-attrs": OFF,
|
|
27
|
-
"@html-eslint/require-button-type": ON,
|
|
28
|
-
"@html-eslint/require-closing-tags": ON,
|
|
29
|
-
"@html-eslint/require-doctype": ON,
|
|
30
|
-
// "@html-eslint/require-explicit-size": OFF /* preference, prefer using css */,
|
|
31
|
-
"@html-eslint/require-li-container": ON,
|
|
32
|
-
"@html-eslint/require-meta-charset": ON,
|
|
33
|
-
"@html-eslint/use-baseline": ON,
|
|
34
|
-
// #endregion
|
|
35
|
-
|
|
36
|
-
// #region SEO
|
|
37
|
-
// DOC: https://html-eslint.org/docs/rules#seo
|
|
38
|
-
"@html-eslint/no-multiple-h1": ON,
|
|
39
|
-
"@html-eslint/require-lang": ON,
|
|
40
|
-
// "@html-eslint/require-meta-description": OFF /* @CONFLICT: breaks Svelte which leaves meta descriptions to route leaves */,
|
|
41
|
-
// "@html-eslint/require-open-graph-protocol": OFF /* idk what this is, also it probably breaks Svelte */,
|
|
42
|
-
// "@html-eslint/require-title": OFF /* @CONFLICT: breaks Svelte which leaves title to route leaves */,
|
|
43
|
-
// #endregion
|
|
44
|
-
|
|
45
|
-
// #region ACCESSIBILITY
|
|
46
|
-
// DOC: https://html-eslint.org/docs/rules#accessibility
|
|
47
|
-
"@html-eslint/no-abstract-roles": ON,
|
|
48
|
-
"@html-eslint/no-accesskey-attrs": ON,
|
|
49
|
-
"@html-eslint/no-aria-hidden-body": ON,
|
|
50
|
-
"@html-eslint/no-aria-hidden-on-focusable": ON,
|
|
51
|
-
"@html-eslint/no-empty-headings": ON,
|
|
52
|
-
"@html-eslint/no-heading-inside-button": ON,
|
|
53
|
-
"@html-eslint/no-invalid-role": ON,
|
|
54
|
-
"@html-eslint/no-non-scalable-viewport": ON,
|
|
55
|
-
"@html-eslint/no-positive-tabindex": ON,
|
|
56
|
-
"@html-eslint/no-skip-heading-levels": ON,
|
|
57
|
-
"@html-eslint/require-form-method": ON,
|
|
58
|
-
"@html-eslint/require-frame-title": ON,
|
|
59
|
-
"@html-eslint/require-img-alt": ON,
|
|
60
|
-
"@html-eslint/require-input-label": ON,
|
|
61
|
-
"@html-eslint/require-meta-viewport": ON,
|
|
62
|
-
// #endregion
|
|
63
|
-
|
|
64
|
-
// #region STYLE
|
|
65
|
-
// DOC: https://html-eslint.org/docs/rules#style
|
|
66
|
-
"@html-eslint/attrs-newline": [
|
|
67
|
-
ON,
|
|
68
|
-
{
|
|
69
|
-
ifAttrsMoreThan: 0,
|
|
70
|
-
// closeStyle: "newline" /* sameline | @default newline */,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
"@html-eslint/element-newline": [
|
|
74
|
-
ON,
|
|
75
|
-
{
|
|
76
|
-
skip: ["head"],
|
|
77
|
-
inline: ["$inline"],
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
// "@html-eslint/id-naming-convention": OFF,
|
|
81
|
-
"@html-eslint/indent": [
|
|
82
|
-
ON,
|
|
83
|
-
2 /* tab | number | @default 4 */,
|
|
84
|
-
// {
|
|
85
|
-
// Attribute: 1 /* number | @default 1 */,
|
|
86
|
-
// tagChildrenIndent: {
|
|
87
|
-
// html: 0 /* number */,
|
|
88
|
-
// } /* @default {} */,
|
|
89
|
-
// },
|
|
90
|
-
] /* TBD: @CONFIGURE: indents for specific child tags: https://html-eslint.org/docs/rules/indent */,
|
|
91
|
-
"@html-eslint/lowercase": ON,
|
|
92
|
-
"@html-eslint/no-extra-spacing-attrs": [
|
|
93
|
-
ON,
|
|
94
|
-
{
|
|
95
|
-
// enforceBeforeSelfClose: false /* @default false */,
|
|
96
|
-
disallowMissing: true /* @default false */,
|
|
97
|
-
disallowTabs: true /* @default false */,
|
|
98
|
-
disallowInAssignment: true /* @default false */,
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
"@html-eslint/no-extra-spacing-text": ON,
|
|
102
|
-
"@html-eslint/no-multiple-empty-lines": [
|
|
103
|
-
ON,
|
|
104
|
-
{
|
|
105
|
-
max: 1 /* number | @default 2 */,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
"@html-eslint/no-trailing-spaces": ON,
|
|
109
|
-
"@html-eslint/quotes": ON,
|
|
110
|
-
// "@html-eslint/sort-attrs": OFF,
|
|
111
|
-
// #endregion
|
|
112
|
-
} as const,
|
|
113
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../../_strings";
|
|
6
|
+
|
|
7
|
+
export const HtmlEnablePlugin = {
|
|
8
|
+
id: ID.Enable.Plugin.Plugin,
|
|
9
|
+
rules: {
|
|
10
|
+
// #region BEST PRACTICE
|
|
11
|
+
// DOC: https://html-eslint.org/docs/rules#best-practice
|
|
12
|
+
// "@html-eslint/max-element-depth": OFF /* @preference: simply do not care */,
|
|
13
|
+
"@html-eslint/no-duplicate-attrs": ON,
|
|
14
|
+
"@html-eslint/no-duplicate-class": ON,
|
|
15
|
+
"@html-eslint/no-duplicate-id": ON,
|
|
16
|
+
"@html-eslint/no-duplicate-in-head": ON,
|
|
17
|
+
// "@html-eslint/no-inline-styles": OFF /* @CONFLICT: breaks Svelte app.html */,
|
|
18
|
+
"@html-eslint/no-invalid-entity": ON,
|
|
19
|
+
"@html-eslint/no-nested-interactive": ON,
|
|
20
|
+
"@html-eslint/no-obsolete-tags": ON,
|
|
21
|
+
// "@html-eslint/no-restricted-attr-values": OFF,
|
|
22
|
+
// "@html-eslint/no-restricted-attrs": OFF,
|
|
23
|
+
// "@html-eslint/no-script-style-type": OFF,
|
|
24
|
+
"@html-eslint/no-target-blank": ON,
|
|
25
|
+
// "@html-eslint/prefer-https": OFF /* @CONFLICT: not everything is https */,
|
|
26
|
+
// "@html-eslint/require-attrs": OFF,
|
|
27
|
+
"@html-eslint/require-button-type": ON,
|
|
28
|
+
"@html-eslint/require-closing-tags": ON,
|
|
29
|
+
"@html-eslint/require-doctype": ON,
|
|
30
|
+
// "@html-eslint/require-explicit-size": OFF /* preference, prefer using css */,
|
|
31
|
+
"@html-eslint/require-li-container": ON,
|
|
32
|
+
"@html-eslint/require-meta-charset": ON,
|
|
33
|
+
"@html-eslint/use-baseline": ON,
|
|
34
|
+
// #endregion
|
|
35
|
+
|
|
36
|
+
// #region SEO
|
|
37
|
+
// DOC: https://html-eslint.org/docs/rules#seo
|
|
38
|
+
"@html-eslint/no-multiple-h1": ON,
|
|
39
|
+
"@html-eslint/require-lang": ON,
|
|
40
|
+
// "@html-eslint/require-meta-description": OFF /* @CONFLICT: breaks Svelte which leaves meta descriptions to route leaves */,
|
|
41
|
+
// "@html-eslint/require-open-graph-protocol": OFF /* idk what this is, also it probably breaks Svelte */,
|
|
42
|
+
// "@html-eslint/require-title": OFF /* @CONFLICT: breaks Svelte which leaves title to route leaves */,
|
|
43
|
+
// #endregion
|
|
44
|
+
|
|
45
|
+
// #region ACCESSIBILITY
|
|
46
|
+
// DOC: https://html-eslint.org/docs/rules#accessibility
|
|
47
|
+
"@html-eslint/no-abstract-roles": ON,
|
|
48
|
+
"@html-eslint/no-accesskey-attrs": ON,
|
|
49
|
+
"@html-eslint/no-aria-hidden-body": ON,
|
|
50
|
+
"@html-eslint/no-aria-hidden-on-focusable": ON,
|
|
51
|
+
"@html-eslint/no-empty-headings": ON,
|
|
52
|
+
"@html-eslint/no-heading-inside-button": ON,
|
|
53
|
+
"@html-eslint/no-invalid-role": ON,
|
|
54
|
+
"@html-eslint/no-non-scalable-viewport": ON,
|
|
55
|
+
"@html-eslint/no-positive-tabindex": ON,
|
|
56
|
+
"@html-eslint/no-skip-heading-levels": ON,
|
|
57
|
+
"@html-eslint/require-form-method": ON,
|
|
58
|
+
"@html-eslint/require-frame-title": ON,
|
|
59
|
+
"@html-eslint/require-img-alt": ON,
|
|
60
|
+
"@html-eslint/require-input-label": ON,
|
|
61
|
+
"@html-eslint/require-meta-viewport": ON,
|
|
62
|
+
// #endregion
|
|
63
|
+
|
|
64
|
+
// #region STYLE
|
|
65
|
+
// DOC: https://html-eslint.org/docs/rules#style
|
|
66
|
+
"@html-eslint/attrs-newline": [
|
|
67
|
+
ON,
|
|
68
|
+
{
|
|
69
|
+
ifAttrsMoreThan: 0,
|
|
70
|
+
// closeStyle: "newline" /* sameline | @default newline */,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
"@html-eslint/element-newline": [
|
|
74
|
+
ON,
|
|
75
|
+
{
|
|
76
|
+
skip: ["head"],
|
|
77
|
+
inline: ["$inline"],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
// "@html-eslint/id-naming-convention": OFF,
|
|
81
|
+
"@html-eslint/indent": [
|
|
82
|
+
ON,
|
|
83
|
+
2 /* tab | number | @default 4 */,
|
|
84
|
+
// {
|
|
85
|
+
// Attribute: 1 /* number | @default 1 */,
|
|
86
|
+
// tagChildrenIndent: {
|
|
87
|
+
// html: 0 /* number */,
|
|
88
|
+
// } /* @default {} */,
|
|
89
|
+
// },
|
|
90
|
+
] /* TBD: @CONFIGURE: indents for specific child tags: https://html-eslint.org/docs/rules/indent */,
|
|
91
|
+
"@html-eslint/lowercase": ON,
|
|
92
|
+
"@html-eslint/no-extra-spacing-attrs": [
|
|
93
|
+
ON,
|
|
94
|
+
{
|
|
95
|
+
// enforceBeforeSelfClose: false /* @default false */,
|
|
96
|
+
disallowMissing: true /* @default false */,
|
|
97
|
+
disallowTabs: true /* @default false */,
|
|
98
|
+
disallowInAssignment: true /* @default false */,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
"@html-eslint/no-extra-spacing-text": ON,
|
|
102
|
+
"@html-eslint/no-multiple-empty-lines": [
|
|
103
|
+
ON,
|
|
104
|
+
{
|
|
105
|
+
max: 1 /* number | @default 2 */,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
"@html-eslint/no-trailing-spaces": ON,
|
|
109
|
+
"@html-eslint/quotes": ON,
|
|
110
|
+
// "@html-eslint/sort-attrs": OFF,
|
|
111
|
+
// #endregion
|
|
112
|
+
} as const,
|
|
113
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Enable } from "./enable";
|
|
2
|
-
import { EnableStyle } from "./enable.style";
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
Enable,
|
|
6
|
-
EnableStyle,
|
|
7
|
-
];
|
|
1
|
+
import { Enable } from "./enable";
|
|
2
|
+
import { EnableStyle } from "./enable.style";
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
Enable,
|
|
6
|
+
EnableStyle,
|
|
7
|
+
];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../_strings";
|
|
6
|
-
|
|
7
|
-
export const JsonEnable = {
|
|
8
|
-
id: ID.Enable.Enable,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://github.com/eslint/json?tab=readme-ov-file#rules
|
|
11
|
-
"json/no-duplicate-keys": ON /* replaces jsonc/no-dupe-keys */,
|
|
12
|
-
// "json/no-empty-keys": OFF /* preference: I use empty keys or keys with only whitespace sometimes, as does `package-lock.json` per DOC: "jsonc/no-dupe-keys": ON /* ESLint: json/no-duplicate-keys */,
|
|
13
|
-
"json/no-unsafe-values": ON,
|
|
14
|
-
"json/no-unnormalized-keys": ON,
|
|
15
|
-
// "json/sort-keys": OFF /* replaces jsonc/sort-keys BUT preference: I don't like sorting keys, it makes diffs harder to read, and I don't see the point of it in JSON */,
|
|
16
|
-
"json/top-level-interop": ON,
|
|
17
|
-
} as const,
|
|
18
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../_strings";
|
|
6
|
+
|
|
7
|
+
export const JsonEnable = {
|
|
8
|
+
id: ID.Enable.Enable,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://github.com/eslint/json?tab=readme-ov-file#rules
|
|
11
|
+
"json/no-duplicate-keys": ON /* replaces jsonc/no-dupe-keys */,
|
|
12
|
+
// "json/no-empty-keys": OFF /* preference: I use empty keys or keys with only whitespace sometimes, as does `package-lock.json` per DOC: "jsonc/no-dupe-keys": ON /* ESLint: json/no-duplicate-keys */,
|
|
13
|
+
"json/no-unsafe-values": ON,
|
|
14
|
+
"json/no-unnormalized-keys": ON,
|
|
15
|
+
// "json/sort-keys": OFF /* replaces jsonc/sort-keys BUT preference: I don't like sorting keys, it makes diffs harder to read, and I don't see the point of it in JSON */,
|
|
16
|
+
"json/top-level-interop": ON,
|
|
17
|
+
} as const,
|
|
18
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JsonEnable } from "./enable";
|
|
2
|
-
import { JsonEnablePlugin } from "./plugin";
|
|
3
|
-
import { JsonEnablePluginExtension } from "./plugin/extension";
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
JsonEnable,
|
|
7
|
-
JsonEnablePlugin,
|
|
8
|
-
JsonEnablePluginExtension,
|
|
9
|
-
];
|
|
1
|
+
import { JsonEnable } from "./enable";
|
|
2
|
+
import { JsonEnablePlugin } from "./plugin";
|
|
3
|
+
import { JsonEnablePluginExtension } from "./plugin/extension";
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
JsonEnable,
|
|
7
|
+
JsonEnablePlugin,
|
|
8
|
+
JsonEnablePluginExtension,
|
|
9
|
+
];
|
|
@@ -1,98 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
always,
|
|
6
|
-
consistent,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"jsonc/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"jsonc/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"jsonc/
|
|
44
|
-
ON,
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
] /*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
"jsonc/no-multi-str": ON,
|
|
64
|
-
"jsonc/no-octal-escape": ON,
|
|
65
|
-
"jsonc/no-octal": ON,
|
|
66
|
-
"jsonc/no-sparse-arrays": ON,
|
|
67
|
-
"jsonc/no-useless-escape": ON,
|
|
68
|
-
"jsonc/object-curly-newline": [
|
|
69
|
-
ON,
|
|
70
|
-
{
|
|
71
|
-
consistent: true,
|
|
72
|
-
multiline: true,
|
|
73
|
-
minProperties: 2,
|
|
74
|
-
},
|
|
75
|
-
] /* @OVERRIDE CHILD of @stylistic/object-curly-newline */,
|
|
76
|
-
"jsonc/object-curly-spacing": [
|
|
77
|
-
ON,
|
|
78
|
-
always,
|
|
79
|
-
{
|
|
80
|
-
arraysInObjects: true,
|
|
81
|
-
objectsInObjects: true,
|
|
82
|
-
},
|
|
83
|
-
] /* MUST match @stylistic/object-curly-spacing */,
|
|
84
|
-
"jsonc/object-property-newline": ON /* MUST match @stylistic/object-property-newline */,
|
|
85
|
-
"jsonc/quote-props": [
|
|
86
|
-
ON,
|
|
87
|
-
always,
|
|
88
|
-
],
|
|
89
|
-
"jsonc/quotes": [
|
|
90
|
-
ON,
|
|
91
|
-
double,
|
|
92
|
-
{
|
|
93
|
-
avoidEscape: false,
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
"jsonc/space-unary-ops": ON,
|
|
97
|
-
} as const,
|
|
98
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
always,
|
|
6
|
+
consistent,
|
|
7
|
+
} from "../../../_strings";
|
|
8
|
+
|
|
9
|
+
export const JsonEnablePluginExtension = {
|
|
10
|
+
id: ID.Enable.Plugin.Extension,
|
|
11
|
+
rules: {
|
|
12
|
+
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
|
13
|
+
// "jsonc/array-bracket-newline": OFF /* @OVERRIDE: BIGGER BUG: i mean this basically just doesn't work, even with multiple lines it will still fail| BUG: the spec says: `requires line breaks if the number of elements is at least the given integer. If this is 0, this condition will act the same as the option "always". If this is null (the default), this condition is disabled`. However, when null, the jsonc plugin actually errors when there are linebreaks with a single item | (was: MUST match @stylistic/array-bracket-newline) */,
|
|
14
|
+
"jsonc/array-bracket-spacing": ON /* MUST match @stylistic/array-bracket-spacing */,
|
|
15
|
+
"jsonc/array-element-newline": [
|
|
16
|
+
ON,
|
|
17
|
+
consistent,
|
|
18
|
+
] /* WOULD match @stylistic/array-element-newline, but jsonc plugin has slightly different options */,
|
|
19
|
+
"jsonc/comma-dangle": ON /* trailing commas are NOT allowed in JSON */,
|
|
20
|
+
"jsonc/comma-style": ON,
|
|
21
|
+
"jsonc/indent": [
|
|
22
|
+
ON,
|
|
23
|
+
2,
|
|
24
|
+
],
|
|
25
|
+
"jsonc/key-spacing": ON /* MUST match @stylistic/key-spacing */,
|
|
26
|
+
// "jsonc/no-dupe-keys": OFF /* ESLint: json/no-duplicate-keys */,
|
|
27
|
+
"jsonc/no-floating-decimal": ON,
|
|
28
|
+
"jsonc/no-irregular-whitespace": [
|
|
29
|
+
ON,
|
|
30
|
+
{
|
|
31
|
+
skipStrings: true,
|
|
32
|
+
skipComments: true,
|
|
33
|
+
skipRegExps: true,
|
|
34
|
+
skipTemplates: true,
|
|
35
|
+
skipJSXText: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
"jsonc/no-multi-str": ON,
|
|
39
|
+
"jsonc/no-octal-escape": ON,
|
|
40
|
+
"jsonc/no-octal": ON,
|
|
41
|
+
"jsonc/no-sparse-arrays": ON,
|
|
42
|
+
"jsonc/no-useless-escape": ON,
|
|
43
|
+
"jsonc/object-curly-newline": [
|
|
44
|
+
ON,
|
|
45
|
+
{
|
|
46
|
+
consistent: true,
|
|
47
|
+
multiline: true,
|
|
48
|
+
minProperties: 2 /* instead of 3 in stylistic */,
|
|
49
|
+
},
|
|
50
|
+
] /* @OVERRIDE @stylistic/object-curly-newline */,
|
|
51
|
+
"jsonc/object-curly-spacing": [
|
|
52
|
+
ON,
|
|
53
|
+
always,
|
|
54
|
+
] /* MUST match @stylistic/object-curly-spacing */,
|
|
55
|
+
"jsonc/object-property-newline": ON /* MUST match @stylistic/object-property-newline */,
|
|
56
|
+
"jsonc/quote-props": ON,
|
|
57
|
+
"jsonc/quotes": ON,
|
|
58
|
+
"jsonc/space-unary-ops": ON,
|
|
59
|
+
} as const,
|
|
60
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../../_strings";
|
|
6
|
-
|
|
7
|
-
export const JsonEnablePlugin = {
|
|
8
|
-
id: ID.Enable.Plugin.Plugin,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
11
|
-
// "jsonc/auto": OFF,
|
|
12
|
-
// "jsonc/key-name-casing": OFF,
|
|
13
|
-
"jsonc/no-bigint-literals": ON,
|
|
14
|
-
"jsonc/no-binary-expression": ON,
|
|
15
|
-
"jsonc/no-binary-numeric-literals": ON,
|
|
16
|
-
"jsonc/no-comments": ON /* comments are NOT allowed in JSON */,
|
|
17
|
-
"jsonc/no-escape-sequence-in-identifier": ON,
|
|
18
|
-
"jsonc/no-hexadecimal-numeric-literals": ON,
|
|
19
|
-
"jsonc/no-infinity": ON,
|
|
20
|
-
"jsonc/no-nan": ON,
|
|
21
|
-
"jsonc/no-number-props": ON,
|
|
22
|
-
"jsonc/no-numeric-separators": ON,
|
|
23
|
-
"jsonc/no-octal-numeric-literals": ON,
|
|
24
|
-
"jsonc/no-parenthesized": ON,
|
|
25
|
-
"jsonc/no-plus-sign": ON,
|
|
26
|
-
"jsonc/no-regexp-literals": ON,
|
|
27
|
-
"jsonc/no-template-literals": ON,
|
|
28
|
-
"jsonc/no-undefined-value": ON,
|
|
29
|
-
"jsonc/no-unicode-codepoint-escapes": ON,
|
|
30
|
-
// "jsonc/sort-array-values": OFF /* preference: this makes no sense, arrays can be ordered */,
|
|
31
|
-
// "jsonc/sort-keys": OFF /* ESLint: json/sort-keys BUT preference: only sort keys manually when I'd like */,
|
|
32
|
-
"jsonc/valid-json-number": ON,
|
|
33
|
-
"jsonc/vue-custom-block/no-parsing-error": ON,
|
|
34
|
-
} as const,
|
|
35
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../../_strings";
|
|
6
|
+
|
|
7
|
+
export const JsonEnablePlugin = {
|
|
8
|
+
id: ID.Enable.Plugin.Plugin,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
11
|
+
// "jsonc/auto": OFF,
|
|
12
|
+
// "jsonc/key-name-casing": OFF,
|
|
13
|
+
"jsonc/no-bigint-literals": ON,
|
|
14
|
+
"jsonc/no-binary-expression": ON,
|
|
15
|
+
"jsonc/no-binary-numeric-literals": ON,
|
|
16
|
+
"jsonc/no-comments": ON /* comments are NOT allowed in JSON */,
|
|
17
|
+
"jsonc/no-escape-sequence-in-identifier": ON,
|
|
18
|
+
"jsonc/no-hexadecimal-numeric-literals": ON,
|
|
19
|
+
"jsonc/no-infinity": ON,
|
|
20
|
+
"jsonc/no-nan": ON,
|
|
21
|
+
"jsonc/no-number-props": ON,
|
|
22
|
+
"jsonc/no-numeric-separators": ON,
|
|
23
|
+
"jsonc/no-octal-numeric-literals": ON,
|
|
24
|
+
"jsonc/no-parenthesized": ON,
|
|
25
|
+
"jsonc/no-plus-sign": ON,
|
|
26
|
+
"jsonc/no-regexp-literals": ON,
|
|
27
|
+
"jsonc/no-template-literals": ON,
|
|
28
|
+
"jsonc/no-undefined-value": ON,
|
|
29
|
+
"jsonc/no-unicode-codepoint-escapes": ON,
|
|
30
|
+
// "jsonc/sort-array-values": OFF /* preference: this makes no sense, arrays can be ordered */,
|
|
31
|
+
// "jsonc/sort-keys": OFF /* ESLint: json/sort-keys BUT preference: only sort keys manually when I'd like */,
|
|
32
|
+
"jsonc/valid-json-number": ON,
|
|
33
|
+
"jsonc/vue-custom-block/no-parsing-error": ON,
|
|
34
|
+
} as const,
|
|
35
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JsoncPluginDisable } from "./plugin";
|
|
2
|
-
|
|
3
|
-
export default [JsoncPluginDisable];
|
|
1
|
+
import { JsoncPluginDisable } from "./plugin";
|
|
2
|
+
|
|
3
|
+
export default [JsoncPluginDisable];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
OFF,
|
|
4
|
-
} from "../../../_strings";
|
|
5
|
-
|
|
6
|
-
export const JsoncPluginDisable = {
|
|
7
|
-
id: ID.Disable.Plugin.Plugin,
|
|
8
|
-
rules: {
|
|
9
|
-
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
10
|
-
"jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
|
|
11
|
-
} as const,
|
|
12
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
OFF,
|
|
4
|
+
} from "../../../_strings";
|
|
5
|
+
|
|
6
|
+
export const JsoncPluginDisable = {
|
|
7
|
+
id: ID.Disable.Plugin.Plugin,
|
|
8
|
+
rules: {
|
|
9
|
+
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
10
|
+
"jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
|
|
11
|
+
} as const,
|
|
12
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JsoncCommaPluginDisable } from "./plugin";
|
|
2
|
-
|
|
3
|
-
export default [JsoncCommaPluginDisable];
|
|
1
|
+
import { JsoncCommaPluginDisable } from "./plugin";
|
|
2
|
+
|
|
3
|
+
export default [JsoncCommaPluginDisable];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
ON,
|
|
4
|
-
always_multiline,
|
|
5
|
-
} from "../../../_strings";
|
|
6
|
-
|
|
7
|
-
export const JsoncCommaPluginDisable = {
|
|
8
|
-
id: ID.Disable.Plugin.Plugin,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
11
|
-
"jsonc/comma-dangle": [
|
|
12
|
-
ON,
|
|
13
|
-
always_multiline,
|
|
14
|
-
] /* trailing commas ARE allowed in JSONC */,
|
|
15
|
-
} as const,
|
|
16
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
ON,
|
|
4
|
+
always_multiline,
|
|
5
|
+
} from "../../../_strings";
|
|
6
|
+
|
|
7
|
+
export const JsoncCommaPluginDisable = {
|
|
8
|
+
id: ID.Disable.Plugin.Plugin,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
|
11
|
+
"jsonc/comma-dangle": [
|
|
12
|
+
ON,
|
|
13
|
+
always_multiline,
|
|
14
|
+
] /* trailing commas ARE allowed in JSONC */,
|
|
15
|
+
} as const,
|
|
16
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../../_strings";
|
|
6
|
-
|
|
7
|
-
export const MochaEnablePluginChaiExpect = {
|
|
8
|
-
id: `${ID.Enable.Plugin.Plugin}/chai/expect`,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://github.com/turbo87/eslint-plugin-chai-expect?tab=readme-ov-file#rules
|
|
11
|
-
"chai-expect/no-inner-compare": ON,
|
|
12
|
-
"chai-expect/no-inner-literal": ON,
|
|
13
|
-
"chai-expect/missing-assertion": ON,
|
|
14
|
-
// "chai-expect/terminating-properties": OFF,
|
|
15
|
-
} as const,
|
|
16
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../../_strings";
|
|
6
|
+
|
|
7
|
+
export const MochaEnablePluginChaiExpect = {
|
|
8
|
+
id: `${ID.Enable.Plugin.Plugin}/chai/expect`,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://github.com/turbo87/eslint-plugin-chai-expect?tab=readme-ov-file#rules
|
|
11
|
+
"chai-expect/no-inner-compare": ON,
|
|
12
|
+
"chai-expect/no-inner-literal": ON,
|
|
13
|
+
"chai-expect/missing-assertion": ON,
|
|
14
|
+
// "chai-expect/terminating-properties": OFF,
|
|
15
|
+
} as const,
|
|
16
|
+
};
|