linted 19.4.3-rc.9 → 20.1.0-rc.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.
Files changed (62) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +122 -122
  4. package/LICENSE +21 -21
  5. package/README.md +387 -387
  6. package/SECURITY.md +9 -9
  7. package/dist/imports/index.d.ts.map +1 -1
  8. package/dist/imports/plugins.d.ts.map +1 -1
  9. package/eslint.config.js +3 -3
  10. package/package.json +144 -144
  11. package/src/_strings/id.ts +8 -8
  12. package/src/_strings/index.ts +6 -6
  13. package/src/_strings/level.spec.ts +31 -31
  14. package/src/_strings/level.ts +4 -4
  15. package/src/_strings/state.ts +28 -28
  16. package/src/files/html.ts +1 -1
  17. package/src/files/index.ts +19 -19
  18. package/src/files/js.ts +4 -4
  19. package/src/files/json.ts +1 -1
  20. package/src/files/jsonc.ts +4 -4
  21. package/src/files/mocha.ts +4 -4
  22. package/src/files/mochaJs.ts +4 -4
  23. package/src/files/svelte.ts +1 -1
  24. package/src/files/ts.ts +1 -1
  25. package/src/files/yml.ts +1 -1
  26. package/src/imports/index.ts +7 -7
  27. package/src/imports/parsers.ts +13 -13
  28. package/src/imports/plugins.ts +17 -17
  29. package/src/index.spec.ts +11 -11
  30. package/src/index.ts +22 -22
  31. package/src/rules/html/enable.ts +120 -120
  32. package/src/rules/html/index.ts +3 -3
  33. package/src/rules/index.ts +19 -19
  34. package/src/rules/js/enable.ts +524 -524
  35. package/src/rules/js/index.ts +4 -4
  36. package/src/rules/js/stylistic.ts +611 -611
  37. package/src/rules/json/enable.ts +33 -33
  38. package/src/rules/json/enable_x.ts +95 -95
  39. package/src/rules/json/index.ts +4 -4
  40. package/src/rules/jsonc/index.ts +4 -4
  41. package/src/rules/jsonc/override.ts +16 -16
  42. package/src/rules/mocha/base.ts +7 -7
  43. package/src/rules/mocha/disable.ts +8 -8
  44. package/src/rules/mocha/enable.ts +53 -53
  45. package/src/rules/mocha/index.ts +7 -7
  46. package/src/rules/mochaJs/index.ts +7 -7
  47. package/src/rules/svelte/disable.ts +9 -9
  48. package/src/rules/svelte/disable_js.ts +11 -11
  49. package/src/rules/svelte/disable_ts.ts +9 -9
  50. package/src/rules/svelte/enable.ts +230 -230
  51. package/src/rules/svelte/enable_x.ts +20 -20
  52. package/src/rules/svelte/index.ts +15 -15
  53. package/src/rules/ts/disable.ts +22 -22
  54. package/src/rules/ts/disable_x.ts +32 -32
  55. package/src/rules/ts/enable.ts +550 -550
  56. package/src/rules/ts/enable_x.ts +115 -115
  57. package/src/rules/ts/index.ts +13 -13
  58. package/src/rules/yml/enable.ts +64 -64
  59. package/src/rules/yml/enable_x.ts +68 -68
  60. package/src/rules/yml/index.ts +4 -4
  61. package/tsconfig.json +163 -163
  62. package/typings/mocha.d.ts +3 -3
