@eslinted/core 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ import type { Scope } from "./scopes.js";
3
3
  import type Plugins from "./plugins.js";
4
4
  import type { Parsers } from "./parsers.js";
5
5
  import type Ruleset from "./ruleset/Ruleset.js";
6
- export { default as Ruleset } from "./ruleset/Ruleset.js";
7
- export { default as Rule } from "./ruleset/rule/Rule.js";
8
- export type { Scope } from "./scopes.js";
9
- export type { default as IConfig } from "./interface/IConfig.js";
6
+ export * from "./scopes.js";
7
+ export * from "./ruleset/Ruleset.js";
8
+ export * from "./ruleset/rule/Rule.js";
9
+ export type * from "./interface/IConfig.js";
10
10
  export default function (plugins: Plugins, parsers: Parsers, defaults: Record<Scope, string[]>, includes: Particord<Scope, string[]>, rulesets: {
11
11
  [S in Scope]: Ruleset<S>;
12
12
  }, overrides: Particord<Scope, IRule>): IConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjE,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACjC,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACpC,QAAQ,EAAE;KAAG,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,EACtC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GACjC,OAAO,EAAE,CA4FX"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,mBAAmB,wBAAwB,CAAC;AAC5C,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACjC,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACpC,QAAQ,EAAE;KAAG,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,EACtC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GACjC,OAAO,EAAE,CA2FX"}
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import scopes from "./scopes.js";
2
2
  import options from "./options.js";
