@eslinted/defaults 12.16.1-rc.1 → 12.16.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.
Files changed (88) hide show
  1. package/.github/workflows/RELEASE.yml +30 -30
  2. package/.github/workflows/rc.yml +30 -30
  3. package/.markdownlint.jsonc +97 -97
  4. package/.mocharc.yml +11 -11
  5. package/LICENSE +20 -20
  6. package/README.md +4 -4
  7. package/eslint.config.js +3 -3
  8. package/package.json +53 -54
  9. package/src/files/_factory/index.ts +76 -76
  10. package/src/files/_factory/project/index.ts +2 -2
  11. package/src/files/_factory/project/roots.ts +4 -4
  12. package/src/files/_factory/project/subroots.ts +8 -8
  13. package/src/files/css.ts +5 -5
  14. package/src/files/html.ts +5 -5
  15. package/src/files/index.ts +23 -23
  16. package/src/files/js.ts +5 -5
  17. package/src/files/json.ts +5 -5
  18. package/src/files/jsonc.ts +5 -5
  19. package/src/files/jsoncc.ts +9 -9
  20. package/src/files/mocha.ts +5 -5
  21. package/src/files/svelte.ts +5 -5
  22. package/src/files/ts.ts +5 -5
  23. package/src/files/yml.ts +8 -8
  24. package/src/ignores/base.ts +5 -5
  25. package/src/ignores/ignores/css.ts +1 -1
  26. package/src/ignores/ignores/html.ts +1 -1
  27. package/src/ignores/ignores/js.ts +1 -1
  28. package/src/ignores/ignores/json.ts +1 -1
  29. package/src/ignores/ignores/jsonc.ts +1 -1
  30. package/src/ignores/ignores/jsoncc.ts +1 -1
  31. package/src/ignores/ignores/mocha.ts +1 -1
  32. package/src/ignores/ignores/svelte.ts +1 -1
  33. package/src/ignores/ignores/ts.ts +1 -1
  34. package/src/ignores/ignores/yml.ts +1 -1
  35. package/src/ignores/index.ts +25 -25
  36. package/src/index.ts +10 -10
  37. package/src/rules/_strings/id.ts +21 -21
  38. package/src/rules/_strings/index.ts +3 -3
  39. package/src/rules/_strings/option.ts +30 -30
  40. package/src/rules/_strings/state.spec.ts +64 -64
  41. package/src/rules/_strings/state.ts +4 -4
  42. package/src/rules/css/enable.ts +31 -31
  43. package/src/rules/css/index.ts +3 -3
  44. package/src/rules/enable.ts +390 -390
  45. package/src/rules/html/index.ts +3 -3
  46. package/src/rules/html/plugin/index.ts +114 -114
  47. package/src/rules/index.ts +27 -27
  48. package/src/rules/json/enable.ts +18 -18
  49. package/src/rules/json/index.ts +9 -9
  50. package/src/rules/json/plugin/extension.ts +60 -60
  51. package/src/rules/json/plugin/index.ts +35 -35
  52. package/src/rules/jsonc/index.ts +3 -3
  53. package/src/rules/jsonc/plugin/index.ts +12 -12
  54. package/src/rules/jsoncc/index.ts +3 -3
  55. package/src/rules/jsoncc/plugin/index.ts +16 -16
  56. package/src/rules/mocha/chai/expect.ts +16 -16
  57. package/src/rules/mocha/chai/index.ts +18 -18
  58. package/src/rules/mocha/disable.ts +13 -13
  59. package/src/rules/mocha/enable.ts +36 -36
  60. package/src/rules/mocha/index.ts +11 -11
  61. package/src/rules/stylistic.ts +507 -507
  62. package/src/rules/svelte/disable.ts +19 -19
  63. package/src/rules/svelte/enable.ts +157 -157
  64. package/src/rules/svelte/extension/disable.ts +14 -14
  65. package/src/rules/svelte/extension/index.ts +17 -17
  66. package/src/rules/svelte/index.ts +11 -11
  67. package/src/rules/ts/disable.ts +30 -30
  68. package/src/rules/ts/enable.ts +188 -188
  69. package/src/rules/ts/extension/disable.ts +35 -35
  70. package/src/rules/ts/extension/index.ts +62 -62
  71. package/src/rules/ts/index.ts +11 -11
  72. package/src/rules/yml/enable.ts +32 -32
  73. package/src/rules/yml/extension.ts +53 -53
  74. package/src/rules/yml/index.ts +7 -7
  75. package/src/settings/base.ts +6 -6
  76. package/src/settings/index.ts +7 -7
  77. package/src/settings/registry.ts +23 -23
  78. package/src/settings/settings/css.ts +9 -9
  79. package/src/settings/settings/html.ts +10 -10
  80. package/src/settings/settings/js.ts +8 -8
  81. package/src/settings/settings/json.ts +7 -7
  82. package/src/settings/settings/jsonc.ts +9 -9
  83. package/src/settings/settings/jsoncc.ts +9 -9
  84. package/src/settings/settings/mocha.ts +8 -8
  85. package/src/settings/settings/svelte.ts +10 -10
  86. package/src/settings/settings/ts.ts +30 -30
  87. package/src/settings/settings/yml.ts +9 -9
  88. package/tsconfig.json +75 -75
