@eslinted/core 0.0.1-rc.6 → 0.0.1-rc.7

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import type { Scopes } from "./scopes.js";
2
2
  import type Plugins from "./plugins.js";
3
3
  import type Parsers from "./parsers.js";
4
- import type Ruleset from "./rulesets/ruleset/Ruleset.js";
5
- export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
6
- export { Rule } from "./rulesets/ruleset/Ruleset.js";
4
+ import type Ruleset from "./ruleset/Ruleset.js";
5
+ export { default as Ruleset } from "./ruleset/Ruleset.js";
6
+ export { Rule } from "./ruleset/Ruleset.js";
7
+ export { default as scopes } from "./scopes.js";
8
+ export type { Scopes } from "./scopes.js";
7
9
  export default function (plugins: Plugins, parsers: Parsers, files: Record<Scopes, string[]>, rulesets: {
8
10
  [S in Scopes]: Ruleset<S>;
9
11
  }): IConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,QAAQ,EAAE;KAAG,CAAC,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,GACtC,OAAO,EAAE,CAqGX"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,QAAQ,EAAE;KAAG,CAAC,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,GACtC,OAAO,EAAE,CAqGX"}
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 "./rulesets/ruleset/Ruleset.js";
4
- export { Rule } from "./rulesets/ruleset/Ruleset.js";
3
+ export { default as Ruleset } from "./ruleset/Ruleset.js";
4
+ export { Rule } from "./ruleset/Ruleset.js";
5
+ export { default as scopes } from "./scopes.js";
5
6
  export default function (plugins, parsers, files, rulesets) {
6
7
  try {
7
8
  const instantiatedOptions = {
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;AAMnC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,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AAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,OAAO;iBACJ,IAAI,EACP,OAAO;iBACJ,IAAI,EACP,GAAG,KAAK;iBACL,IAAI,CACR;iBACA,IAAI;YACP,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,OAAO;iBACJ,IAAI,EACP,OAAO;iBACJ,IAAI,EACP,GAAG,KAAK;iBACL,IAAI,CACR;iBACA,IAAI;YACP,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,OAAO;iBACJ,KAAK,EACR,OAAO;iBACJ,KAAK,EACR,GAAG,KAAK;iBACL,KAAK,CACT;iBACA,IAAI;YACP,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,OAAO;iBACJ,GAAG,EACN,OAAO;iBACJ,GAAG,EACN,GAAG,KAAK;iBACL,GAAG,CACP;iBACA,IAAI;SACR,CAAC;QAEF,OAAO,MAAM;aACV,GAAG,CACF,KAAK,CAAC,EAAE,CACN,mBAAmB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACzC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CACxB,KAAK,CAAC,EAAE;gBACN,OAAO;oBACL,KAAK;oBACL,GAAG,mBAAmB,CAAC,KAAK,CAAC;iBAC9B,CAAC;YACJ,CAAC,CACF;YACD,CAAC,CAAC,EAAE,CACT;aACA,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,6BAA6B,EAC7B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,12 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../src/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"}
@@ -0,0 +1,27 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../src/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"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../src/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"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../src/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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslinted/core",
3
- "version": "0.0.1-rc.6",
3
+ "version": "0.0.1-rc.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -3,10 +3,12 @@ import options from "./options.js";
3
3
  import type { Scopes } from "./scopes.js";
4
4
  import type Plugins from "./plugins.js";
5
5
  import type Parsers from "./parsers.js";
6
- import type Ruleset from "./rulesets/ruleset/Ruleset.js";
6
+ import type Ruleset from "./ruleset/Ruleset.js";
7
7
 
8
- export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
9
- export { Rule } from "./rulesets/ruleset/Ruleset.js";
8
+ export { default as Ruleset } from "./ruleset/Ruleset.js";
9
+ export { Rule } from "./ruleset/Ruleset.js";
10
+ export { default as scopes } from "./scopes.js";
11
+ export type { Scopes } from "./scopes.js";
10
12
  export default function (
11
13
  plugins: Plugins,
12
14
  parsers: Parsers,
File without changes
File without changes