@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,64 +1,64 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import * as State from "./state";
|
|
3
|
-
|
|
4
|
-
const state = { ...State };
|
|
5
|
-
|
|
6
|
-
describe(
|
|
7
|
-
"Strings:Level",
|
|
8
|
-
function () {
|
|
9
|
-
describe(
|
|
10
|
-
"shape",
|
|
11
|
-
function () {
|
|
12
|
-
it(
|
|
13
|
-
"is module (converted to object)",
|
|
14
|
-
function () {
|
|
15
|
-
state
|
|
16
|
-
.should.be
|
|
17
|
-
.an("object");
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
describe(
|
|
23
|
-
"count",
|
|
24
|
-
function () {
|
|
25
|
-
it(
|
|
26
|
-
"is 3",
|
|
27
|
-
function () {
|
|
28
|
-
Object.keys(state)
|
|
29
|
-
.should.have
|
|
30
|
-
.lengthOf(3);
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
},
|
|
34
|
-
);
|
|
35
|
-
describe(
|
|
36
|
-
"unique count",
|
|
37
|
-
function () {
|
|
38
|
-
it(
|
|
39
|
-
"is 3",
|
|
40
|
-
function () {
|
|
41
|
-
new Map(Object.entries(state))
|
|
42
|
-
.should.have
|
|
43
|
-
.lengthOf(3);
|
|
44
|
-
},
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
describe(
|
|
49
|
-
"values",
|
|
50
|
-
function () {
|
|
51
|
-
it(
|
|
52
|
-
"are: error | warn | off",
|
|
53
|
-
function () {
|
|
54
|
-
new Map(Object.entries(state))
|
|
55
|
-
.should
|
|
56
|
-
.include("error")
|
|
57
|
-
.and.include("warn")
|
|
58
|
-
.and.include("off");
|
|
59
|
-
},
|
|
60
|
-
);
|
|
61
|
-
},
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
);
|
|
1
|
+
import "chai/register-should.js";
|
|
2
|
+
import * as State from "./state";
|
|
3
|
+
|
|
4
|
+
const state = { ...State };
|
|
5
|
+
|
|
6
|
+
describe(
|
|
7
|
+
"Strings:Level",
|
|
8
|
+
function () {
|
|
9
|
+
describe(
|
|
10
|
+
"shape",
|
|
11
|
+
function () {
|
|
12
|
+
it(
|
|
13
|
+
"is module (converted to object)",
|
|
14
|
+
function () {
|
|
15
|
+
state
|
|
16
|
+
.should.be
|
|
17
|
+
.an("object");
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
describe(
|
|
23
|
+
"count",
|
|
24
|
+
function () {
|
|
25
|
+
it(
|
|
26
|
+
"is 3",
|
|
27
|
+
function () {
|
|
28
|
+
Object.keys(state)
|
|
29
|
+
.should.have
|
|
30
|
+
.lengthOf(3);
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
describe(
|
|
36
|
+
"unique count",
|
|
37
|
+
function () {
|
|
38
|
+
it(
|
|
39
|
+
"is 3",
|
|
40
|
+
function () {
|
|
41
|
+
new Map(Object.entries(state))
|
|
42
|
+
.should.have
|
|
43
|
+
.lengthOf(3);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
describe(
|
|
49
|
+
"values",
|
|
50
|
+
function () {
|
|
51
|
+
it(
|
|
52
|
+
"are: error | warn | off",
|
|
53
|
+
function () {
|
|
54
|
+
new Map(Object.entries(state))
|
|
55
|
+
.should
|
|
56
|
+
.include("error")
|
|
57
|
+
.and.include("warn")
|
|
58
|
+
.and.include("off");
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
2
|
-
OFF = "off",
|
|
3
|
-
ON = "error",
|
|
4
|
-
WARN = "warn";
|
|
1
|
+
export const
|
|
2
|
+
OFF = "off",
|
|
3
|
+
ON = "error",
|
|
4
|
+
WARN = "warn";
|
package/src/rules/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import js from "./scopes";
|
|
2
|
-
import ts from "./scopes/ts";
|
|
3
|
-
import mocha from "./scopes/mocha";
|
|
4
|
-
import svelte from "./scopes/svelte";
|
|
5
|
-
import html from "./scopes/html";
|
|
6
|
-
import css from "./scopes/css";
|
|
7
|
-
import json from "./scopes/json";
|
|
8
|
-
import jsonc from "./scopes/jsonc";
|
|
9
|
-
import jsoncc from "./scopes/jsoncc";
|
|
10
|
-
import yml from "./scopes/yml";
|
|
11
|
-
|
|
12
|
-
export const rules = {
|
|
13
|
-
js,
|
|
14
|
-
ts,
|
|
15
|
-
mocha,
|
|
16
|
-
svelte,
|
|
17
|
-
html,
|
|
18
|
-
css,
|
|
19
|
-
json,
|
|
20
|
-
jsonc,
|
|
21
|
-
jsoncc,
|
|
22
|
-
yml,
|
|
23
|
-
};
|
|
1
|
+
import js from "./scopes";
|
|
2
|
+
import ts from "./scopes/ts";
|
|
3
|
+
import mocha from "./scopes/mocha";
|
|
4
|
+
import svelte from "./scopes/svelte";
|
|
5
|
+
import html from "./scopes/html";
|
|
6
|
+
import css from "./scopes/css";
|
|
7
|
+
import json from "./scopes/json";
|
|
8
|
+
import jsonc from "./scopes/jsonc";
|
|
9
|
+
import jsoncc from "./scopes/jsoncc";
|
|
10
|
+
import yml from "./scopes/yml";
|
|
11
|
+
|
|
12
|
+
export const rules = {
|
|
13
|
+
js,
|
|
14
|
+
ts,
|
|
15
|
+
mocha,
|
|
16
|
+
svelte,
|
|
17
|
+
html,
|
|
18
|
+
css,
|
|
19
|
+
json,
|
|
20
|
+
jsonc,
|
|
21
|
+
jsoncc,
|
|
22
|
+
yml,
|
|
23
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ID,
|
|
3
|
-
// OFF,
|
|
4
|
-
ON,
|
|
5
|
-
} from "../../_strings";
|
|
6
|
-
|
|
7
|
-
export const CssEnable = {
|
|
8
|
-
id: ID.Enable.Enable,
|
|
9
|
-
rules: {
|
|
10
|
-
// DOC: https://github.com/eslint/css/tree/main/docs/rules
|
|
11
|
-
"css/no-duplicate-imports": ON,
|
|
12
|
-
"css/no-empty-blocks": ON,
|
|
13
|
-
"css/no-important": ON,
|
|
14
|
-
"css/no-invalid-at-rule-placement": ON,
|
|
15
|
-
"css/no-invalid-at-rules": ON,
|
|
16
|
-
"css/no-invalid-named-grid-areas": ON,
|
|
17
|
-
// "css/no-invalid-properties": OFF /* BUG: disabled with PREJUDICE (see commit: https://github.com/jimmy-zhening-luo/linted-defaults/commit/702e6632328813e84df92cade730469661ee85db) */,
|
|
18
|
-
"css/prefer-logical-properties": ON,
|
|
19
|
-
"css/relative-font-units": [
|
|
20
|
-
ON,
|
|
21
|
-
{
|
|
22
|
-
allowUnits: [
|
|
23
|
-
"rem",
|
|
24
|
-
"%",
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
"css/use-baseline": ON,
|
|
29
|
-
// "css/use-layers": OFF, /* not recommended by docs: https://github.com/eslint/css?tab=readme-ov-file#rules; also BUG: ESLint config inspector: css/use-layers: Invalid rule has no description [INVALID] */
|
|
30
|
-
} as const,
|
|
31
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ID,
|
|
3
|
+
// OFF,
|
|
4
|
+
ON,
|
|
5
|
+
} from "../../_strings";
|
|
6
|
+
|
|
7
|
+
export const CssEnable = {
|
|
8
|
+
id: ID.Enable.Enable,
|
|
9
|
+
rules: {
|
|
10
|
+
// DOC: https://github.com/eslint/css/tree/main/docs/rules
|
|
11
|
+
"css/no-duplicate-imports": ON,
|
|
12
|
+
"css/no-empty-blocks": ON,
|
|
13
|
+
"css/no-important": ON,
|
|
14
|
+
"css/no-invalid-at-rule-placement": ON,
|
|
15
|
+
"css/no-invalid-at-rules": ON,
|
|
16
|
+
"css/no-invalid-named-grid-areas": ON,
|
|
17
|
+
// "css/no-invalid-properties": OFF /* BUG: disabled with PREJUDICE (see commit: https://github.com/jimmy-zhening-luo/linted-defaults/commit/702e6632328813e84df92cade730469661ee85db) */,
|
|
18
|
+
"css/prefer-logical-properties": ON,
|
|
19
|
+
"css/relative-font-units": [
|
|
20
|
+
ON,
|
|
21
|
+
{
|
|
22
|
+
allowUnits: [
|
|
23
|
+
"rem",
|
|
24
|
+
"%",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
"css/use-baseline": ON,
|
|
29
|
+
// "css/use-layers": OFF, /* not recommended by docs: https://github.com/eslint/css?tab=readme-ov-file#rules; also BUG: ESLint config inspector: css/use-layers: Invalid rule has no description [INVALID] */
|
|
30
|
+
} as const,
|
|
31
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CssEnable } from "./enable";
|
|
2
|
-
|
|
3
|
-
export default [CssEnable];
|
|
1
|
+
import { CssEnable } from "./enable";
|
|
2
|
+
|
|
3
|
+
export default [CssEnable];
|