@eslinted/core 3.1.16 → 3.1.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAGrD,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAC3B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,GAC1B,QAAQ,CAAC,MAAM,EAAE,CAoFnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAGrD,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAC3B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,GAC1B,QAAQ,CAAC,MAAM,EAAE,CAyEnB"}
package/dist/index.js CHANGED
@@ -2,35 +2,25 @@ import scopes, {} from "./scopes/index.js";
2
2
  import { Options, Files, Rulesets } from "./factory/index.js";
3
3
  export default function (plugins, parsers, files, rules) {
4
4
  try {
5
- const F = new Files(files), R = new Rulesets(rules), Pa = {
6
- js: [],
7
- ts: [parsers.ts],
8
- svelte: [parsers.svelte, parsers.ts],
9
- mocha: [parsers.ts],
10
- html: [parsers.html],
11
- json: [parsers.jsonc],
12
- jsonc: [parsers.jsonc],
13
- yml: [parsers.yml],
14
- md: [parsers.md],
15
- }, options = {
5
+ const F = new Files(files), R = new Rulesets(rules), options = {
16
6
  js: new Options
17
- .js(F.files("js"), R.ruleset("js"), { "@stylistic": plugins["@stylistic"] }, Pa.js).configs,
7
+ .js(F.files("js"), R.ruleset("js"), { "@stylistic": plugins["@stylistic"] }, []).configs,
18
8
  ts: new Options
19
- .ts(F.files("ts"), R.ruleset("ts"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] }, Pa.ts).configs,
9
+ .ts(F.files("ts"), R.ruleset("ts"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] }, [parsers.ts]).configs,
20
10
  svelte: new Options
21
- .svelte(F.files("svelte"), R.ruleset("svelte"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte }, Pa.svelte).configs,
11
+ .svelte(F.files("svelte"), R.ruleset("svelte"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte }, [parsers.svelte, parsers.ts]).configs,
22
12
  mocha: new Options
23
- .mocha(F.files("mocha"), R.ruleset("mocha"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha }, Pa.mocha).configs,
13
+ .mocha(F.files("mocha"), R.ruleset("mocha"), { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha }, [parsers.ts]).configs,
24
14
  html: new Options
25
- .html(F.files("html"), R.ruleset("html"), { "@html-eslint": plugins["@html-eslint"] }, Pa.html).configs,
15
+ .html(F.files("html"), R.ruleset("html"), { "@html-eslint": plugins["@html-eslint"] }, [parsers.html]).configs,
26
16
  json: new Options
27
- .json(F.files("json"), R.ruleset("json"), { jsonc: plugins.jsonc }, Pa.json).configs,
17
+ .json(F.files("json"), R.ruleset("json"), { jsonc: plugins.jsonc }, [parsers.jsonc]).configs,
28
18
  jsonc: new Options
29
- .jsonc(F.files("jsonc"), R.ruleset("jsonc"), { jsonc: plugins.jsonc }, Pa.jsonc).configs,
19
+ .jsonc(F.files("jsonc"), R.ruleset("jsonc"), { jsonc: plugins.jsonc }, [parsers.jsonc]).configs,
30
20
  yml: new Options
31
- .yml(F.files("yml"), R.ruleset("yml"), { yml: plugins.yml }, Pa.yml).configs,
21
+ .yml(F.files("yml"), R.ruleset("yml"), { yml: plugins.yml }, [parsers.yml]).configs,
32
22
  md: new Options
33
- .md(F.files("md"), R.ruleset("md"), { markdownlint: plugins.markdownlint }, Pa.md).configs,
23
+ .md(F.files("md"), R.ruleset("md"), { markdownlint: plugins.markdownlint }, [parsers.md]).configs,
34
24
  };
35
25
  return scopes.flatMap(scope => options[scope]);
36
26
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAc,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9D,MAAM,CAAC,OAAO,WACZ,OAA+B,EAC/B,OAA+B,EAC/B,KAA2B,EAC3B,KAA2B;IAE3B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,EAC1B,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,EACvB,EAAE,GAAkE;YAClE,EAAE,EAAE,EAAW;YACf,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAU;YACzB,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAU;YAC7C,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAU;YAC5B,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAU;YAC7B,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,CAAU;YAC9B,KAAK,EAAE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KAAK,CAAC,EAChB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EACpB,CAAC,OAAO,CAAC,GAAG,CAAC,CACd,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACf,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,EACtC,CAAC,OAAO,CAAC,EAAE,CAAC,CACb,CAAC,OAAO;SACZ,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_schemaVersion": "20.16.1",
3
3
  "name": "@eslinted/core",
4
- "version": "3.1.16",
4
+ "version": "3.1.18",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "license": "MIT",
@@ -25,8 +25,8 @@
25
25
  "globals": "^15.9.0"
26
26
  },
