@eslinted/core 13.3.0-rc.0 → 13.3.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import type Options from "./settings/index.js";
1
+ import type { ScopeSettings } from "./settings/index.js";
2
2
  import type { Input } from "../interface/input/index.js";
3
3
  export declare class Factory {
4
4
  readonly common: {
@@ -24,7 +24,7 @@ export declare class Factory {
24
24
  readonly rules: Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", import("../interface/shared/config/rule/index.js").NamedBag[]>>;
25
25
  };
26
26
  constructor({ settings: defaultSettings, files: defaultFiles, ignores: defaultIgnores, rules: defaultRules, }: Input["defaults"], { "*": commonExtension, ...scopeExtensions }?: Input["extensions"]);
27
- scope<S extends keyof typeof Options>(scope: S, settings: InstanceType<typeof Options[S]>): readonly [
27
+ scope<S extends keyof typeof ScopeSettings>(scope: S, settings: InstanceType<typeof ScopeSettings[S]>): readonly [
28
28
  ] | ({
29
29
  readonly languageOptions: {
30
30
  readonly parser: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,OAAO;IAClB,SAAgB,MAAM;;;;;;;;;;;;;;;;MAAC;IACvB,SAAgB,MAAM;;;;MAAC;gBAGrB,EACE,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,GACpB,EAAE,KAAK,CAAC,UAAU,CAAC,EACpB,EAAE,GAAG,EAAE,eAAoB,EAAE,GAAG,eAAe,EAAE,GAAE,KAAK,CAAC,YAAY,CAAe;IAgD/E,KAAK,CAAC,CAAC,SAAS,MAAM,OAAO,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBjG"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,OAAO;IAClB,SAAgB,MAAM;;;;;;;;;;;;;;;;MAAC;IACvB,SAAgB,MAAM;;;;MAAC;gBAGrB,EACE,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,GACpB,EAAE,KAAK,CAAC,UAAU,CAAC,EACpB,EAAE,GAAG,EAAE,eAAoB,EAAE,GAAG,eAAe,EAAE,GAAE,KAAK,CAAC,YAAY,CAAe;IAgD/E,KAAK,CAAC,CAAC,SAAS,MAAM,OAAO,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB7G"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,OAAO;IACF,MAAM,CAAC;IACP,MAAM,CAAC;IAEvB,YACE,EACE,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,GACD,EACpB,EAAE,GAAG,EAAE,eAAe,GAAG,EAAE,EAAE,GAAG,eAAe,KAA0B,EAAW;QAEpF,MAAM,EACJ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AW,EAAE,SAAS,CAAC,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;IAEM,KAAK,CAAuC,KAAQ,EAAE,QAA+C;QAC1G,MAAM,EACJ,KAAK,EAAE,EACL,CAAC,KAAK,CAAC,EAAE,KAAK,GACf,EACD,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAC7B,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,GAC1B,GAAG,IAAI,CAAC,MAAM,EACf,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,EAAE,EAAE,KAAK,EAAY,CAAA,CAAC,CAAC;QAEjF,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAW;YACb,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAChC,IAAI,EAAE,UAAU,EAAE,EAAE;gBACpB,KAAK;gBACL,OAAO;gBACP,KAAK;gBACL,GAAG,QAAQ,CAAC,MAAM;aACT,CAAA,CAAC,CAAC;IACjB,CAAC;CACF"}
@@ -1,4 +1,3 @@
1
1
  export * from "./factory.js";
2
- import Options from "./settings/index.js";
3
- export { Options };
2
+ export * from "./settings/index.js";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1,4 +1,3 @@
1
1
  export * from "./factory.js";
2
- import Options from "./settings/index.js";
3
- export { Options };
2
+ export * from "./settings/index.js";
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -7,7 +7,7 @@ import json from "./scopes/json.js";
7
7
  import jsonc from "./scopes/jsonc.js";
8
8
  import yml from "./scopes/yml.js";
9
9
  export type * from "./setting.js";
10
- declare const _default: {
10
+ export declare const ScopeSettings: {
11
11
  readonly js: typeof js;
12
12
  readonly ts: typeof ts;
13
13
  readonly svelte: typeof svelte;
@@ -17,5 +17,4 @@ declare const _default: {
17
17
  readonly jsonc: typeof jsonc;
18
18
  readonly yml: typeof yml;
19
19
  };
20
- export default _default;
21
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,mBAAmB,WAAW,CAAC;;;;;;;;;;;AAC/B,wBASW"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,mBAAmB,WAAW,CAAC;AAC/B,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC"}
@@ -6,7 +6,7 @@ import html from "./scopes/html.js";
6
6
  import json from "./scopes/json.js";
7
7
  import jsonc from "./scopes/jsonc.js";
8
8
  import yml from "./scopes/yml.js";
9
- export default {
9
+ export const ScopeSettings = {
10
10
  js,
11
11
  ts,
12
12
  svelte,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAG/B,eAAe;IACb,EAAE;IACF,EAAE;IACF,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;CACK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAG/B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE;IACF,EAAE;IACF,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;CACK,CAAC"}
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { scopes } from "./scopes/index.js";
2
- import { Factory, Options } from "./factory/index.js";
2
+ import { Factory, ScopeSettings } from "./factory/index.js";
3
3
  export default function ({ imports: { plugins, parsers }, defaults, extensions, }) {
4
4
  try {
5
5
  const factory = new Factory(defaults, extensions), options = {
6
- js: new Options.js([]),
7
- ts: new Options.ts([parsers.ts]),
8
- svelte: new Options.svelte([parsers.svelte, parsers.ts]),
9
- mocha: new Options.mocha([parsers.ts]),
10
- html: new Options.html([parsers.html]),
11
- json: new Options.json([parsers.jsonc]),
12
- jsonc: new Options.jsonc([parsers.jsonc]),
13
- yml: new Options.yml([parsers.yml]),
6
+ js: new ScopeSettings.js([]),
7
+ ts: new ScopeSettings.ts([parsers.ts]),
8
+ svelte: new ScopeSettings.svelte([parsers.svelte, parsers.ts]),
9
+ mocha: new ScopeSettings.mocha([parsers.ts]),
10
+ html: new ScopeSettings.html([parsers.html]),
11
+ json: new ScopeSettings.json([parsers.jsonc]),
12
+ jsonc: new ScopeSettings.jsonc([parsers.jsonc]),
13
+ yml: new ScopeSettings.yml([parsers.yml]),
14
14
  };
15
15
  return [
16
16
  { name: `linted/*/plugins`, plugins },
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAC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AAO,CAAC,GAAG,CAAU,CAAC;SAC1C,CAAC;QAEX,OAAO;YACL,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAW;YAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ;YACvB,OAAO,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;SACxD,CAAC;IACb,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_schemaVersion": "22.11.0",
3
3
  "name": "@eslinted/core",
4
- "version": "13.3.0-rc.0",
4
+ "version": "13.3.0-rc.1",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
@@ -1,4 +1,4 @@
1
- import type Options from "./settings";
1
+ import type { ScopeSettings } from "./settings";
2
2
  import type { Input } from "../interface/input";
3
3
 
4
4
  export class Factory {
@@ -60,7 +60,7 @@ export class Factory {
60
60
  }
61
61
  }
62
62
 
63
- public scope<S extends keyof typeof Options>(scope: S, settings: InstanceType<typeof Options[S]>) {
63
+ public scope<S extends keyof typeof ScopeSettings>(scope: S, settings: InstanceType<typeof ScopeSettings[S]>) {
64
64
  const {
65
65
  files: {
66
66
  [scope]: files,
@@ -1,4 +1,2 @@
1
1
  export * from "./factory";
2
- import Options from "./settings";
3
-
4
- export { Options };
2
+ export * from "./settings";
@@ -8,7 +8,7 @@ import jsonc from "./scopes/jsonc";
8
8
  import yml from "./scopes/yml";
9
9
 
10
10
  export type * from "./setting";
11
- export default {
11
+ export const ScopeSettings = {
12
12
  js,
13
13
  ts,
14
14
  svelte,
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Input, Output } from "./interface";
2
2
  import { scopes } from "./scopes";
3
- import { Factory, Options } from "./factory";
3
+ import { Factory, ScopeSettings } from "./factory";
4
4
 
5
5
  export type * from "./interface";
6
6
  export type * from "./scopes";
@@ -11,15 +11,15 @@ export default function ({
11
11
  }: Input): Output {
12
12
  try {
13
13
  const factory = new Factory(defaults, extensions),
14
- options: { readonly [S in typeof scopes[number]]: InstanceType<typeof Options[S]> } = {
15
- js: new Options.js([] as const),
16
- ts: new Options.ts([parsers.ts] as const),
17
- svelte: new Options.svelte([parsers.svelte, parsers.ts] as const),
18
- mocha: new Options.mocha([parsers.ts] as const),
19
- html: new Options.html([parsers.html] as const),
20
- json: new Options.json([parsers.jsonc] as const),
21
- jsonc: new Options.jsonc([parsers.jsonc] as const),
22
- yml: new Options.yml([parsers.yml] as const),
14
+ options: { readonly [S in typeof scopes[number]]: InstanceType<typeof ScopeSettings[S]> } = {
15
+ js: new ScopeSettings.js([] as const),
16
+ ts: new ScopeSettings.ts([parsers.ts] as const),
17
+ svelte: new ScopeSettings.svelte([parsers.svelte, parsers.ts] as const),
18
+ mocha: new ScopeSettings.mocha([parsers.ts] as const),
19
+ html: new ScopeSettings.html([parsers.html] as const),
20
+ json: new ScopeSettings.json([parsers.jsonc] as const),
21
+ jsonc: new ScopeSettings.jsonc([parsers.jsonc] as const),
22
+ yml: new ScopeSettings.yml([parsers.yml] as const),
23
23
  } as const;
24
24
 
25
25
  return [