linted 19.3.1 → 19.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) 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/imports/index.d.ts.map +1 -1
  8. package/dist/imports/plugins.d.ts.map +1 -1
  9. package/dist/rules/index.d.ts +4 -0
  10. package/dist/rules/index.d.ts.map +1 -1
  11. package/dist/rules/js/index.d.ts +1 -0
  12. package/dist/rules/js/index.d.ts.map +1 -1
  13. package/dist/rules/js/stylistic.d.ts +1 -0
  14. package/dist/rules/js/stylistic.d.ts.map +1 -1
  15. package/dist/rules/js/stylistic.js +4 -1
  16. package/dist/rules/js/stylistic.js.map +1 -1
  17. package/dist/rules/mocha/index.d.ts +1 -0
  18. package/dist/rules/mocha/index.d.ts.map +1 -1
  19. package/dist/rules/mochaJs/index.d.ts +1 -0
  20. package/dist/rules/mochaJs/index.d.ts.map +1 -1
  21. package/dist/rules/svelte/index.d.ts +1 -0
  22. package/dist/rules/svelte/index.d.ts.map +1 -1
  23. package/dist/rules/ts/index.d.ts +1 -0
  24. package/dist/rules/ts/index.d.ts.map +1 -1
  25. package/eslint.config.js +3 -3
  26. package/package.json +140 -140
  27. package/src/_strings/id.ts +18 -18
  28. package/src/_strings/index.ts +6 -6
  29. package/src/_strings/level.spec.ts +31 -31
  30. package/src/_strings/level.ts +6 -6
  31. package/src/_strings/state.ts +58 -58
  32. package/src/files/html.ts +1 -1
  33. package/src/files/index.ts +19 -19
  34. package/src/files/js.ts +4 -4
  35. package/src/files/json.ts +1 -1
  36. package/src/files/jsonc.ts +4 -4
  37. package/src/files/mocha.ts +4 -4
  38. package/src/files/mochaJs.ts +4 -4
  39. package/src/files/svelte.ts +1 -1
  40. package/src/files/ts.ts +1 -1
  41. package/src/files/yml.ts +1 -1
  42. package/src/imports/index.ts +7 -7
  43. package/src/imports/parsers.ts +13 -13
  44. package/src/imports/plugins.ts +17 -17
  45. package/src/index.spec.ts +11 -11
  46. package/src/index.ts +22 -22
  47. package/src/rules/html/enable.ts +120 -120
  48. package/src/rules/html/index.ts +3 -3
  49. package/src/rules/index.ts +19 -19
  50. package/src/rules/js/enable.ts +524 -524
  51. package/src/rules/js/index.ts +4 -4
  52. package/src/rules/js/stylistic.ts +611 -608
  53. package/src/rules/json/enable.ts +33 -33
  54. package/src/rules/json/enable_x.ts +95 -95
  55. package/src/rules/json/index.ts +4 -4
  56. package/src/rules/jsonc/index.ts +4 -4
  57. package/src/rules/jsonc/override.ts +16 -16
  58. package/src/rules/mocha/base.ts +7 -7
  59. package/src/rules/mocha/disable.ts +8 -8
  60. package/src/rules/mocha/enable.ts +53 -53
  61. package/src/rules/mocha/index.ts +7 -7
  62. package/src/rules/mochaJs/index.ts +7 -7
  63. package/src/rules/svelte/disable.ts +9 -9
  64. package/src/rules/svelte/disable_js.ts +11 -11
  65. package/src/rules/svelte/disable_ts.ts +9 -9
  66. package/src/rules/svelte/enable.ts +230 -230
  67. package/src/rules/svelte/enable_x.ts +20 -20
  68. package/src/rules/svelte/index.ts +15 -15
  69. package/src/rules/ts/disable.ts +22 -22
  70. package/src/rules/ts/disable_x.ts +32 -32
  71. package/src/rules/ts/enable.ts +550 -550
  72. package/src/rules/ts/enable_x.ts +115 -115
  73. package/src/rules/ts/index.ts +13 -13
  74. package/src/rules/yml/enable.ts +64 -64
  75. package/src/rules/yml/enable_x.ts +68 -68
  76. package/src/rules/yml/index.ts +4 -4
  77. package/tsconfig.json +163 -163
  78. package/typings/mocha.d.ts +3 -3