27
27
  "devDependencies": {
28
- "eslint": "~9.9.0",
29
- "linted": "~16.3.3",
28
+ "eslint": "~9.9.1",
29
+ "linted": "~16.3.4",
30
30
  "npm-run-all": "^4.1.5",
31
31
  "typescript": "^5.5.4"
32
32
  },
package/src/index.ts CHANGED
@@ -12,80 +12,69 @@ export default function (
12
12
  try {
13
13
  const F = new Files(files),
14
14
  R = new Rulesets(rules),
15
- Pa: { [S in Scope]: ConstructorParameters<typeof Options[S]>[3] } = {
16
- js: [] as const,
17
- ts: [parsers.ts] as const,
18
- svelte: [parsers.svelte, parsers.ts] as const,
19
- mocha: [parsers.ts] as const,
20
- html: [parsers.html] as const,
21
- json: [parsers.jsonc] as const,
22
- jsonc: [parsers.jsonc] as const,
23
- yml: [parsers.yml] as const,
24
- md: [parsers.md] as const,
25
- } as const,
26
15
  options: { [S in Scope]: InstanceType<typeof Options[S]>["configs"] } = {
27
16
  js: new Options
28
17
  .js(
29
18
  F.files("js"),
30
19
  R.ruleset("js"),
31
20
  { "@stylistic": plugins["@stylistic"] },
32
- Pa.js,
21
+ [],
33
22
  ).configs,
34
23
  ts: new Options
35
24
  .ts(
36
25
  F.files("ts"),
37
26
  R.ruleset("ts"),
38
27
  { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] },
39
- Pa.ts,
28
+ [parsers.ts],
40
29
  ).configs,
41
30
  svelte: new Options
42
31
  .svelte(
43
32
  F.files("svelte"),
44
33
  R.ruleset("svelte"),
45
34
  { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte },
46
- Pa.svelte,
35
+ [parsers.svelte, parsers.ts],
47
36
  ).configs,
48
37
  mocha: new Options
49
38
  .mocha(
50
39
  F.files("mocha"),
51
40
  R.ruleset("mocha"),
52
41
  { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha },
53
- Pa.mocha,
42
+ [parsers.ts],
54
43
  ).configs,
55
44
  html: new Options
56
45
  .html(
57
46
  F.files("html"),
58
47
  R.ruleset("html"),
59
48
  { "@html-eslint": plugins["@html-eslint"] },
60
- Pa.html,
49
+ [parsers.html],
61
50
  ).configs,
62
51
  json: new Options
63
52
  .json(
64
53
  F.files("json"),
65
54
  R.ruleset("json"),
66
55
  { jsonc: plugins.jsonc },
67
- Pa.json,
56
+ [parsers.jsonc],
68
57
  ).configs,
69
58
  jsonc: new Options
70
59
  .jsonc(
71
60
  F.files("jsonc"),
72
61
  R.ruleset("jsonc"),
73
62
  { jsonc: plugins.jsonc },
74
- Pa.jsonc,
63
+ [parsers.jsonc],
75
64
  ).configs,
76
65
  yml: new Options
77
66
  .yml(
78
67
  F.files("yml"),
79
68
  R.ruleset("yml"),
80
69
  { yml: plugins.yml },
81
- Pa.yml,
70
+ [parsers.yml],
82
71
  ).configs,
83
72
  md: new Options
84
73
  .md(
85
74
  F.files("md"),
86
75
  R.ruleset("md"),
87
76
  { markdownlint: plugins.markdownlint },
88
- Pa.md,
77
+ [parsers.md],
89
78
  ).configs,
90
79
  };
91
80