@eslinted/core 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- 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 +2 -2
- package/dist/parsers.d.ts.map +1 -1
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.d.ts.map +1 -1
- package/dist/ruleset/Ruleset.d.ts +0 -1
- package/dist/ruleset/Ruleset.d.ts.map +1 -1
- package/dist/ruleset/Ruleset.js +0 -1
- package/dist/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 +11 -7
- package/src/options.ts +2 -2
- package/src/parsers.ts +2 -2
- package/src/plugins.ts +2 -2
- package/src/ruleset/Ruleset.ts +0 -1
- package/src/scopes.ts +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import type IConfig from "./interface/IConfig.js";
|
2
|
-
import type {
|
2
|
+
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
6
|
export { default as Ruleset } from "./ruleset/Ruleset.js";
|
7
|
-
export { Rule } from "./ruleset/
|
8
|
-
export type {
|
7
|
+
export { default as Rule } from "./ruleset/rule/Rule.js";
|
8
|
+
export type { Scope } from "./scopes.js";
|
9
9
|
export type { default as IConfig } from "./interface/IConfig.js";
|
10
|
-
export default function (plugins: Plugins, parsers: Parsers, defaults: Record<
|
11
|
-
[S in
|
12
|
-
}): IConfig[];
|
10
|
+
export default function (plugins: Plugins, parsers: Parsers, defaults: Record<Scope, string[]>, includes: Particord<Scope, string[]>, rulesets: {
|
11
|
+
[S in Scope]: Ruleset<S>;
|
12
|
+
}, overrides: Particord<Scope, IRule>): IConfig[];
|
13
13
|
//# 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,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,
|
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,OAAO,MAAM,cAAc,CAAC;AACxC,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"}
|
package/dist/index.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
import scopes from "./scopes.js";
|
2
2
|
import options from "./options.js";
|
3
3
|
export { default as Ruleset } from "./ruleset/Ruleset.js";
|
4
|
-
export { Rule } from "./ruleset/
|
5
|
-
export default function (plugins, parsers, defaults, includes, rulesets) {
|
4
|
+
export { default as Rule } from "./ruleset/rule/Rule.js";
|
5
|
+
export default function (plugins, parsers, defaults, includes, rulesets, overrides) {
|
6
6
|
try {
|
7
|
+
for (const scope of scopes)
|
8
|
+
rulesets[scope].override(overrides[scope]);
|
7
9
|
const instantiatedOptions = {
|
8
10
|
js: new options
|
9
11
|
.js(plugins.js, ...defaults.js, ...includes.js ?? [])
|
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,IAAI,EAAE,MAAM,
|
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,CACH,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,GAAG,QAAQ,CAAC,IAAI,EAChB,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CACvB;iBACA,IAAI;YACP,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,GAAG,QAAQ,CAAC,IAAI,EAChB,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CACvB;iBACA,IAAI;YACP,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,KAAK,EACb,GAAG,QAAQ,CAAC,KAAK,EACjB,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,CACxB;iBACA,IAAI;YACP,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,GAAG,EACX,GAAG,QAAQ,CAAC,GAAG,EACf,GAAG,QAAQ,CAAC,GAAG,IAAI,EAAE,CACtB;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;iBACd,IAAI;iBACJ,GAAG,CACF,KAAK,CAAC,EAAE;gBACN,OAAO;oBACL,KAAK;oBACL,GAAG,mBAAmB,CAAC,KAAK,CAAC;iBAC9B,CAAC;YACJ,CAAC,CACF;YACH,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"}
|
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,wBAQmC"}
|
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;CACkB,CAAC"}
|
package/dist/parsers.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import type {
|
2
|
-
export default interface Parsers extends Particord<
|
1
|
+
import type { Scope } from "./scopes.js";
|
2
|
+
export default interface Parsers extends Particord<Scope, unknown> {
|
3
3
|
ts: unknown;
|
4
4
|
svelte: unknown;
|
5
5
|
html: unknown;
|
package/dist/parsers.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC;IAChE,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/plugins.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scope } 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<Scope, 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,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,MAAM,CAC7C,KAAK,EACL,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 +1 @@
|
|
1
|
-
{"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../src/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,
|
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,YAWd;IAEM,QAAQ,CAAC,GAAG,SAAS,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE;CAkBpD"}
|
package/dist/ruleset/Ruleset.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../src/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,
|
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,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,KAAK,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAE1C,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -1,25 +1,29 @@
|
|
1
1
|
import scopes from "./scopes.js";
|
2
2
|
import options from "./options.js";
|
3
3
|
import type IConfig from "./interface/IConfig.js";
|
4
|
-
import type {
|
4
|
+
import type { Scope } from "./scopes.js";
|
5
5
|
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
9
|
export { default as Ruleset } from "./ruleset/Ruleset.js";
|
10
|
-
export { Rule } from "./ruleset/
|
11
|
-
export type {
|
10
|
+
export { default as Rule } from "./ruleset/rule/Rule.js";
|
11
|
+
export type { Scope } from "./scopes.js";
|
12
12
|
export type { default as IConfig } from "./interface/IConfig.js";
|
13
13
|
export default function (
|
14
14
|
plugins: Plugins,
|
15
15
|
parsers: Parsers,
|
16
|
-
defaults: Record<
|
17
|
-
includes:
|
18
|
-
rulesets: { [S in
|
16
|
+
defaults: Record<Scope, string[]>,
|
17
|
+
includes: Particord<Scope, string[]>,
|
18
|
+
rulesets: { [S in Scope]: Ruleset<S> },
|
19
|
+
overrides: Particord<Scope, IRule>,
|
19
20
|
): IConfig[] {
|
20
21
|
try {
|
22
|
+
for (const scope of scopes)
|
23
|
+
rulesets[scope].override(overrides[scope]);
|
24
|
+
|
21
25
|
const instantiatedOptions: {
|
22
|
-
[S in
|
26
|
+
[S in Scope]: InstanceType<
|
23
27
|
typeof options[S]
|
24
28
|
>["body"]
|
25
29
|
} = {
|
package/src/options.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scope } 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<Scope, unknown>;
|
package/src/parsers.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Scope } from "./scopes.js";
|
2
2
|
|
3
|
-
export default interface Parsers extends Particord<
|
3
|
+
export default interface Parsers extends Particord<Scope, unknown> {
|
4
4
|
ts: unknown;
|
5
5
|
svelte: unknown;
|
6
6
|
html: unknown;
|
package/src/plugins.ts
CHANGED
package/src/ruleset/Ruleset.ts
CHANGED
package/src/scopes.ts
CHANGED