@eslinted/core 0.0.1-rc.4 → 0.0.1-rc.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js.map +1 -1
- package/dist/parsers.d.ts +10 -0
- package/dist/parsers.d.ts.map +1 -0
- package/dist/parsers.js +2 -0
- package/dist/parsers.js.map +1 -0
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.d.ts.map +1 -1
- package/dist/rulesets/ruleset/Ruleset.d.ts +1 -1
- package/dist/rulesets/ruleset/Ruleset.d.ts.map +1 -1
- package/dist/rulesets/ruleset/Ruleset.js.map +1 -1
- package/dist/scopes.d.ts +1 -1
- package/dist/scopes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -5
- package/src/options.ts +2 -2
- package/src/parsers.ts +10 -0
- package/src/plugins.ts +2 -2
- package/src/rulesets/ruleset/Ruleset.ts +1 -1
- package/src/scopes.ts +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
2
|
import type Plugins from "./plugins.js";
|
3
|
+
import type Parsers from "./parsers.js";
|
3
4
|
import type Ruleset from "./rulesets/ruleset/Ruleset.js";
|
4
5
|
export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
|
5
6
|
export { Rule } from "./rulesets/ruleset/Ruleset.js";
|
6
|
-
export default function (plugins: Plugins, parsers:
|
7
|
-
[S in
|
7
|
+
export default function (plugins: Plugins, parsers: Parsers, files: Record<Scopes, string[]>, rulesets: {
|
8
|
+
[S in Scopes]: Ruleset<S>;
|
8
9
|
}): IConfig[];
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
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"}
|
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;
|
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,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAgB,EAChB,OAAgB,EAChB,KAA+B,EAC/B,QAAuC;IAEvC,IAAI,CAAC;QACH,MAAM,mBAAmB,GAIrB;YACF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,O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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"}
|
package/dist/options.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;;;;;;;;;;AAE/C,
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;;;;;;;;;;AAE/C,wBAQoC"}
|
package/dist/options.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,eAAe;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,eAAe;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACmB,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
|
+
export default interface Parsers extends Particord<Scopes, unknown> {
|
3
|
+
ts: unknown;
|
4
|
+
svelte: unknown;
|
5
|
+
html: unknown;
|
6
|
+
json: unknown;
|
7
|
+
jsonc: unknown;
|
8
|
+
yml: unknown;
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=parsers.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd"}
|
package/dist/parsers.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":""}
|
package/dist/plugins.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
2
|
type PluginPackage = {
|
3
3
|
configs: unknown;
|
4
4
|
};
|
5
|
-
export default interface Plugins extends Record<
|
5
|
+
export default interface Plugins extends Record<Scopes, Record<string, {
|
6
6
|
configs: unknown;
|
7
7
|
}>> {
|
8
8
|
js: {
|
package/dist/plugins.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,MAAM,CAC7C,MAAM,EACN,MAAM,CACJ,MAAM,EACN;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CACrB,CACF;IACC,EAAE,EAAE;QAAE,YAAY,EAAE,aAAa,CAAA;KAAE,CAAC;IACpC,EAAE,EAAE;QACF,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;QACpC,MAAM,EAAE,aAAa,CAAC;KACvB,CAAC;IACF,IAAI,EAAE;QAAE,cAAc,EAAE,aAAa,CAAA;KAAE,CAAC;IACxC,IAAI,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAC/B,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,CAAC;CAC7B"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import Rule from "./rule/Rule.js";
|
2
2
|
export { default as Rule } from "./rule/Rule.js";
|
3
3
|
export default class Ruleset<Language extends string> {
|
4
|
-
|
4
|
+
readonly language: literalful<Language>;
|
5
5
|
readonly ruleset: readonly Rule[];
|
6
6
|
readonly overrides: Rule[];
|
7
7
|
constructor(language: literalful<Language>, ...ruleset: readonly Rule[]);
|
@@ -1 +1 @@
|
|
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;
|
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 +1 @@
|
|
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;
|
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"}
|
package/dist/scopes.d.ts
CHANGED
package/dist/scopes.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAE3C,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
import scopes from "./scopes.js";
|
2
2
|
import options from "./options.js";
|
3
|
-
import type {
|
3
|
+
import type { Scopes } from "./scopes.js";
|
4
4
|
import type Plugins from "./plugins.js";
|
5
|
+
import type Parsers from "./parsers.js";
|
5
6
|
import type Ruleset from "./rulesets/ruleset/Ruleset.js";
|
6
7
|
|
7
8
|
export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
|
8
9
|
export { Rule } from "./rulesets/ruleset/Ruleset.js";
|
9
10
|
export default function (
|
10
11
|
plugins: Plugins,
|
11
|
-
parsers:
|
12
|
-
files: Record<
|
13
|
-
rulesets: { [S in
|
12
|
+
parsers: Parsers,
|
13
|
+
files: Record<Scopes, string[]>,
|
14
|
+
rulesets: { [S in Scopes]: Ruleset<S> },
|
14
15
|
): IConfig[] {
|
15
16
|
try {
|
16
17
|
const instantiatedOptions: {
|
17
|
-
[S in
|
18
|
+
[S in Scopes]: InstanceType<
|
18
19
|
typeof options[S]
|
19
20
|
>["body"]
|
20
21
|
} = {
|
package/src/options.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
2
|
import JsOption from "./options/JsOption.js";
|
3
3
|
import TsOption from "./options/TsOption.js";
|
4
4
|
import SvelteOption from "./options/SvelteOption.js";
|
@@ -15,4 +15,4 @@ export default {
|
|
15
15
|
json: JsonOption,
|
16
16
|
jsonc: JsoncOption,
|
17
17
|
yml: YmlOption,
|
18
|
-
} satisfies Record<
|
18
|
+
} satisfies Record<Scopes, unknown>;
|
package/src/parsers.ts
ADDED
package/src/plugins.ts
CHANGED
@@ -6,7 +6,7 @@ export default class Ruleset<Language extends string> {
|
|
6
6
|
public readonly overrides: Rule[] = [];
|
7
7
|
|
8
8
|
constructor(
|
9
|
-
|
9
|
+
public readonly language: literalful<Language>,
|
10
10
|
...ruleset: readonly Rule[]
|
11
11
|
) {
|
12
12
|
this.ruleset = [...ruleset];
|
package/src/scopes.ts
CHANGED