3
- export { default as Ruleset } from "./ruleset/Ruleset.js";
4
- export { default as Rule } from "./ruleset/rule/Rule.js";
3
+ export * from "./scopes.js";
4
+ export * from "./ruleset/Ruleset.js";
5
+ export * from "./ruleset/rule/Rule.js";
5
6
  export default function (plugins, parsers, defaults, includes, rulesets, overrides) {
6
7
  try {
7
8
  for (const scope of scopes)
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AAOnC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAGzD,MAAM,CAAC,OAAO,WACZ,OAAgB,EAChB,OAAgB,EAChB,QAAiC,EACjC,QAAoC,EACpC,QAAsC,EACtC,SAAkC;IAElC,IAAI,CAAC;QACH,KAAK,MAAM,KAAK,IAAI,MAAM;YACxB,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAE7C,MAAM,mBAAmB,GAIrB;YACF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,OAAO,CAAC,EAAE,EACV,GAAG,QAAQ,CAAC,EAAE,EACd,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,CACrB;iBACA,IAAI;YACP,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,EAAE,EACV,GAAG,QAAQ,CAAC,EAAE,EACd,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,CACrB;iBACA,IAAI;YACP,MAAM,EAAE,IAAI,OAAO;iBAChB,MAAM,CACL,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,EAAE,EACV,GAAG,QAAQ,CAAC,MAAM,EAClB,GAAG,QAAQ,CAAC,MAAM,IAAI,EAAE,CACzB;iBACA,IAAI;YACP,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI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,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IACzC,SAAgB,SAAS,EAAE,IAAI,EAAE,CAAM;gBAGrB,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9C,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;IAK7B,IAAW,EAAE,sCAEZ;IAED,IAAW,IAAI,YAWd;IAEM,QAAQ,CAAC,GAAG,SAAS,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE;CAkBpD"}
1
+ {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../src/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,QAAQ,SAAS,MAAM;aAKhC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IAJhD,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IACzC,SAAgB,SAAS,EAAE,IAAI,EAAE,CAAM;gBAGrB,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9C,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;IAK7B,IAAW,EAAE,sCAEZ;IAED,IAAW,IAAI,YAKd;IAEM,QAAQ,CAAC,GAAG,SAAS,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE;CAcpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../src/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,OAAO;IAKR;IAJF,OAAO,CAAkB;IACzB,SAAS,GAAW,EAAE,CAAC;IAEvC,YACkB,QAA8B,EAC9C,GAAG,OAAwB;QADX,aAAQ,GAAR,QAAQ,CAAsB;QAG9C,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,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AC,KAAK,CAAC,KAAK,CAAC;SAC5C,CAAC;IACJ,CAAC;IAEM,QAAQ,CAAC,GAAG,SAAgC;QACjD,IAAI,CAAC,SAAS,CAAC,IAAI,CACjB,GAAG,SAAS;aACT,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,QAAQ,KAAK,WAAW,CAAC;aACnD,GAAG,CACF,QAAQ,CAAC,EAAE,CAAC,IAAI,IAAI,CAClB,UAAU,EACV,QAAQ,CACT,CACF,CACJ,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslinted/core",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {},
31
31
  "devDependencies": {
32
32
  "eslint": "~8.57.0",
33
- "linted": "~14.4.5",
33
+ "linted": "~15.0.1",
34
34
  "npm-run-all": "^4.1.5",
35
35
  "typescript": "^5.5.3"
36
36
  },
package/src/index.ts CHANGED
@@ -6,10 +6,10 @@ import type Plugins from "./plugins.js";
6
6
  import type { Parsers } from "./parsers.js";
7
7
  import type Ruleset from "./ruleset/Ruleset.js";
8
8
 
9
- export { default as Ruleset } from "./ruleset/Ruleset.js";
10
- export { default as Rule } from "./ruleset/rule/Rule.js";
11
- export type { Scope } from "./scopes.js";
12
- export type { default as IConfig } from "./interface/IConfig.js";
9
+ export * from "./scopes.js";
10
+ export * from "./ruleset/Ruleset.js";
11
+ export * from "./ruleset/rule/Rule.js";
12
+ export type * from "./interface/IConfig.js";
13
13
  export default function (
14
14
  plugins: Plugins,
15
15
  parsers: Parsers,
@@ -87,19 +87,18 @@ export default function (
87
87
 
88
88
  return scopes
89
89
  .map(
90
- scope =>
91
- instantiatedOptions[scope].files.length > 0
92
- ? rulesets[scope]
93
- .flat
94
- .map(
95
- rules => {
96
- return {
97
- rules,
98
- ...instantiatedOptions[scope],
99
- };
100
- },
101
- )
102
- : [],
90
+ scope => instantiatedOptions[scope].files.length > 0
91
+ ? rulesets[scope]
92
+ .flat
93
+ .map(
94
+ rules => {
95
+ return {
96
+ rules,
97
+ ...instantiatedOptions[scope],
98
+ };
99
+ },
100
+ )
101
+ : [],
103
102
  )
104
103
  .flat();
105
104
  }
@@ -2,7 +2,6 @@ declare type IOLanguageEcma<Ecma extends number | IOLanguageEcma.Ecma> = [Ecma]
2
2
  ? Numbered<Ecma> extends never
3
3
  ? object
4
4
  : { ecmaVersion: Numbered<Ecma> }
5
-
6
5
  : [Ecma] extends [string]
7
6
  ? literalful<Ecma> extends never
8
7
  ? object
@@ -17,30 +17,20 @@ export default class Ruleset<Language extends string> {
17
17
 
18
18
  public get flat() {
19
19
  return [
20
- ...this.ruleset.map(
21
- rules =>
22
- rules.rules,
23
- ),
24
- ...this.overrides.map(
25
- rules =>
26
- rules.rules,
27
- ),
20
+ ...this.ruleset.map(rules => rules.rules),
21
+ ...this.overrides.map(rules => rules.rules),
28
22
  ];
29
23
  }
30
24
 
31
25
  public override(...overrides: (undefined | IRule)[]) {
32
26
  this.overrides.push(
33
27
  ...overrides
34
- .filter(
35
- override =>
36
- typeof override !== "undefined",
37
- )
28
+ .filter(override => typeof override !== "undefined")
38
29
  .map(
39
- override =>
40
- new Rule(
41
- "override",
42
- override,
43
- ),
30
+ override => new Rule(
31
+ "override",
32
+ override,
33
+ ),
44
34
  ),
45
35
  );
46
36
 
@@ -1,12 +0,0 @@
1
- import Rule from "./rule/Rule.js";
2
- export { default as Rule } from "./rule/Rule.js";
3
- export default class Ruleset<Language extends string> {
4
- readonly language: literalful<Language>;
5
- readonly ruleset: readonly Rule[];
6
- readonly overrides: Rule[];
7
- constructor(language: literalful<Language>, ...ruleset: readonly Rule[]);
8
- get id(): `ruleset:${literalful<Language>}`;
9
- get flat(): IRule[];
10
- override(...overrides: (undefined | IRule)[]): this;
11
- }
12
- //# sourceMappingURL=Ruleset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/rulesets/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,QAAQ,SAAS,MAAM;aAKhC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IAJhD,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IACzC,SAAgB,SAAS,EAAE,IAAI,EAAE,CAAM;gBAGrB,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9C,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;IAK7B,IAAW,EAAE,sCAEZ;IAED,IAAW,IAAI,YAWd;IAEM,QAAQ,CAAC,GAAG,SAAS,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE;CAkBpD"}
@@ -1,27 +0,0 @@
1
- import Rule from "./rule/Rule.js";
2
- export { default as Rule } from "./rule/Rule.js";
3
- export default class Ruleset {
4
- language;
5
- ruleset;
6
- overrides = [];
7
- constructor(language, ...ruleset) {
8
- this.language = language;
9
- this.ruleset = [...ruleset];
10
- }
11
- get id() {
12
- return `ruleset:${this.language}`;
13
- }
14
- get flat() {
15
- return [
16
- ...this.ruleset.map(rules => rules.rules),
17
- ...this.overrides.map(rules => rules.rules),
18
- ];
19
- }
20
- override(...overrides) {
21
- this.overrides.push(...overrides
22
- .filter(override => typeof override !== "undefined")
23
- .map(override => new Rule("override", override)));
24
- return this;
25
- }
26
- }
27
- //# sourceMappingURL=Ruleset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../src/rulesets/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,OAAO;IAKR;IAJF,OAAO,CAAkB;IACzB,SAAS,GAAW,EAAE,CAAC;IAEvC,YACkB,QAA8B,EAC9C,GAAG,OAAwB;QADX,aAAQ,GAAR,QAAQ,CAAsB;QAG9C,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,IAAW,EAAE;QACX,OAAO,WAAW,IAAI,CAAC,QAAQ,EAAW,CAAC;IAC7C,CAAC;IAED,IAAW,IAAI;QACb,OAAO;YACL,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CACjB,KAAK,CAAC,EAAE,CACN,KAAK,CAAC,KAAK,CACd;YACD,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CACnB,KAAK,CAAC,EAAE,CACN,KAAK,CAAC,KAAK,CACd;SACF,CAAC;IACJ,CAAC;IAEM,QAAQ,CAAC,GAAG,SAAgC;QACjD,IAAI,CAAC,SAAS,CAAC,IAAI,CACjB,GAAG,SAAS;aACT,MAAM,CACL,QAAQ,CAAC,EAAE,CACT,OAAO,QAAQ,KAAK,WAAW,CAClC;aACA,GAAG,CACF,QAAQ,CAAC,EAAE,CACT,IAAI,IAAI,CACN,UAAU,EACV,QAAQ,CACT,CACJ,CACJ,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1,6 +0,0 @@
1
- export default class Rule {
2
- readonly id: string;
3
- readonly rules: IRule;
4
- constructor(id: string, rules: IRule);
5
- }
6
- //# sourceMappingURL=Rule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/rulesets/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,IAAI;aAEL,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK;gBADZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK;CAE/B"}
@@ -1,9 +0,0 @@
1
- export default class Rule {
2
- id;
3
- rules;
4
- constructor(id, rules) {
5
- this.id = id;
6
- this.rules = rules;
7
- }
8
- }
9
- //# sourceMappingURL=Rule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/rulesets/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,IAAI;IAEL;IACA;IAFlB,YACkB,EAAU,EACV,KAAY;QADZ,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAO;IAC3B,CAAC;CACL"}