@@ -1,17 +1,17 @@
1
- import stylistic from "@stylistic/eslint-plugin";
2
- import typescript_eslint from "@typescript-eslint/eslint-plugin";
3
- import svelte from "eslint-plugin-svelte";
4
- import mocha from "eslint-plugin-mocha";
5
- import html_eslint from "@html-eslint/eslint-plugin";
6
- import jsonc from "eslint-plugin-jsonc";
7
- import yml from "eslint-plugin-yml";
8
-
9
- export default {
10
- "@stylistic": stylistic,
11
- "@typescript-eslint": typescript_eslint as unknown as { configs: unknown },
12
- svelte,
13
- mocha,
14
- "@html-eslint": html_eslint,
15
- jsonc,
16
- yml,
17
- } as const;
1
+ import stylistic from "@stylistic/eslint-plugin";
2
+ import typescript_eslint from "@typescript-eslint/eslint-plugin";
3
+ import svelte from "eslint-plugin-svelte";
4
+ import mocha from "eslint-plugin-mocha";
5
+ import html_eslint from "@html-eslint/eslint-plugin";
6
+ import jsonc from "eslint-plugin-jsonc";
7
+ import yml from "eslint-plugin-yml";
8
+
9
+ export default {
10
+ "@stylistic": stylistic,
11
+ "@typescript-eslint": typescript_eslint as unknown as { configs: unknown },
12
+ svelte,
13
+ mocha,
14
+ "@html-eslint": html_eslint,
15
+ jsonc,
16
+ yml,
17
+ } as const;
package/src/index.spec.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { expect } from "chai";
2
- import core from "./";
3
-
4
- describe("Core", function () {
5
- describe("shape", function () {
6
- it("is function", function () {
7
- expect(core)
8
- .a("function");
9
- });
10
- });
11
- });
1
+ import { expect } from "chai";
2
+ import core from "./";
3
+
4
+ describe("Core", function () {
5
+ describe("shape", function () {
6
+ it("is function", function () {
7
+ expect(core)
8
+ .a("function");
9
+ });
10
+ });
11
+ });
package/src/index.ts CHANGED
@@ -1,22 +1,22 @@
1
- import type { Input } from "@eslinted/core";
2
- import core from "@eslinted/core";
3
- import imports from "./imports";
4
- import files from "./files";
5
- import rules from "./rules";
6
-
7
- export default function (
8
- includes: Input["files"]["includes"] = {},
9
- overrides: Input["rules"]["overrides"] = {},
10
- ) {
11
- try {
12
- return core(
13
- {
14
- plugins: imports.plugins,
15
- parsers: imports.parsers,
16
- files: { files, includes },
17
- rules: { rules, overrides },
18
- },
19
- );
20
- }
21
- catch (e) { throw new Error(`linted(): `, { cause: e }); }
22
- }
1
+ import type { Input } from "@eslinted/core";
2
+ import core from "@eslinted/core";
3
+ import imports from "./imports";
4
+ import files from "./files";
5
+ import rules from "./rules";
6
+
7
+ export default function (
8
+ includes: Input["files"]["includes"] = {},
9
+ overrides: Input["rules"]["overrides"] = {},
10
+ ) {
11
+ try {
12
+ return core(
13
+ {
14
+ plugins: imports.plugins,
15
+ parsers: imports.parsers,
16
+ files: { files, includes },
17
+ rules: { rules, overrides },
18
+ },
19
+ );
20
+ }
21
+ catch (e) { throw new Error(`linted(): `, { cause: e }); }
22
+ }
@@ -1,120 +1,120 @@
1
- import type * as Rule from "@html-eslint/eslint-plugin/types/rules";
2
- import {
3
- enable,
4
- ERROR,
5
- OFF,
6
- Never,
7
- } from "../../_strings";
8
-
9
- const rules: Partial<Record<`@html-eslint/${keyof typeof Rule}`, unknown>> = {
10
- // #region BEST PRACTICE
11
- // https://html-eslint.org/docs/rules#best-practice
12
- "@html-eslint/no-duplicate-attrs": ERROR,
13
- "@html-eslint/no-duplicate-id": ERROR,
14
- "@html-eslint/no-extra-spacing-text": [
15
- ERROR,
16
- {
17
- skip: [],
18
- },
19
- ],
20
- "@html-eslint/no-inline-styles": OFF /* breaks Svele app.html */,
21
- "@html-eslint/no-obsolete-tags": ERROR,
22
- "@html-eslint/no-restricted-attr-values": OFF,
23
- "@html-eslint/no-restricted-attrs": OFF,
24
- "@html-eslint/no-script-style-type": OFF,
25
- "@html-eslint/no-target-blank": ERROR,
26
- "@html-eslint/require-attrs": OFF,
27
- "@html-eslint/require-button-type": ERROR,
28
- "@html-eslint/require-closing-tags": [
29
- ERROR,
30
- {
31
- selfClosing: Never,
32
- selfClosingCustomPatterns: [""] /* regex[], intention: any custom pattern is allowed */,
33
- },
34
- ],
35
- "@html-eslint/require-doctype": ERROR,
36
- "@html-eslint/require-li-container": ERROR,
37
- "@html-eslint/require-meta-charset": ERROR,
38
-
39
- // #endregion BEST PRACTICE
40
-
41
- // #region SEO
42
- // https://html-eslint.org/docs/rules#seo
43
- "@html-eslint/no-multiple-h1": ERROR,
44
- "@html-eslint/require-lang": ERROR,
45
- "@html-eslint/require-meta-description": OFF /* breaks Svelte which leaves meta descriptions to route leaves */,
46
- "@html-eslint/require-open-graph-protocol": OFF /* idk what this is */,
47
- "@html-eslint/require-title": OFF /* breaks Svelte which leaves title to route leaves */,
48
-
49
- // #endregion SEO
50
-
51
- // #region ACCESSIBILITY
52
- // https://html-eslint.org/docs/rules#accessibility
53
- "@html-eslint/no-abstract-roles": ERROR,
54
- "@html-eslint/no-accesskey-attrs": ERROR,
55
- "@html-eslint/no-aria-hidden-body": ERROR,
56
- "@html-eslint/no-non-scalable-viewport": ERROR,
57
- "@html-eslint/no-positive-tabindex": ERROR,
58
- "@html-eslint/no-skip-heading-levels": ERROR,
59
- "@html-eslint/require-frame-title": ERROR,
60
- "@html-eslint/require-img-alt": [
61
- ERROR,
62
- {
63
- substitute: [],
64
- },
65
- ],
66
- "@html-eslint/require-meta-viewport": ERROR,
67
-
68
- // #endregion ACCESSIBILITY
69
-
70
- // #region STYLE
71
- // https://html-eslint.org/docs/rules#style
72
-
73
- // #endregion STYLE
74
- "@html-eslint/attrs-newline": [
75
- ERROR,
76
- {
77
- ifAttrsMoreThan: 0,
78
- closeStyle: "sameline",
79
- },
80
- ],
81
- "@html-eslint/element-newline": [
82
- ERROR,
83
- {
84
- skip: ["head"],
85
- inline: ["$inline"],
86
- },
87
- ],
88
- "@html-eslint/id-naming-convention": OFF,
89
- "@html-eslint/indent": [
90
- ERROR,
91
- 2,
92
- ],
93
- "@html-eslint/lowercase": ERROR,
94
- "@html-eslint/no-extra-spacing-attrs": [
95
- ERROR,
96
- {
97
- enforceBeforeSelfClose: true,
98
- disallowMissing: true,
99
- disallowTabs: true,
100
- disallowInAssignment: true,
101
- },
102
- ],
103
- "@html-eslint/no-multiple-empty-lines": [
104
- ERROR,
105
- {
106
- max: 1,
107
- },
108
- ],
109
- "@html-eslint/no-trailing-spaces": ERROR,
110
- "@html-eslint/quotes": [
111
- ERROR,
112
- "double",
113
- ],
114
- "@html-eslint/sort-attrs": OFF,
115
- } as const;
116
-
117
- export default [
118
- enable,
119
- rules,
120
- ] as const;
1
+ import type * as Rule from "@html-eslint/eslint-plugin/types/rules";
2
+ import {
3
+ enable,
4
+ ERROR,
5
+ OFF,
6
+ Never,
7
+ } from "../../_strings";
8
+
9
+ const rules: Partial<Record<`@html-eslint/${keyof typeof Rule}`, unknown>> = {
10
+ // #region BEST PRACTICE
11
+ // https://html-eslint.org/docs/rules#best-practice
12
+ "@html-eslint/no-duplicate-attrs": ERROR,
13
+ "@html-eslint/no-duplicate-id": ERROR,
14
+ "@html-eslint/no-extra-spacing-text": [
15
+ ERROR,
16
+ {
17
+ skip: [],
18
+ },
19
+ ],
20
+ "@html-eslint/no-inline-styles": OFF /* breaks Svele app.html */,
21
+ "@html-eslint/no-obsolete-tags": ERROR,
22
+ "@html-eslint/no-restricted-attr-values": OFF,
23
+ "@html-eslint/no-restricted-attrs": OFF,
24
+ "@html-eslint/no-script-style-type": OFF,
25
+ "@html-eslint/no-target-blank": ERROR,
26
+ "@html-eslint/require-attrs": OFF,
27
+ "@html-eslint/require-button-type": ERROR,
28
+ "@html-eslint/require-closing-tags": [
29
+ ERROR,
30
+ {
31
+ selfClosing: Never,
32
+ selfClosingCustomPatterns: [""] /* regex[], intention: any custom pattern is allowed */,
33
+ },
34
+ ],
35
+ "@html-eslint/require-doctype": ERROR,
36
+ "@html-eslint/require-li-container": ERROR,
37
+ "@html-eslint/require-meta-charset": ERROR,
38
+
39
+ // #endregion BEST PRACTICE
40
+
41
+ // #region SEO
42
+ // https://html-eslint.org/docs/rules#seo
43
+ "@html-eslint/no-multiple-h1": ERROR,
44
+ "@html-eslint/require-lang": ERROR,
45
+ "@html-eslint/require-meta-description": OFF /* breaks Svelte which leaves meta descriptions to route leaves */,
46
+ "@html-eslint/require-open-graph-protocol": OFF /* idk what this is */,
47
+ "@html-eslint/require-title": OFF /* breaks Svelte which leaves title to route leaves */,
48
+
49
+ // #endregion SEO
50
+
51
+ // #region ACCESSIBILITY
52
+ // https://html-eslint.org/docs/rules#accessibility
53
+ "@html-eslint/no-abstract-roles": ERROR,
54
+ "@html-eslint/no-accesskey-attrs": ERROR,
55
+ "@html-eslint/no-aria-hidden-body": ERROR,
56
+ "@html-eslint/no-non-scalable-viewport": ERROR,
57
+ "@html-eslint/no-positive-tabindex": ERROR,
58
+ "@html-eslint/no-skip-heading-levels": ERROR,
59
+ "@html-eslint/require-frame-title": ERROR,
60
+ "@html-eslint/require-img-alt": [
61
+ ERROR,
62
+ {
63
+ substitute: [],
64
+ },
65
+ ],
66
+ "@html-eslint/require-meta-viewport": ERROR,
67
+
68
+ // #endregion ACCESSIBILITY
69
+
70
+ // #region STYLE
71
+ // https://html-eslint.org/docs/rules#style
72
+
73
+ // #endregion STYLE
74
+ "@html-eslint/attrs-newline": [
75
+ ERROR,
76
+ {
77
+ ifAttrsMoreThan: 0,
78
+ closeStyle: "sameline",
79
+ },
80
+ ],
81
+ "@html-eslint/element-newline": [
82
+ ERROR,
83
+ {
84
+ skip: ["head"],
85
+ inline: ["$inline"],
86
+ },
87
+ ],
88
+ "@html-eslint/id-naming-convention": OFF,
89
+ "@html-eslint/indent": [
90
+ ERROR,
91
+ 2,
92
+ ],
93
+ "@html-eslint/lowercase": ERROR,
94
+ "@html-eslint/no-extra-spacing-attrs": [
95
+ ERROR,
96
+ {
97
+ enforceBeforeSelfClose: true,
98
+ disallowMissing: true,
99
+ disallowTabs: true,
100
+ disallowInAssignment: true,
101
+ },
102
+ ],
103
+ "@html-eslint/no-multiple-empty-lines": [
104
+ ERROR,
105
+ {
106
+ max: 1,
107
+ },
108
+ ],
109
+ "@html-eslint/no-trailing-spaces": ERROR,
110
+ "@html-eslint/quotes": [
111
+ ERROR,
112
+ "double",
113
+ ],
114
+ "@html-eslint/sort-attrs": OFF,
115
+ } as const;
116
+
117
+ export default [
118
+ enable,
119
+ rules,
120
+ ] as const;
@@ -1,3 +1,3 @@
1
- import enable from "./enable";
2
-
3
- export default [enable];
1
+ import enable from "./enable";
2
+
3
+ export default [enable];
@@ -1,19 +1,19 @@
1
- import js from "./js";
2
- import ts from "./ts";
3
- import svelte from "./svelte";
4
- import mocha from "./mocha";
5
- import html from "./html";
6
- import json from "./json";
7
- import jsonc from "./jsonc";
8
- import yml from "./yml";
9
-
10
- export default {
11
- js,
12
- ts,
13
- svelte,
14
- mocha,
15
- html,
16
- json,
17
- jsonc,
18
- yml,
19
- };
1
+ import js from "./js";
2
+ import ts from "./ts";
3
+ import svelte from "./svelte";
4
+ import mocha from "./mocha";
5
+ import html from "./html";
6
+ import json from "./json";
7
+ import jsonc from "./jsonc";
8
+ import yml from "./yml";
9
+
10
+ export default {
11
+ js,
12
+ ts,
13
+ svelte,
14
+ mocha,
15
+ html,
16
+ json,
17
+ jsonc,
18
+ yml,
19
+ };