@@ -1,76 +1,76 @@
1
- import * as PROJECT from "./project";
2
-
3
- export function Scope(
4
- extension: string,
5
- {
6
- files = [],
7
- folders = [],
8
- unbound = [],
9
- }: Partial<
10
- Record<
11
- | "files"
12
- | "folders"
13
- | "unbound",
14
- string[]
15
- >
16
- > = {},
17
- ) {
18
- function glob(
19
- items: string[],
20
- {
21
- prepend = "",
22
- append = "",
23
- } = {},
24
- ) {
25
- const set = new Set(items),
26
- predicate = [...set]
27
- .join(",");
28
-
29
- return prepend
30
- + (
31
- set.size <= 1
32
- ? predicate
33
- : `{${predicate}}`
34
- )
35
- + append;
36
- }
37
-
38
- if (extension === "")
39
- return [];
40
- else {
41
- const roots = glob(
42
- PROJECT.ROOTS,
43
- ),
44
- branches = glob(
45
- [
46
- "",
47
- glob(
48
- [
49
- ...PROJECT.SUBROOTS,
50
- ...folders,
51
- ],
52
- {
53
- append: "/**/",
54
- },
55
- ),
56
- ],
57
- ),
58
- leaves = glob(
59
- [
60
- "*." + extension,
61
- ...files,
62
- ],
63
- );
64
-
65
- return [
66
- glob(
67
- [
68
- ...unbound.length === 0
69
- ? [""]
70
- : unbound,
71
- roots + branches + leaves,
72
- ],
73
- ),
74
- ];
75
- }
76
- }
1
+ import * as PROJECT from "./project";
2
+
3
+ export function Scope(
4
+ extension: string,
5
+ {
6
+ files = [],
7
+ folders = [],
8
+ unbound = [],
9
+ }: Partial<
10
+ Record<
11
+ | "files"
12
+ | "folders"
13
+ | "unbound",
14
+ string[]
15
+ >
16
+ > = {},
17
+ ) {
18
+ function glob(
19
+ items: string[],
20
+ {
21
+ prepend = "",
22
+ append = "",
23
+ } = {},
24
+ ) {
25
+ const set = new Set(items),
26
+ predicate = [...set]
27
+ .join(",");
28
+
29
+ return prepend
30
+ + (
31
+ set.size <= 1
32
+ ? predicate
33
+ : `{${predicate}}`
34
+ )
35
+ + append;
36
+ }
37
+
38
+ if (extension === "")
39
+ return [];
40
+ else {
41
+ const roots = glob(
42
+ PROJECT.ROOTS,
43
+ ),
44
+ branches = glob(
45
+ [
46
+ "",
47
+ glob(
48
+ [
49
+ ...PROJECT.SUBROOTS,
50
+ ...folders,
51
+ ],
52
+ {
53
+ append: "/**/",
54
+ },
55
+ ),
56
+ ],
57
+ ),
58
+ leaves = glob(
59
+ [
60
+ "*." + extension,
61
+ ...files,
62
+ ],
63
+ );
64
+
65
+ return [
66
+ glob(
67
+ [
68
+ ...unbound.length === 0
69
+ ? [""]
70
+ : unbound,
71
+ roots + branches + leaves,
72
+ ],
73
+ ),
74
+ ];
75
+ }
76
+ }
@@ -1,2 +1,2 @@
1
- export { ROOTS } from "./roots";
2
- export { SUBROOTS } from "./subroots";
1
+ export { ROOTS } from "./roots";
2
+ export { SUBROOTS } from "./subroots";
@@ -1,4 +1,4 @@
1
- export const ROOTS = [
2
- "",
3
- "code/*/",
4
- ];
1
+ export const ROOTS = [
2
+ "",
3
+ "code/*/",
4
+ ];
@@ -1,8 +1,8 @@
1
- export const SUBROOTS = [
2
- "src",
3
- "tests",
4
- "static",
5
- "typings",
6
- "public",
7
- "tools",
8
- ];
1
+ export const SUBROOTS = [
2
+ "src",
3
+ "tests",
4
+ "static",
5
+ "typings",
6
+ "public",
7
+ "tools",
8
+ ];
package/src/files/css.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "css",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "css",
5
+ );
package/src/files/html.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "html",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "html",
5
+ );
@@ -1,23 +1,23 @@
1
- import js from "./js";
2
- import ts from "./ts";
3
- import mocha from "./mocha";
4
- import svelte from "./svelte";
5
- import html from "./html";
6
- import css from "./css";
7
- import json from "./json";
8
- import jsonc from "./jsonc";
9
- import jsoncc from "./jsoncc";
10
- import yml from "./yml";
11
-
12
- export const files = {
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 "./js";
2
+ import ts from "./ts";
3
+ import mocha from "./mocha";
4
+ import svelte from "./svelte";
5
+ import html from "./html";
6
+ import css from "./css";
7
+ import json from "./json";
8
+ import jsonc from "./jsonc";
9
+ import jsoncc from "./jsoncc";
10
+ import yml from "./yml";
11
+
12
+ export const files = {
13
+ js,
14
+ ts,
15
+ mocha,
16
+ svelte,
17
+ html,
18
+ css,
19
+ json,
20
+ jsonc,
21
+ jsoncc,
22
+ yml,
23
+ };
package/src/files/js.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "{,[cm]}js",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "{,[cm]}js",
5
+ );
package/src/files/json.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "json",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "json",
5
+ );
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "jsonc",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "jsonc",
5
+ );
@@ -1,9 +1,9 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "{jsonc,code-snippets}",
5
- {
6
- files: ["{tsconfig,.vscode/**/*}.json"],
7
- folders: [".vscode"],
8
- },
9
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "{jsonc,code-snippets}",
5
+ {
6
+ files: ["{tsconfig,.vscode/**/*}.json"],
7
+ folders: [".vscode"],
8
+ },
9
+ );
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "{spec,test}.{,[cm]}ts",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "{spec,test}.{,[cm]}ts",
5
+ );
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "svelte",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "svelte",
5
+ );
package/src/files/ts.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "{,[cm]}ts",
5
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "{,[cm]}ts",
5
+ );
package/src/files/yml.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Scope } from "./_factory";
2
-
3
- export default Scope(
4
- "y{,a}ml",
5
- {
6
- folders: [".github"],
7
- },
8
- );
1
+ import { Scope } from "./_factory";
2
+
3
+ export default Scope(
4
+ "y{,a}ml",
5
+ {
6
+ folders: [".github"],
7
+ },
8
+ );
@@ -1,5 +1,5 @@
1
- export default [
2
- // "**/node_modules/" /* ESLint @default */,
3
- // ".git/" /* ESLint @default */,
4
- "{,code/*/}{.git,.svelte-kit,dist,buil[dt],bundle{,d},pack{,ed},{in,out}{,put},.Trash}/",
5
- ];
1
+ export default [
2
+ // "**/node_modules/" /* ESLint @default */,
3
+ // ".git/" /* ESLint @default */,
4
+ "{,code/*/}{.git,.svelte-kit,dist,buil[dt],bundle{,d},pack{,ed},{in,out}{,put},.Trash}/",
5
+ ];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default ["**/{.clasprc,package-lock}.json"];
1
+ export default ["**/{.clasprc,package-lock}.json"];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
@@ -1,25 +1,25 @@
1
- import base from "./base";
2
- import js from "./ignores/js";
3
- import ts from "./ignores/ts";
4
- import mocha from "./ignores/mocha";
5
- import svelte from "./ignores/svelte";
6
- import html from "./ignores/html";
7
- import css from "./ignores/css";
8
- import json from "./ignores/json";
9
- import jsonc from "./ignores/jsonc";
10
- import jsoncc from "./ignores/jsoncc";
11
- import yml from "./ignores/yml";
12
-
13
- export const ignores = {
14
- "*": base,
15
- js,
16
- ts,
17
- mocha,
18
- svelte,
19
- html,
20
- css,
21
- json,
22
- jsonc,
23
- jsoncc,
24
- yml,
25
- };
1
+ import base from "./base";
2
+ import js from "./ignores/js";
3
+ import ts from "./ignores/ts";
4
+ import mocha from "./ignores/mocha";
5
+ import svelte from "./ignores/svelte";
6
+ import html from "./ignores/html";
7
+ import css from "./ignores/css";
8
+ import json from "./ignores/json";
9
+ import jsonc from "./ignores/jsonc";
10
+ import jsoncc from "./ignores/jsoncc";
11
+ import yml from "./ignores/yml";
12
+
13
+ export const ignores = {
14
+ "*": base,
15
+ js,
16
+ ts,
17
+ mocha,
18
+ svelte,
19
+ html,
20
+ css,
21
+ json,
22
+ jsonc,
23
+ jsoncc,
24
+ yml,
25
+ };
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { files } from "./files";
2
- import { ignores } from "./ignores";
3
- import { rules } from "./rules";
4
-
5
- export { settings } from "./settings";
6
- export const defaults = {
7
- files,
8
- ignores,
9
- rules,
10
- };
1
+ import { files } from "./files";
2
+ import { ignores } from "./ignores";
3
+ import { rules } from "./rules";
4
+
5
+ export { settings } from "./settings";
6
+ export const defaults = {
7
+ files,
8
+ ignores,
9
+ rules,
10
+ };
@@ -1,21 +1,21 @@
1
- export const
2
- Enable = {
3
- Enable: "enable",
4
- Style: "enable/style",
5
- Extension: "enable/extension",
6
- Plugin: {
7
- Plugin: "enable/plugin",
8
- Extension: "enable/plugin/extension",
9
- },
10
- } as const,
11
- Disable = {
12
- Disable: "disable",
13
- Extension: "disable/extension",
14
- Plugin: {
15
- Plugin: "disable/plugin",
16
- Extension: "disable/plugin/extension",
17
- },
18
- } as const,
19
- Override = {
20
- Override: "override",
21
- } as const;
1
+ export const
2
+ Enable = {
3
+ Enable: "enable",
4
+ Style: "enable/style",
5
+ Extension: "enable/extension",
6
+ Plugin: {
7
+ Plugin: "enable/plugin",
8
+ Extension: "enable/plugin/extension",
9
+ },
10
+ } as const,
11
+ Disable = {
12
+ Disable: "disable",
13
+ Extension: "disable/extension",
14
+ Plugin: {
15
+ Plugin: "disable/plugin",
16
+ Extension: "disable/plugin/extension",
17
+ },
18
+ } as const,
19
+ Override = {
20
+ Override: "override",
21
+ } as const;
@@ -1,3 +1,3 @@
1
- export * as ID from "./id";
2
- export * from "./state";
3
- export * from "./option";
1
+ export * as ID from "./id";
2
+ export * from "./state";
3
+ export * from "./option";
@@ -1,30 +1,30 @@
1
- export const
2
- above = "above",
3
- after = "after",
4
- all = "all",
5
- allow = "allow",
6
- always = "always",
7
- always_multiline = "always-multiline",
8
- any = "any",
9
- as_needed = "as-needed",
10
- before = "before",
11
- below = "below",
12
- beside = "beside",
13
- both = "both",
14
- consecutive = "consecutive",
15
- consistent = "consistent",
16
- double = "double",
17
- explicit = "explicit",
18
- first = "first",
19
- ignore = "ignore",
20
- inside = "inside",
21
- last = "last",
22
- multi = "multi",
23
- multiline = "multiline",
24
- never = "never",
25
- none = "none",
26
- outside = "outside",
27
- single = "single",
28
- wildcard = "*",
29
- strict = "strict",
30
- zebra = "zebra";
1
+ export const
2
+ above = "above",
3
+ after = "after",
4
+ all = "all",
5
+ allow = "allow",
6
+ always = "always",
7
+ always_multiline = "always-multiline",
8
+ any = "any",
9
+ as_needed = "as-needed",
10
+ before = "before",
11
+ below = "below",
12
+ beside = "beside",
13
+ both = "both",
14
+ consecutive = "consecutive",
15
+ consistent = "consistent",
16
+ double = "double",
17
+ explicit = "explicit",
18
+ first = "first",
19
+ ignore = "ignore",
20
+ inside = "inside",
21
+ last = "last",
22
+ multi = "multi",
23
+ multiline = "multiline",
24
+ never = "never",
25
+ none = "none",
26
+ outside = "outside",
27
+ single = "single",
28
+ wildcard = "*",
29
+ strict = "strict",
30
+ zebra = "zebra";