@@ -1,31 +1,31 @@
1
- import { expect } from "chai";
2
- import * as level from "./level";
3
-
4
- describe("Strings:Level", function () {
5
- describe("shape", function () {
6
- it("is module", function () {
7
- expect(level)
8
- .a("module");
9
- });
10
- });
11
- describe("count", function () {
12
- it("is 3", function () {
13
- expect(Object.keys(level))
14
- .lengthOf(3);
15
- });
16
- });
17
- describe("unique count", function () {
18
- it("is 3", function () {
19
- expect(new Map(Object.entries(level)))
20
- .lengthOf(3);
21
- });
22
- });
23
- describe("values", function () {
24
- it("are: error, warn, off", function () {
25
- expect(new Map(Object.entries(level)))
26
- .includes("error")
27
- .and.includes("warn")
28
- .and.includes("off");
29
- });
30
- });
31
- });
1
+ import { expect } from "chai";
2
+ import * as level from "./level";
3
+
4
+ describe("Strings:Level", function () {
5
+ describe("shape", function () {
6
+ it("is module", function () {
7
+ expect(level)
8
+ .a("module");
9
+ });
10
+ });
11
+ describe("count", function () {
12
+ it("is 3", function () {
13
+ expect(Object.keys(level))
14
+ .lengthOf(3);
15
+ });
16
+ });
17
+ describe("unique count", function () {
18
+ it("is 3", function () {
19
+ expect(new Map(Object.entries(level)))
20
+ .lengthOf(3);
21
+ });
22
+ });
23
+ describe("values", function () {
24
+ it("are: error, warn, off", function () {
25
+ expect(new Map(Object.entries(level)))
26
+ .includes("error")
27
+ .and.includes("warn")
28
+ .and.includes("off");
29
+ });
30
+ });
31
+ });
@@ -1,6 +1,6 @@
1
- const
2
- ERROR = "error",
3
- WARN = "warn",
4
- OFF = "off";
5
-
6
- export { ERROR, WARN, OFF };
1
+ const
2
+ ERROR = "error",
3
+ WARN = "warn",
4
+ OFF = "off";
5
+
6
+ export { ERROR, WARN, OFF };
@@ -1,58 +1,58 @@
1
- const
2
- Ignore = "ignore",
3
- Never = "never",
4
- Always = "always",
5
- AlwaysMultiline = "always-multiline",
6
- Multiline = "multiline",
7
- Consistent = "consistent",
8
- Consecutive = "consecutive",
9
- AsNeeded = "as-needed",
10
- Explicit = "explicit",
11
- Allow = "allow",
12
- Strict = "strict",
13
- Any = "any",
14
- All = "all",
15
- Star = "*",
16
- First = "first",
17
- Last = "last",
18
- Before = "before",
19
- After = "after",
20
- Above = "above",
21
- Below = "below",
22
- Beside = "beside",
23
- Inside = "inside",
24
- Outside = "outside",
25
- Single = "single",
26
- Double = "double",
27
- Multi = "multi",
28
- Both = "both";
29
-
30
- export {
31
- Ignore,
32
- Never,
33
- Always,
34
- AlwaysMultiline,
35
- Multiline,
36
- Consistent,
37
- Consecutive,
38
- AsNeeded,
39
- Explicit,
40
- Allow,
41
- Strict,
42
- Any,
43
- All,
44
- Star,
45
- First,
46
- Last,
47
- Before,
48
- After,
49
- Above,
50
- Below,
51
- Beside,
52
- Inside,
53
- Outside,
54
- Single,
55
- Double,
56
- Multi,
57
- Both,
58
- };
1
+ const
2
+ Ignore = "ignore",
3
+ Never = "never",
4
+ Always = "always",
5
+ AlwaysMultiline = "always-multiline",
6
+ Multiline = "multiline",
7
+ Consistent = "consistent",
8
+ Consecutive = "consecutive",
9
+ AsNeeded = "as-needed",
10
+ Explicit = "explicit",
11
+ Allow = "allow",
12
+ Strict = "strict",
13
+ Any = "any",
14
+ All = "all",
15
+ Star = "*",
16
+ First = "first",
17
+ Last = "last",
18
+ Before = "before",
19
+ After = "after",
20
+ Above = "above",
21
+ Below = "below",
22
+ Beside = "beside",
23
+ Inside = "inside",
24
+ Outside = "outside",
25
+ Single = "single",
26
+ Double = "double",
27
+ Multi = "multi",
28
+ Both = "both";
29
+
30
+ export {
31
+ Ignore,
32
+ Never,
33
+ Always,
34
+ AlwaysMultiline,
35
+ Multiline,
36
+ Consistent,
37
+ Consecutive,
38
+ AsNeeded,
39
+ Explicit,
40
+ Allow,
41
+ Strict,
42
+ Any,
43
+ All,
44
+ Star,
45
+ First,
46
+ Last,
47
+ Before,
48
+ After,
49
+ Above,
50
+ Below,
51
+ Beside,
52
+ Inside,
53
+ Outside,
54
+ Single,
55
+ Double,
56
+ Multi,
57
+ Both,
58
+ };
package/src/files/html.ts CHANGED
@@ -1 +1 @@
1
- export default ["{src,tests,static}/**/*.html"];
1
+ export default ["{src,tests,static}/**/*.html"];
@@ -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
+ };
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
@@ -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
+ }