linted 19.3.0 → 19.3.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 (69) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +124 -124
  4. package/LICENSE +21 -21
  5. package/README.md +387 -387
  6. package/SECURITY.md +9 -9
  7. package/dist/_strings/level.spec.d.ts +2 -0
  8. package/dist/_strings/level.spec.d.ts.map +1 -0
  9. package/dist/_strings/level.spec.js +31 -0
  10. package/dist/_strings/level.spec.js.map +1 -0
  11. package/dist/imports/index.d.ts.map +1 -1
  12. package/dist/imports/plugins.d.ts.map +1 -1
  13. package/dist/index.spec.d.ts +1 -0
  14. package/dist/index.spec.js +10 -1
  15. package/dist/index.spec.js.map +1 -1
  16. package/eslint.config.js +3 -3
  17. package/package.json +140 -140
  18. package/src/_strings/id.ts +18 -18
  19. package/src/_strings/index.ts +6 -6
  20. package/src/_strings/level.spec.ts +31 -0
  21. package/src/_strings/level.ts +6 -6
  22. package/src/_strings/state.ts +58 -58
  23. package/src/files/html.ts +1 -1
  24. package/src/files/index.ts +19 -19
  25. package/src/files/js.ts +4 -4
  26. package/src/files/json.ts +1 -1
  27. package/src/files/jsonc.ts +4 -4
  28. package/src/files/mocha.ts +4 -4
  29. package/src/files/mochaJs.ts +4 -4
  30. package/src/files/svelte.ts +1 -1
  31. package/src/files/ts.ts +1 -1
  32. package/src/files/yml.ts +1 -1
  33. package/src/imports/index.ts +7 -7
  34. package/src/imports/parsers.ts +13 -13
  35. package/src/imports/plugins.ts +17 -17
  36. package/src/index.spec.ts +11 -0
  37. package/src/index.ts +22 -22
  38. package/src/rules/html/enable.ts +120 -120
  39. package/src/rules/html/index.ts +3 -3
  40. package/src/rules/index.ts +19 -19
  41. package/src/rules/js/enable.ts +524 -524
  42. package/src/rules/js/index.ts +4 -4
  43. package/src/rules/js/stylistic.ts +608 -608
  44. package/src/rules/json/enable.ts +33 -33
  45. package/src/rules/json/enable_x.ts +95 -95
  46. package/src/rules/json/index.ts +4 -4
  47. package/src/rules/jsonc/index.ts +4 -4
  48. package/src/rules/jsonc/override.ts +16 -16
  49. package/src/rules/mocha/base.ts +7 -7
  50. package/src/rules/mocha/disable.ts +8 -8
  51. package/src/rules/mocha/enable.ts +53 -53
  52. package/src/rules/mocha/index.ts +7 -7
  53. package/src/rules/mochaJs/index.ts +7 -7
  54. package/src/rules/svelte/disable.ts +9 -9
  55. package/src/rules/svelte/disable_js.ts +11 -11
  56. package/src/rules/svelte/disable_ts.ts +9 -9
  57. package/src/rules/svelte/enable.ts +230 -230
  58. package/src/rules/svelte/enable_x.ts +20 -20
  59. package/src/rules/svelte/index.ts +15 -15
  60. package/src/rules/ts/disable.ts +22 -22
  61. package/src/rules/ts/disable_x.ts +32 -32
  62. package/src/rules/ts/enable.ts +550 -550
  63. package/src/rules/ts/enable_x.ts +115 -115
  64. package/src/rules/ts/index.ts +13 -13
  65. package/src/rules/yml/enable.ts +64 -64
  66. package/src/rules/yml/enable_x.ts +68 -68
  67. package/src/rules/yml/index.ts +4 -4
  68. package/tsconfig.json +163 -163
  69. package/typings/mocha.d.ts +3 -3
package/src/files/js.ts CHANGED
@@ -1,4 +1,4 @@
1
- export default [
2
- "*.{c,m,}js",
3
- "{src,tests,static,typings}/**/*.{c,m,}js",
4
- ];
1
+ export default [
2
+ "*.{c,m,}js",
3
+ "{src,tests,static,typings}/**/*.{c,m,}js",
4
+ ];
package/src/files/json.ts CHANGED
@@ -1 +1 @@
1
- export default ["**/*.json"];
1
+ export default ["**/*.json"];
@@ -1,4 +1,4 @@
1
- export default [
2
- "**/*.jsonc",
3
- "**/tsconfig.json",
4
- ];
1
+ export default [
2
+ "**/*.jsonc",
3
+ "**/tsconfig.json",
4
+ ];
@@ -1,4 +1,4 @@
1
- export default [
2
- "**/*.{spec,test}.{c,m,}ts",
3
- "**/test{s,}/**/*.{c,m,}ts",
4
- ];
1
+ export default [
2
+ "**/*.{spec,test}.{c,m,}ts",
3
+ "**/test{s,}/**/*.{c,m,}ts",
4
+ ];
@@ -1,4 +1,4 @@
1
- export default [
2
- "**/*.{spec,test}.{c,m,}js",
3
- "**/test{s,}/**/*.{c,m,}js",
4
- ];
1
+ export default [
2
+ "**/*.{spec,test}.{c,m,}js",
3
+ "**/test{s,}/**/*.{c,m,}js",
4
+ ];
@@ -1 +1 @@
1
- export default ["{src,tests,static}/**/*.svelte"];
1
+ export default ["{src,tests,static}/**/*.svelte"];
package/src/files/ts.ts CHANGED
@@ -1 +1 @@
1
- export default ["**/*.{c,m,}ts"];
1
+ export default ["**/*.{c,m,}ts"];
package/src/files/yml.ts CHANGED
@@ -1 +1 @@
1
- export default ["**/*.y{a,}ml"];
1
+ export default ["**/*.y{a,}ml"];
@@ -1,7 +1,7 @@
1
- import plugins from "./plugins";
2
- import parsers from "./parsers";
3
-
4
- export default {
5
- plugins,
6
- parsers,
7
- } as const;
1
+ import plugins from "./plugins";
2
+ import parsers from "./parsers";
3
+
4
+ export default {
5
+ plugins,
6
+ parsers,
7
+ } as const;
@@ -1,13 +1,13 @@
1
- import ts from "@typescript-eslint/parser";
2
- import svelte from "svelte-eslint-parser";
3
- import html from "@html-eslint/parser";
4
- import jsonc from "jsonc-eslint-parser";
5
- import yml from "yaml-eslint-parser";
6
-
7
- export default {
8
- ts,
9
- svelte,
10
- html,
11
- jsonc,
12
- yml,
13
- } as const;
1
+ import ts from "@typescript-eslint/parser";
2
+ import svelte from "svelte-eslint-parser";
3
+ import html from "@html-eslint/parser";
4
+ import jsonc from "jsonc-eslint-parser";
5
+ import yml from "yaml-eslint-parser";
6
+
7
+ export default {
8
+ ts,
9
+ svelte,
10
+ html,
11
+ jsonc,
12
+ yml,
13
+ } as const;
@@ -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
@@ -0,0 +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
+ });
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
+ };