@eslinted/core 20.0.0-rc.0 → 20.0.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.
@@ -1,8 +1,8 @@
1
1
  import type { Input } from "../interface/index.js";
2
2
  import type * as Model from "./model";
3
- export declare class Factory<RequiredPlugin extends string, RequiredParser extends string, OptionalImport extends string, Scope extends string> {
3
+ export declare class Factory<RequiredPlugin extends string, RequiredParser extends string, OptionalScope extends string, Scope extends string> {
4
4
  private readonly registry;
5
- parsers: Record<RequiredParser, unknown> & Partial<Record<OptionalImport, unknown>>;
5
+ parsers: Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>;
6
6
  global: {
7
7
  settings: {
8
8
  name: "linted/*/settings/";
@@ -28,7 +28,7 @@ export declare class Factory<RequiredPlugin extends string, RequiredParser exten
28
28
  rules: import("../interface/index.js").Config["rules"];
29
29
  }[]>;
30
30
  };
31
- constructor(tree: Model.ITree<Scope>, registry: Record<Scope, Model.IManifest<RequiredParser | OptionalImport>>, parsers: Record<RequiredParser, unknown> & Partial<Record<OptionalImport, unknown>>, defaults: Input<RequiredPlugin, RequiredParser, OptionalImport, Scope>["configuration"]["defaults"], { "*": globalExtension, ...scopeExtensions }?: Input<RequiredPlugin, RequiredParser, OptionalImport, Scope>["configuration"]["extensions"]);
31
+ constructor(optionalScopes: readonly Scope[], tree: Model.ITree<Scope>, registry: Record<Scope, Model.IManifest<RequiredParser | OptionalScope>>, parsers: Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>, defaults: Input<RequiredPlugin, RequiredParser, OptionalScope, Scope>["configuration"]["defaults"], { "*": globalExtension, ...scopeExtensions }?: Input<RequiredPlugin, RequiredParser, OptionalScope, Scope>["configuration"]["extensions"]);
32
32
  get globals(): readonly [
33
33
  {
34
34
  name: "linted/*/settings/";
@@ -56,9 +56,9 @@ export declare class Factory<RequiredPlugin extends string, RequiredParser exten
56
56
  processor?: string;
57
57
  languageOptions?: {
58
58
  parserOptions?: {
59
- parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalImport, unknown>>)[RequiredParser | OptionalImport];
59
+ parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>)[RequiredParser | OptionalScope];
60
60
  };
61
- parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalImport, unknown>>)[RequiredParser | OptionalImport];
61
+ parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>)[RequiredParser | OptionalScope];
62
62
  globals?: {
63
63
  readonly define: false;
64
64
  readonly require: false;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,KAAK,KAAK,MAAM,SAAS,CAAC;AAEtC,qBAAa,OAAO,CAClB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM,EAC7B,KAAK,SAAS,MAAM;IAOlB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAOlB,OAAO,EAAE,MAAM,CACpB,cAAc,EACd,OAAO,CACR,GAAG,OAAO,CACT,MAAM,CACJ,cAAc,EACd,OAAO,CACR,CACF;IApBI,MAAM;;;;;;;;;;;;;;;;MAAC;IACP,MAAM;;;;;;;MAAC;gBAGZ,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EACP,QAAQ,EAAE,MAAM,CAC/B,KAAK,EACL,KAAK,CAAC,SAAS,CACX,cAAc,GACd,cAAc,CACjB,CACF,EACM,OAAO,EAAE,MAAM,CACpB,cAAc,EACd,OAAO,CACR,GAAG,OAAO,CACT,MAAM,CACJ,cAAc,EACd,OAAO,CACR,CACF,EACD,QAAQ,EAAE,KAAK,CACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,KAAK,CACN,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmI1B"}
@@ -4,7 +4,7 @@ export class Factory {
4
4
  parsers;
5
5
  global;
6
6
  scopes;
7
- constructor(tree, registry, parsers, defaults, { "*": globalExtension = {}, ...scopeExtensions } = {}) {
7
+ constructor(optionalScopes, tree, registry, parsers, defaults, { "*": globalExtension = {}, ...scopeExtensions } = {}) {
8
8
  this.registry = registry;
9
9
  this.parsers = parsers;
10
10
  const { noInlineConfig = defaults
@@ -66,21 +66,24 @@ export class Factory {
66
66
  rules: userRules,
67
67
  });
68
68
  }
69
+ const OptionalScopes = new Set(optionalScopes);
69
70
  for (const [scope, parents] of tree)
70
- for (const parent of parents) {
71
- this
72
- .scopes
73
- .files[parent]
74
- .push(...this
75
- .scopes
76
- .files[scope]);
77
- this
78
- .scopes
79
- .ignores[parent]
80
- .push(...this
81
- .scopes
82
- .ignores[scope]);
83
- }
71
+ if (!OptionalScopes.has(scope)
72
+ || scope in parsers)
73
+ for (const parent of parents) {
74
+ this
75
+ .scopes
76
+ .files[parent]
77
+ .push(...this
78
+ .scopes
79
+ .files[scope]);
80
+ this
81
+ .scopes
82
+ .ignores[parent]
83
+ .push(...this
84
+ .scopes
85
+ .ignores[scope]);
86
+ }
84
87
  }
85
88
  get globals() {
86
89
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,MAAM,OAAO,OAAO;IAWC;IAOV;IAZF,MAAM,CAAC;IACP,MAAM,CAAC;IAEd,YACE,IAAwB,EACP,QAMhB,EACM,OAQN,EACD,QAK8B,EAC9B,EACE,GAAG,EAAE,eAAe,GAAG,EAAE,EACzB,GAAG,eAAe,KAMe,EAAE;QA9BpB,aAAQ,GAAR,QAAQ,CAMxB;QACM,YAAO,GAAP,OAAO,CAQb;QAiBD,MAAM,EACJ,cAAc,GAAG,QAAQ;aACtB,QAAQ;aACR,cAAc,EACjB,6BAA6B,GAAG,QAAQ;aACrC,QAAQ;aACR,6BAA6B,EAChC,UAAU,GAAG,QAAQ;aAClB,QAAQ;aACR,UAAU,EACb,WAAW,GAAG,QAAQ;aACnB,QAAQ;aACR,WAAW,GACf,GAAG,eAAe,EACnB,EACE,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,KAAK,GACjB,GAAG,eAAe,CAAC;QAEpB,IAAI,CAAC,MAAM,GAAG;YACZ,QAAQ,EAAE;gBACR,IAAI,EAAE,oBAA6B;gBACnC,aAAa,EAAE;oBACb,cAAc;oBACd,6BAA6B;iBAC9B;gBACD,eAAe,EAAE;oBACf,UAAU;oBACV,WAAW;iBACZ;aACF;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,mBAA4B;gBAClC,OAAO,EAAE;oBACP,GAAG,QAAQ;wBACT,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,QAAQ;6BACP,OAAO,CAAC,GAAG,CAAC;oBACjB,GAAG,OAAO;iBACX;aACF;SACF,CAAC;QACF,IAAI,CAAC,MAAM,GA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AAC;6CAC7B;wCACL,GAAG,SAAS,KAAK,IAAI;+CAClB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;4CAClD,CAAC,CAAC,EAAE;4CACJ,CAAC,CAAC;gDACE,aAAa,EAAE;oDACb,GAAG,kBAAkB;oDACrB,GAAG,SAAS,KAAK,IAAI;wDACnB,CAAC,CAAC,EAAE;wDACJ,CAAC,CAAC;4DACE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;yDAChC;iDACN;6CACF;qCACN;iCACF;4BACL,GAAG,SAAS,KAAK,IAAI;gCACnB,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC,EAAE,SAAS,EAAE;4BACjB,GAAG,QAAQ,KAAK,IAAI;gCAClB,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC,EAAE,QAAQ,EAAE;yBACjB;wBACD,GAAG,OAAO,CAAC,GAAG,CACZ,CACE,EACE,EAAE,EACF,KAAK,GACN,EACD,EAAE;4BACF,OAAO;gCACL,IAAI,EAAE,UAAU,EAAE,GAAY;gCAC9B,KAAK;gCACL,OAAO;gCACP,KAAK;6BACN,CAAC;wBACJ,CAAC,CACF;qBACF,CAAC;IACZ,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Input } from "./interface/index.js";
2
- import type { RequiredPlugin, RequiredParser, OptionalImport } from "./scope/index.js";
3
- import { scopes } from "./scope/index.js";
4
- export default function ({ imports: { required: { plugins, parsers, }, optional, }, configuration: { defaults, extensions, }, }: Input<RequiredPlugin, RequiredParser, OptionalImport, (typeof scopes[number])>): unknown[];
2
+ import type { RequiredPlugin, RequiredParser } from "./scope/index.js";
3
+ import { scopes, optionalScopes } from "./scope/index.js";
4
+ export default function ({ imports: { required: { plugins, parsers, }, optional, }, configuration: { defaults, extensions, }, }: Input<RequiredPlugin, RequiredParser, (typeof optionalScopes[number]), (typeof scopes[number])>): unknown[];
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EAEN,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EAGP,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EAAE,EACP,QAAQ,EAAE,EACR,OAAO,EACP,OAAO,GACR,EACD,QAAa,GACd,EACD,aAAa,EAAE,EACb,QAAQ,EACR,UAAU,GACX,GACF,EAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,cAAc,EACd,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CACxB,aAgDF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EAEN,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EACN,cAAc,EAGf,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EAAE,EACP,QAAQ,EAAE,EACR,OAAO,EACP,OAAO,GACR,EACD,QAAa,GACd,EACD,aAAa,EAAE,EACb,QAAQ,EACR,UAAU,GACX,GACF,EAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,EAC/B,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CACxB,aAiDF"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { scopes, tree, registry, } from "./scope/index.js";
1
+ import { scopes, optionalScopes, tree, registry, } from "./scope/index.js";
2
2
  import { Factory } from "./factory/index.js";
3
3
  export default function ({ imports: { required: { plugins, parsers, }, optional = {}, }, configuration: { defaults, extensions, }, }) {
4
4
  try {
5
- const factory = new Factory(tree, registry, {
5
+ const factory = new Factory(optionalScopes, tree, registry, {
6
6
  ...parsers,
7
7
  ..."svelte" in optional
8
8
  ? {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EAAE,EACP,QAAQ,EAAE,EACR,OAAO,EACP,OAAO,GACR,EACD,QAAQ,GAAG,EAAE,GACd,EACD,aAAa,EAAE,EACb,QAAQ,EACR,UAAU,GACX,GAMF;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAMvB,IAAI,EACJ,QAAQ,EACR;YACE,GAAG,OAAO;YACV,GAAG,QAAQ,IAAI,QAAQ;gBACrB,CAAC,CAAC;oBACE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM;iBAC/B;gBACH,CAAC,CAAC,EAAE;SACP,EACD,QAAQ,EACR,UAAU,CACT,CAAC;QAEN,OAAO;YACL;gBACE,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,GAAG,QAAQ,IAAI,QAAQ;wBACrB,CAAC,CAAC;4BACE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM;yBAC/B;wBACH,CAAC,CAAC,EAAE;iBACP;aACF;YACD,GAAG,OAAO,CAAC,OAAO;YAClB,GAAG,MAAM;iBACN,OAAO,CACN,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9B;SAC0B,CAAC;IAClC,CAAC;IACD,OAAO,CAAC,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,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,4 +1,3 @@
1
1
  export type { RequiredPlugin } from "./plugins.js";
2
2
  export type { RequiredParser } from "./parsers.js";
3
- export type { OptionalImport } from "./optional.js";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scope/dependencies/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scope/dependencies/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -10,7 +10,10 @@ export declare const scopes: readonly [
10
10
  "jsoncc",
11
11
  "yml"
12
12
  ];
13
+ export declare const optionalScopes: readonly [
14
+ "svelte"
15
+ ];
13
16
  export { tree } from "./tree/index.js";
14
17
  export { registry } from "./registry/index.js";
15
- export type { RequiredPlugin, RequiredParser, OptionalImport, } from "./dependencies/index.js";
18
+ export type { RequiredPlugin, RequiredParser, } from "./dependencies/index.js";
16
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,2FAWT,CAAC;AACX,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,2FAWT,CAAC;AACX,eAAO,MAAM,cAAc,qBAAsB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,cAAc,EACd,cAAc,GACf,MAAM,gBAAgB,CAAC"}
@@ -10,6 +10,7 @@ export const scopes = [
10
10
  "jsoncc",
11
11
  "yml",
12
12
  ];
13
+ export const optionalScopes = ["svelte"];
13
14
  export { tree } from "./tree/index.js";
14
15
  export { registry } from "./registry/index.js";
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;CACG,CAAC;AACX,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;CACG,CAAC;AACX,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,CAAU,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "$schema": "https://json.schemastore.org/package",
4
4
  "$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
5
5
  "name": "@eslinted/core",
6
- "version": "20.0.0-rc.0",
6
+ "version": "20.0.0",
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
8
8
  "private": false,
9
9
  "engineStrict": true,
@@ -5,19 +5,20 @@ import type * as Model from "./model";
5
5
  export class Factory<
6
6
  RequiredPlugin extends string,
7
7
  RequiredParser extends string,
8
- OptionalImport extends string,
8
+ OptionalScope extends string,
9
9
  Scope extends string,
10
10
  > {
11
11
  public global;
12
12
  public scopes;
13
13
 
14
14
  constructor(
15
+ optionalScopes: readonly Scope[],
15
16
  tree: Model.ITree<Scope>,
16
17
  private readonly registry: Record<
17
18
  Scope,
18
19
  Model.IManifest<
19
20
  | RequiredParser
20
- | OptionalImport
21
+ | OptionalScope
21
22
  >
22
23
  >,
23
24
  public parsers: Record<
@@ -25,14 +26,14 @@ export class Factory<
25
26
  unknown
26
27
  > & Partial<
27
28
  Record<
28
- OptionalImport,
29
+ OptionalScope,
29
30
  unknown
30
31
  >
31
32
  >,
32
33
  defaults: Input<
33
34
  RequiredPlugin,
34
35
  RequiredParser,
35
- OptionalImport,
36
+ OptionalScope,
36
37
  Scope
37
38
  >["configuration"]["defaults"],
38
39
  {
@@ -41,7 +42,7 @@ export class Factory<
41
42
  }: Input<
42
43
  RequiredPlugin,
43
44
  RequiredParser,
44
- OptionalImport,
45
+ OptionalScope,
45
46
  Scope
46
47
  >["configuration"]["extensions"] = {},
47
48
  ) {
@@ -126,25 +127,33 @@ export class Factory<
126
127
  );
127
128
  }
128
129
 
130
+ const OptionalScopes = new Set<Scope>(
131
+ optionalScopes,
132
+ );
133
+
129
134
  for (const [scope, parents] of tree)
130
- for (const parent of parents) {
131
- this
132
- .scopes
133
- .files[parent]
134
- .push(
135
- ...this
136
- .scopes
137
- .files[scope],
138
- );
139
- this
140
- .scopes
141
- .ignores[parent]
142
- .push(
143
- ...this
144
- .scopes
145
- .ignores[scope],
146
- );
147
- }
135
+ if (
136
+ !OptionalScopes.has(scope)
137
+ || scope in parsers
138
+ )
139
+ for (const parent of parents) {
140
+ this
141
+ .scopes
142
+ .files[parent]
143
+ .push(
144
+ ...this
145
+ .scopes
146
+ .files[scope],
147
+ );
148
+ this
149
+ .scopes
150
+ .ignores[parent]
151
+ .push(
152
+ ...this
153
+ .scopes
154
+ .ignores[scope],
155
+ );
156
+ }
148
157
  }
149
158
 
150
159
  public get globals() {
package/src/index.ts CHANGED
@@ -5,10 +5,10 @@ import type {
5
5
  import type {
6
6
  RequiredPlugin,
7
7
  RequiredParser,
8
- OptionalImport,
9
8
  } from "./scope";
10
9
  import {
11
10
  scopes,
11
+ optionalScopes,
12
12
  tree,
13
13
  registry,
14
14
  } from "./scope";
@@ -30,7 +30,7 @@ export default function (
30
30
  }: Input<
31
31
  RequiredPlugin,
32
32
  RequiredParser,
33
- OptionalImport,
33
+ (typeof optionalScopes[number]),
34
34
  (typeof scopes[number])
35
35
  >,
36
36
  ) {
@@ -38,9 +38,10 @@ export default function (
38
38
  const factory = new Factory<
39
39
  RequiredPlugin,
40
40
  RequiredParser,
41
- OptionalImport,
41
+ (typeof optionalScopes[number]),
42
42
  (typeof scopes[number])
43
43
  >(
44
+ optionalScopes,
44
45
  tree,
45
46
  registry,
46
47
  {
@@ -1,3 +1,2 @@
1
1
  export type { RequiredPlugin } from "./plugins";
2
2
  export type { RequiredParser } from "./parsers";
3
- export type { OptionalImport } from "./optional";
@@ -10,10 +10,10 @@ export const scopes = [
10
10
  "jsoncc",
11
11
  "yml",
12
12
  ] as const;
13
+ export const optionalScopes = ["svelte"] as const;
13
14
  export { tree } from "./tree";
14
15
  export { registry } from "./registry";
15
16
  export type {
16
17
  RequiredPlugin,
17
18
  RequiredParser,
18
- OptionalImport,
19
19
  } from "./dependencies";
@@ -1,2 +0,0 @@
1
- export type OptionalImport = "svelte";
2
- //# sourceMappingURL=optional.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"optional.d.ts","sourceRoot":"","sources":["../../../src/scope/dependencies/optional.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=optional.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../src/scope/dependencies/optional.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export type OptionalImport = "svelte";