@eslinted/core 13.4.0-rc.5 → 13.4.0-rc.7
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.
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory/index.js +4 -4
- package/dist/factory/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interface/output/common/ignores.d.ts +1 -3
- package/dist/interface/output/common/ignores.d.ts.map +1 -1
- package/dist/interface/output/common/plugins.d.ts +1 -3
- package/dist/interface/output/common/plugins.d.ts.map +1 -1
- package/dist/interface/output/common/settings.d.ts +1 -3
- package/dist/interface/output/common/settings.d.ts.map +1 -1
- package/dist/interface/output/scope/rules.d.ts +2 -4
- package/dist/interface/output/scope/rules.d.ts.map +1 -1
- package/dist/interface/output/scope/settings.d.ts +3 -4
- package/dist/interface/output/scope/settings.d.ts.map +1 -1
- package/dist/interface/shared/config/index.d.ts +4 -2
- package/dist/interface/shared/config/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/factory/index.ts +4 -4
- package/src/index.ts +1 -1
- package/src/interface/output/common/ignores.ts +1 -1
- package/src/interface/output/common/plugins.ts +1 -1
- package/src/interface/output/common/settings.ts +1 -1
- package/src/interface/output/scope/rules.ts +11 -4
- package/src/interface/output/scope/settings.ts +17 -5
- package/src/interface/shared/config/index.ts +16 -5
package/dist/factory/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare class Factory {
|
|
5
5
|
readonly parsers: Input["imports"]["parsers"];
|
6
6
|
readonly common: {
|
7
7
|
readonly settings: {
|
8
|
-
readonly name: "linted
|
8
|
+
readonly name: "linted/*/";
|
9
9
|
readonly linterOptions: {
|
10
10
|
readonly noInlineConfig: boolean;
|
11
11
|
readonly reportUnusedDisableDirectives: "error" | "warn" | "off";
|
@@ -16,7 +16,7 @@ export declare class Factory {
|
|
16
16
|
};
|
17
17
|
};
|
18
18
|
readonly ignores: {
|
19
|
-
readonly name: "linted/*/ignores";
|
19
|
+
readonly name: "linted/*/ignores/";
|
20
20
|
readonly ignores: readonly string[];
|
21
21
|
};
|
22
22
|
};
|
@@ -28,7 +28,7 @@ export declare class Factory {
|
|
28
28
|
constructor(tree: typeof Tree, parsers: Input["imports"]["parsers"], { settings: defaultSettings, files: defaultFiles, ignores: defaultIgnores, rules: defaultRules, }: Input["defaults"], { "*": commonExtension, ...scopeExtensions }?: Input["extensions"]);
|
29
29
|
scope<S extends keyof typeof ScopeManifests>(scope: S): readonly [
|
30
30
|
] | ({
|
31
|
-
readonly name: `linted/${S}/${string}
|
31
|
+
readonly name: `linted/${S}/${string}/`;
|
32
32
|
readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "json" | "js", string[]>>[S];
|
33
33
|
readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "json" | "js", string[]>>[S];
|
34
34
|
readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
|
@@ -91,7 +91,7 @@ export declare class Factory {
|
|
91
91
|
};
|
92
92
|
};
|
93
93
|
readonly processor?: "svelte/svelte";
|
94
|
-
readonly name: `linted/${S}
|
94
|
+
readonly name: `linted/${S}/`;
|
95
95
|
readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "json" | "js", string[]>>[S];
|
96
96
|
readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "json" | "js", string[]>>[S];
|
97
97
|
})[];
|
package/dist/factory/index.js
CHANGED
@@ -8,12 +8,12 @@ export class Factory {
|
|
8
8
|
const { noInlineConfig = defaultSettings.noInlineConfig, reportUnusedDisableDirectives = defaultSettings.reportUnusedDisableDirectives, sourceType = defaultSettings.sourceType, ecmaVersion = defaultSettings.ecmaVersion, ignores = [], override = false, } = commonExtension;
|
9
9
|
this.common = {
|
10
10
|
settings: {
|
11
|
-
name: "linted
|
11
|
+
name: "linted/*/",
|
12
12
|
linterOptions: { noInlineConfig, reportUnusedDisableDirectives },
|
13
13
|
languageOptions: { sourceType, ecmaVersion },
|
14
14
|
},
|
15
15
|
ignores: {
|
16
|
-
name: "linted/*/ignores",
|
16
|
+
name: "linted/*/ignores/",
|
17
17
|
ignores: [
|
18
18
|
...override ? [] : defaultIgnores["*"],
|
19
19
|
...ignores,
|
@@ -47,7 +47,7 @@ export class Factory {
|
|
47
47
|
? []
|
48
48
|
: [
|
49
49
|
{
|
50
|
-
name: `linted/${scope}
|
50
|
+
name: `linted/${scope}/`,
|
51
51
|
files,
|
52
52
|
ignores,
|
53
53
|
...processor,
|
@@ -66,7 +66,7 @@ export class Factory {
|
|
66
66
|
},
|
67
67
|
},
|
68
68
|
...ruleset.map(({ id, rules }) => ({
|
69
|
-
name: `linted/${id}
|
69
|
+
name: `linted/${id}/`,
|
70
70
|
files,
|
71
71
|
ignores,
|
72
72
|
rules,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,OAAO,OAAO;IAMA;IALF,MAAM,CAAC;IACP,MAAM,CAAC;IAEvB,YACE,IAAiB,EACD,OAAoC,EACpD,EACE,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,GACD,EACpB,EAAE,GAAG,EAAE,eAAe,GAAG,EAAE,EAAE,GAAG,eAAe,KAA0B,EAAW;QAPpE,YAAO,GAAP,OAAO,CAA6B;QASpD,MAAM,EACJ,cAAc,GAAG,eAAe,CAAC,cAAc,EAC/C,6BAA6B,GAAG,eAAe,CAAC,6BAA6B,EAC7E,UAAU,GAAG,eAAe,CAAC,UAAU,EACvC,WAAW,GAAG,eAAe,CAAC,WAAW,EACzC,OAAO,GAAG,EAAW,EACrB,Q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MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAW;qCACnF;iCACO;yBACN;qBACF;oBACV,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;wBACjC,IAAI,EAAE,UAAU,EAAE,GAAG;wBACrB,KAAK;wBACL,OAAO;wBACP,KAAK;qBACI,CAAA,CAAC;iBACb,CAAC;IACV,CAAC;CACF"}
|
package/dist/index.js
CHANGED
@@ -5,7 +5,7 @@ export default function ({ imports: { plugins, parsers }, defaults, extensions,
|
|
5
5
|
const factory = new Factory(tree, parsers, defaults, extensions);
|
6
6
|
return [
|
7
7
|
factory.common.settings,
|
8
|
-
{ name: `linted/*/plugins
|
8
|
+
{ name: `linted/*/plugins/`, plugins },
|
9
9
|
factory.common.ignores,
|
10
10
|
...scopes.flatMap(scope => factory.scope(scope)),
|
11
11
|
];
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACJ;IACN,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEjE,OAAO;YACL,OAAO,CAAC,MAAM,CAAC,QAAQ;YACvB,EAAE,IAAI,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACJ;IACN,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEjE,OAAO;YACL,OAAO,CAAC,MAAM,CAAC,QAAQ;YACvB,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAW;YAC/C,OAAO,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxC,CAAC;IACb,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
@@ -1,5 +1,3 @@
|
|
1
1
|
import type { PartialConfig } from "../../shared/index.js";
|
2
|
-
export type CommonIgnores = PartialConfig<
|
3
|
-
readonly name: "linted/*/ignores";
|
4
|
-
}, "ignores">;
|
2
|
+
export type CommonIgnores = PartialConfig<"linted/*/ignores/", "ignores">;
|
5
3
|
//# sourceMappingURL=ignores.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,aAAa,CACvC
|
1
|
+
{"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,aAAa,CACvC,mBAAmB,EACnB,SAAS,CACV,CAAC"}
|
@@ -1,5 +1,3 @@
|
|
1
1
|
import type { PartialConfig } from "../../shared/index.js";
|
2
|
-
export type CommonPlugins<Plugins extends string> = PartialConfig<
|
3
|
-
readonly name: `linted/*/plugins`;
|
4
|
-
}, "plugins", Plugins>;
|
2
|
+
export type CommonPlugins<Plugins extends string> = PartialConfig<"linted/*/plugins/", "plugins", Plugins>;
|
5
3
|
//# sourceMappingURL=plugins.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,CAAC,OAAO,SAAS,MAAM,IAAI,aAAa,CAC/D
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,CAAC,OAAO,SAAS,MAAM,IAAI,aAAa,CAC/D,mBAAmB,EACnB,SAAS,EACT,OAAO,CACR,CAAC"}
|
@@ -1,5 +1,3 @@
|
|
1
1
|
import type { PartialConfig } from "../../shared/index.js";
|
2
|
-
export type CommonSettings = PartialConfig<
|
3
|
-
readonly name: `linted/*`;
|
4
|
-
}, "linterOptions" | "languageOptions">;
|
2
|
+
export type CommonSettings = PartialConfig<"linted/*/", "linterOptions" | "languageOptions">;
|
5
3
|
//# sourceMappingURL=settings.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,aAAa,CACxC
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,aAAa,CACxC,WAAW,EACT,eAAe,GACf,iBAAiB,CACpB,CAAC"}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import type {
|
2
|
-
export type ScopeRules<Scopes extends string> = {
|
3
|
-
readonly name: `linted/${Scopes}/${string}`;
|
4
|
-
} & Pick<Config, "files" | "ignores" | "rules">;
|
1
|
+
import type { PartialConfig } from "../../shared/index.js";
|
2
|
+
export type ScopeRules<Scopes extends string> = PartialConfig<`linted/${Scopes}/${string}/`, "files" | "ignores" | "rules">;
|
5
3
|
//# sourceMappingURL=rules.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/scope/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/scope/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,IAAI,aAAa,CAC3D,UAAU,MAAM,IAAI,MAAM,GAAG,EAC3B,OAAO,GACP,SAAS,GACT,OAAO,CACV,CAAC"}
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import type {
|
2
|
-
export type ScopeSettings<Scopes extends string> = {
|
3
|
-
readonly name: `linted/${Scopes}`;
|
1
|
+
import type { PartialConfig } from "../../shared/index.js";
|
2
|
+
export type ScopeSettings<Scopes extends string> = PartialConfig<`linted/${Scopes}/`, "files" | "ignores" | "processor" | "language" | "settings", string, {
|
4
3
|
readonly languageOptions: object;
|
5
|
-
}
|
4
|
+
}>;
|
6
5
|
//# sourceMappingURL=settings.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/scope/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/scope/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,MAAM,IAAI,aAAa,CAC9D,UAAU,MAAM,GAAG,EACjB,OAAO,GACP,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,EAEZ,MAAM,EACN;IAAE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CACrC,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type * as Rule from "./rule/index.js";
|
2
2
|
export type { Rule };
|
3
3
|
export interface Config<Plugins extends string = string> {
|
4
|
-
readonly name: `linted/${string}
|
4
|
+
readonly name: `linted/${string}/`;
|
5
5
|
readonly plugins: Readonly<Record<Plugins, {
|
6
6
|
readonly configs: unknown;
|
7
7
|
}>>;
|
@@ -20,5 +20,7 @@ export interface Config<Plugins extends string = string> {
|
|
20
20
|
readonly language?: string;
|
21
21
|
readonly settings?: Readonly<Record<string, unknown>>;
|
22
22
|
}
|
23
|
-
export type PartialConfig<
|
23
|
+
export type PartialConfig<Name extends Config["name"], Picks extends Exclude<keyof Config, "name" | keyof Rest>, Plugins extends string = string, Rest extends object = object> = (Rest & Pick<Config<Plugins>, Picks> & {
|
24
|
+
readonly name: Name;
|
25
|
+
} & Readonly<Partial<Record<Exclude<keyof Config, "name" | keyof Rest | Picks>, never>>>);
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/shared/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,QAAQ,CAAC;AAEpC,YAAY,EAAE,IAAI,EAAE,CAAC;AACrB,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrD,QAAQ,CAAC,IAAI,EAAE,UAAU,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/shared/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,QAAQ,CAAC;AAEpC,YAAY,EAAE,IAAI,EAAE,CAAC;AACrB,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrD,QAAQ,CAAC,IAAI,EAAE,UAAU,MAAM,GAAG,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAC/B,OAAO,EACP;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAC9B,CAAC,CAAC;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;QACjC,QAAQ,CAAC,6BAA6B,EAClC,OAAO,GACP,MAAM,GACN,KAAK,CACR;KACF,CAAC;IACF,QAAQ,CAAC,eAAe,EAAE;QACxB,QAAQ,CAAC,UAAU,EACf,QAAQ,GACR,QAAQ,CACX;QACD,QAAQ,CAAC,WAAW,EAChB,QAAQ,GACR,CAAC,GACD,CAAC,GACD,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CACP;KACF,CAAsF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AACD,MAAM,MAAM,aAAa,CACvB,IAAI,SAAS,MAAM,CAAC,MAAM,CAAC,EAC3B,KAAK,SAAS,OAAO,CACnB,MAAM,MAAM,EACV,MAAM,GACN,MAAM,IAAI,CACb,EACD,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,IAC1B,CACA,IAAI,GACJ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACvB,QAAQ,CAAC,OAAO,CAAC,MAAM,CACvB,OAAO,CACL,MAAM,MAAM,EACV,MAAM,GACN,MAAM,IAAI,GACV,KAAK,CACR,EACD,KAAK,CACN,CAAC,CAAC,CACJ,CAAC"}
|
package/package.json
CHANGED
package/src/factory/index.ts
CHANGED
@@ -28,12 +28,12 @@ export class Factory {
|
|
28
28
|
|
29
29
|
this.common = {
|
30
30
|
settings: {
|
31
|
-
name: "linted
|
31
|
+
name: "linted/*/",
|
32
32
|
linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
|
33
33
|
languageOptions: { sourceType, ecmaVersion } as const,
|
34
34
|
} as const,
|
35
35
|
ignores: {
|
36
|
-
name: "linted/*/ignores",
|
36
|
+
name: "linted/*/ignores/",
|
37
37
|
ignores: [
|
38
38
|
...override ? [] as const : defaultIgnores["*"],
|
39
39
|
...ignores,
|
@@ -100,7 +100,7 @@ export class Factory {
|
|
100
100
|
? [] as const
|
101
101
|
: [
|
102
102
|
{
|
103
|
-
name: `linted/${scope}
|
103
|
+
name: `linted/${scope}/`,
|
104
104
|
files,
|
105
105
|
ignores,
|
106
106
|
...processor,
|
@@ -119,7 +119,7 @@ export class Factory {
|
|
119
119
|
} as const,
|
120
120
|
} as const,
|
121
121
|
...ruleset.map(({ id, rules }) => ({
|
122
|
-
name: `linted/${id}
|
122
|
+
name: `linted/${id}/`,
|
123
123
|
files,
|
124
124
|
ignores,
|
125
125
|
rules,
|
package/src/index.ts
CHANGED
@@ -14,7 +14,7 @@ export default function ({
|
|
14
14
|
|
15
15
|
return [
|
16
16
|
factory.common.settings,
|
17
|
-
{ name: `linted/*/plugins
|
17
|
+
{ name: `linted/*/plugins/`, plugins } as const,
|
18
18
|
factory.common.ignores,
|
19
19
|
...scopes.flatMap(scope => factory.scope(scope)),
|
20
20
|
] as const;
|
@@ -1,5 +1,12 @@
|
|
1
|
-
import type {
|
1
|
+
import type { PartialConfig } from "../../shared";
|
2
2
|
|
3
|
-
export type ScopeRules<Scopes extends string> =
|
4
|
-
|
5
|
-
|
3
|
+
export type ScopeRules<Scopes extends string> = PartialConfig<
|
4
|
+
`linted/${Scopes}/${string}/`,
|
5
|
+
| "files"
|
6
|
+
| "ignores"
|
7
|
+
| "rules"
|
8
|
+
>;
|
9
|
+
|
10
|
+
// export type ScopeRules<Scopes extends string> = {
|
11
|
+
// readonly name: `linted/${Scopes}/${string}/`;
|
12
|
+
// } & Pick<Config, "files" | "ignores" | "rules">;
|
@@ -1,6 +1,18 @@
|
|
1
|
-
import type {
|
1
|
+
import type { PartialConfig } from "../../shared";
|
2
2
|
|
3
|
-
export type ScopeSettings<Scopes extends string> =
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
export type ScopeSettings<Scopes extends string> = PartialConfig<
|
4
|
+
`linted/${Scopes}/`,
|
5
|
+
| "files"
|
6
|
+
| "ignores"
|
7
|
+
| "processor"
|
8
|
+
| "language"
|
9
|
+
| "settings"
|
10
|
+
,
|
11
|
+
string,
|
12
|
+
{ readonly languageOptions: object }
|
13
|
+
>;
|
14
|
+
|
15
|
+
// export type ScopeSettings<Scopes extends string> = {
|
16
|
+
// readonly name: `linted/${Scopes}/`;
|
17
|
+
// readonly languageOptions: object;
|
18
|
+
// } & Pick<Config, "files" | "ignores" | "processor" | "language" | "settings">;
|
@@ -2,7 +2,7 @@ import type * as Rule from "./rule";
|
|
2
2
|
|
3
3
|
export type { Rule };
|
4
4
|
export interface Config<Plugins extends string = string> {
|
5
|
-
readonly name: `linted/${string}
|
5
|
+
readonly name: `linted/${string}/`;
|
6
6
|
readonly plugins: Readonly<Record<
|
7
7
|
Plugins,
|
8
8
|
{ readonly configs: unknown }
|
@@ -44,14 +44,25 @@ export interface Config<Plugins extends string = string> {
|
|
44
44
|
readonly settings?: Readonly<Record<string, unknown>>;
|
45
45
|
}
|
46
46
|
export type PartialConfig<
|
47
|
-
|
48
|
-
Picks extends Exclude<
|
47
|
+
Name extends Config["name"],
|
48
|
+
Picks extends Exclude<
|
49
|
+
keyof Config,
|
50
|
+
| "name"
|
51
|
+
| keyof Rest
|
52
|
+
>,
|
49
53
|
Plugins extends string = string,
|
54
|
+
Rest extends object = object,
|
50
55
|
> = (
|
51
|
-
&
|
56
|
+
& Rest
|
52
57
|
& Pick<Config<Plugins>, Picks>
|
58
|
+
& { readonly name: Name }
|
53
59
|
& Readonly<Partial<Record<
|
54
|
-
Exclude<
|
60
|
+
Exclude<
|
61
|
+
keyof Config,
|
62
|
+
| "name"
|
63
|
+
| keyof Rest
|
64
|
+
| Picks
|
65
|
+
>,
|
55
66
|
never
|
56
67
|
>>>
|
57
68
|
);
|