@eslinted/core 24.3.0-rc.5 → 24.4.0-rc.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 +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,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GACF,EAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EACvB,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAChC,aAgCF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GACF,EAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EACvB,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAChC,aAgCF"}
package/dist/index.js CHANGED
@@ -3,11 +3,8 @@ import { Factory } from "./factory.js";
3
3
  export default function ({ imports, configuration: { settings, defaults, extensions, attachments, }, }) {
4
4
  try {
5
5
  const factory = new Factory(tree, optionalScopes, imports, settings, defaults, extensions, attachments);
6
- return [
7
- ...factory.globals,
8
- ...scopes.flatMap(scope => factory.scope(scope)),
9
- ...factory.attachments,
10
- ];
6
+ return factory.globals
7
+ .concat(scopes.flatMap(scope => factory.scope(scope)), factory.attachments);
11
8
  }
12
9
  catch (e) {
13
10
  throw TypeError("linted-core: ", { cause: e });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,GACL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GAMF;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAMzB,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,CACZ,CAAC;QAEF,OAAO;YACL,GAAG,OAAO,CAAC,OAAO;YAClB,GAAG,MAAM,CAAC,OAAO,CACf,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9B;YACD,GAAG,OAAO,CAAC,WAAW;SACO,CAAC;IAClC,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,SAAS,CACb,eAAe,EACf,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,GACL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GAMF;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAMzB,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,CACZ,CAAC;QAEF,OAAQ,OAAO,CAAC,OAA8B;aAC3C,MAAM,CACL,MAAM,CAAC,OAAO,CACZ,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9B,EACD,OAAO,CAAC,WAAW,CACpB,CAAC;IACN,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,SAAS,CACb,eAAe,EACf,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,4 +1,3 @@
1
1
  export type * from "./input/index.js";
2
- export type * from "./output";
3
2
  export type * from "./config/index.js";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,UAAU,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": "24.3.0-rc.5",
6
+ "version": "24.4.0-rc.0",
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
8
8
  "description": "Internal core for npm package `linted`, responsible for producing an array of fully-formed ESLint configurations according to `linted` spec.",
9
9
  "keywords": [],
package/src/index.ts CHANGED
@@ -1,7 +1,4 @@
1
- import type {
2
- Input,
3
- Output,
4
- } from "./interface";
1
+ import type { Input } from "./interface";
5
2
  import type {
6
3
  RequiredPlugin,
7
4
  RequiredParser,
@@ -45,13 +42,13 @@ export default function (
45
42
  attachments,
46
43
  );
47
44
 
48
- return [
49
- ...factory.globals,
50
- ...scopes.flatMap(
51
- scope => factory.scope(scope),
52
- ),
53
- ...factory.attachments,
54
- ] satisfies Output as unknown[];
45
+ return (factory.globals as readonly unknown[])
46
+ .concat(
47
+ scopes.flatMap(
48
+ scope => factory.scope(scope),
49
+ ),
50
+ factory.attachments,
51
+ );
55
52
  }
56
53
  catch (e) {
57
54
  throw TypeError(
@@ -1,3 +1,2 @@
1
1
  export type * from "./input";
2
- export type * from "./output";
3
2
  export type * from "./config";
@@ -1,5 +0,0 @@
1
- import type { IConfig } from "../../config/index.js";
2
- export type Attachment = {
3
- files: string[];
4
- } & Partial<Omit<IConfig, "files">>;
5
- //# sourceMappingURL=attachment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/configs/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,UAAU,GAClB;IACF,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,GACC,OAAO,CACP,IAAI,CACF,OAAO,EACP,OAAO,CACR,CACF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=attachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/interface/output/configs/attachment.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import type { IConfig } from "../../config";
2
-
3
- export type Attachment
4
- = & {
5
- files: string[];
6
- }
7
- & Partial<
8
- Omit<
9
- IConfig,
10
- "files"
11
- >
12
- >;
@@ -1,6 +0,0 @@
1
- import type { IConfig } from "../../../config";
2
-
3
- export interface GlobalIgnores {
4
- name: "linted/*/ignores/";
5
- ignores: IConfig["ignores"];
6
- }
@@ -1,3 +0,0 @@
1
- export type { Plugins } from "./plugins";
2
- export type { Settings } from "./settings";
3
- export type { GlobalIgnores } from "./ignores";
@@ -1,6 +0,0 @@
1
- import type { IConfig } from "../../../config";
2
-
3
- export interface Plugins {
4
- name: "linted/*/plugins/";
5
- plugins: IConfig["plugins"];
6
- }
@@ -1,11 +0,0 @@
1
- import type { IConfig } from "../../../config";
2
-
3
- export type Settings = {
4
- name: "linted/*/settings/";
5
- } & Pick<
6
- IConfig,
7
- (
8
- | "linterOptions"
9
- | "languageOptions"
10
- )
11
- >;
@@ -1,3 +0,0 @@
1
- export type * from "./global";
2
- export type * from "./scoped";
3
- export type { Attachment } from "./attachment";
@@ -1,2 +0,0 @@
1
- export type { ScopeSettings } from "./settings";
2
- export type { ScopeRules } from "./rules";
@@ -1,12 +0,0 @@
1
- import type { IConfig } from "../../../config";
2
-
3
- export type ScopeRules = {
4
- name: `linted/${string}`;
5
- } & Pick<
6
- IConfig,
7
- (
8
- | "files"
9
- | "ignores"
10
- | "rules"
11
- )
12
- >;
@@ -1,15 +0,0 @@
1
- import type { IConfig } from "../../../config";
2
-
3
- export type ScopeSettings = {
4
- name: `linted/${string}`;
5
- languageOptions?: object;
6
- } & Pick<
7
- IConfig,
8
- (
9
- | "files"
10
- | "ignores"
11
- | "processor"
12
- | "language"
13
- | "settings"
14
- )
15
- >;
@@ -1,12 +0,0 @@
1
- import type * as Config from "./configs";
2
-
3
- export type Output = readonly [
4
- Config.Plugins,
5
- Config.Settings,
6
- Config.GlobalIgnores,
7
- ...(
8
- | Config.ScopeSettings
9
- | Config.ScopeRules
10
- | Config.Attachment
11
- )[],
12
- ];