@eslinted/core 13.0.0-rc.1 → 13.1.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/factory/factory.d.ts +175 -0
- package/dist/factory/factory.d.ts.map +1 -0
- package/dist/factory/factory.js +42 -0
- package/dist/factory/factory.js.map +1 -0
- package/dist/factory/index.d.ts +2 -3
- package/dist/factory/index.d.ts.map +1 -1
- package/dist/factory/index.js +2 -3
- package/dist/factory/index.js.map +1 -1
- package/dist/factory/ruleset.d.ts +3 -3
- package/dist/factory/ruleset.d.ts.map +1 -1
- package/dist/factory/ruleset.js +3 -3
- package/dist/factory/ruleset.js.map +1 -1
- package/dist/factory/{options → settings}/index.d.ts +1 -2
- package/dist/factory/settings/index.d.ts.map +1 -0
- package/dist/factory/settings/index.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/html.d.ts +2 -2
- package/dist/factory/settings/scopes/html.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/html.js +2 -2
- package/dist/factory/settings/scopes/html.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/js.d.ts +2 -2
- package/dist/factory/settings/scopes/js.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/js.js +2 -2
- package/dist/factory/settings/scopes/js.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/json.d.ts +2 -2
- package/dist/factory/settings/scopes/json.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/json.js +2 -2
- package/dist/factory/settings/scopes/json.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/jsonc.d.ts +2 -2
- package/dist/factory/settings/scopes/jsonc.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/jsonc.js +2 -2
- package/dist/factory/settings/scopes/jsonc.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/mocha.d.ts +3 -3
- package/dist/factory/settings/scopes/mocha.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/mocha.js +5 -4
- package/dist/factory/settings/scopes/mocha.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/svelte.d.ts +7 -7
- package/dist/factory/settings/scopes/svelte.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/svelte.js +2 -2
- package/dist/factory/settings/scopes/svelte.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/ts.d.ts +5 -5
- package/dist/factory/settings/scopes/ts.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/ts.js +2 -2
- package/dist/factory/settings/scopes/ts.js.map +1 -0
- package/dist/factory/{options → settings}/scopes/yml.d.ts +2 -2
- package/dist/factory/settings/scopes/yml.d.ts.map +1 -0
- package/dist/factory/{options → settings}/scopes/yml.js +2 -2
- package/dist/factory/settings/scopes/yml.js.map +1 -0
- package/dist/factory/settings/setting.d.ts +48 -0
- package/dist/factory/settings/setting.d.ts.map +1 -0
- package/dist/factory/settings/setting.js +20 -0
- package/dist/factory/settings/setting.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -21
- package/dist/index.js.map +1 -1
- package/dist/interface/config/index.d.ts +23 -0
- package/dist/interface/config/index.d.ts.map +1 -0
- package/dist/{config → interface/config}/index.js.map +1 -1
- package/dist/interface/config/rule.d.ts +7 -0
- package/dist/interface/config/rule.d.ts.map +1 -0
- package/dist/{config → interface/config}/rule.js.map +1 -1
- package/dist/interface/configs/globals/ignores.d.ts +6 -0
- package/dist/interface/configs/globals/ignores.d.ts.map +1 -0
- package/dist/interface/configs/globals/ignores.js +2 -0
- package/dist/interface/configs/globals/ignores.js.map +1 -0
- package/dist/interface/configs/globals/index.d.ts +5 -0
- package/dist/interface/configs/globals/index.d.ts.map +1 -0
- package/dist/interface/configs/globals/index.js +2 -0
- package/dist/interface/configs/globals/index.js.map +1 -0
- package/dist/interface/configs/globals/only/index.d.ts +2 -0
- package/dist/interface/configs/globals/only/index.d.ts.map +1 -0
- package/dist/interface/configs/globals/only/index.js +2 -0
- package/dist/interface/configs/globals/only/index.js.map +1 -0
- package/dist/interface/configs/globals/plugins.d.ts +6 -0
- package/dist/interface/configs/globals/plugins.d.ts.map +1 -0
- package/dist/interface/configs/globals/plugins.js +2 -0
- package/dist/interface/configs/globals/plugins.js.map +1 -0
- package/dist/interface/configs/globals/settings.d.ts +7 -0
- package/dist/interface/configs/globals/settings.d.ts.map +1 -0
- package/dist/interface/configs/globals/settings.js +2 -0
- package/dist/interface/configs/globals/settings.js.map +1 -0
- package/dist/interface/configs/index.d.ts +3 -0
- package/dist/interface/configs/index.d.ts.map +1 -0
- package/dist/interface/configs/index.js +2 -0
- package/dist/interface/configs/index.js.map +1 -0
- package/dist/interface/configs/scoped.d.ts +7 -0
- package/dist/interface/configs/scoped.d.ts.map +1 -0
- package/dist/interface/configs/scoped.js +2 -0
- package/dist/interface/configs/scoped.js.map +1 -0
- package/dist/interface/imports/index.d.ts +3 -3
- package/dist/interface/imports/index.d.ts.map +1 -1
- package/dist/interface/imports/parsers.d.ts +2 -0
- package/dist/interface/imports/parsers.d.ts.map +1 -0
- package/dist/interface/imports/parsers.js +2 -0
- package/dist/interface/imports/parsers.js.map +1 -0
- package/dist/interface/imports/plugins.d.ts +2 -0
- package/dist/interface/imports/plugins.d.ts.map +1 -0
- package/dist/interface/imports/plugins.js +2 -0
- package/dist/interface/imports/plugins.js.map +1 -0
- package/dist/interface/index.d.ts +2 -1
- package/dist/interface/index.d.ts.map +1 -1
- package/dist/interface/input.d.ts +13 -13
- package/dist/interface/input.d.ts.map +1 -1
- package/dist/interface/output.d.ts +7 -15
- package/dist/interface/output.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/factory/factory.ts +89 -0
- package/src/factory/index.ts +2 -3
- package/src/factory/ruleset.ts +9 -13
- package/src/factory/{options → settings}/index.ts +1 -2
- package/src/factory/settings/scopes/html.ts +16 -0
- package/src/factory/settings/scopes/js.ts +11 -0
- package/src/factory/settings/scopes/json.ts +16 -0
- package/src/factory/settings/scopes/jsonc.ts +16 -0
- package/src/factory/settings/scopes/mocha.ts +29 -0
- package/src/factory/{options → settings}/scopes/svelte.ts +9 -9
- package/src/factory/settings/scopes/ts.ts +28 -0
- package/src/factory/settings/scopes/yml.ts +17 -0
- package/src/factory/settings/setting.ts +63 -0
- package/src/index.ts +26 -75
- package/src/interface/config/index.ts +42 -0
- package/src/interface/config/rule.ts +14 -0
- package/src/interface/configs/globals/ignores.ts +10 -0
- package/src/interface/configs/globals/index.ts +4 -0
- package/src/interface/configs/globals/only/index.ts +4 -0
- package/src/interface/configs/globals/plugins.ts +10 -0
- package/src/interface/configs/globals/settings.ts +13 -0
- package/src/interface/configs/index.ts +2 -0
- package/src/interface/configs/scoped.ts +7 -0
- package/src/interface/imports/index.ts +2 -16
- package/src/interface/imports/parsers.ts +7 -0
- package/src/interface/imports/plugins.ts +9 -0
- package/src/interface/index.ts +2 -1
- package/src/interface/input.ts +15 -19
- package/src/interface/output.ts +7 -22
- package/dist/config/index.d.ts +0 -23
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/rule.d.ts +0 -7
- package/dist/config/rule.d.ts.map +0 -1
- package/dist/factory/global.d.ts +0 -29
- package/dist/factory/global.d.ts.map +0 -1
- package/dist/factory/global.js +0 -41
- package/dist/factory/global.js.map +0 -1
- package/dist/factory/options/index.d.ts.map +0 -1
- package/dist/factory/options/index.js.map +0 -1
- package/dist/factory/options/option.d.ts +0 -3002
- package/dist/factory/options/option.d.ts.map +0 -1
- package/dist/factory/options/option.js +0 -48
- package/dist/factory/options/option.js.map +0 -1
- package/dist/factory/options/proto.d.ts +0 -19
- package/dist/factory/options/proto.d.ts.map +0 -1
- package/dist/factory/options/proto.js +0 -2
- package/dist/factory/options/proto.js.map +0 -1
- package/dist/factory/options/scopes/html.d.ts.map +0 -1
- package/dist/factory/options/scopes/html.js.map +0 -1
- package/dist/factory/options/scopes/js.d.ts.map +0 -1
- package/dist/factory/options/scopes/js.js.map +0 -1
- package/dist/factory/options/scopes/json.d.ts.map +0 -1
- package/dist/factory/options/scopes/json.js.map +0 -1
- package/dist/factory/options/scopes/jsonc.d.ts.map +0 -1
- package/dist/factory/options/scopes/jsonc.js.map +0 -1
- package/dist/factory/options/scopes/mocha.d.ts.map +0 -1
- package/dist/factory/options/scopes/mocha.js.map +0 -1
- package/dist/factory/options/scopes/svelte.d.ts.map +0 -1
- package/dist/factory/options/scopes/svelte.js.map +0 -1
- package/dist/factory/options/scopes/ts.d.ts.map +0 -1
- package/dist/factory/options/scopes/ts.js.map +0 -1
- package/dist/factory/options/scopes/yml.d.ts.map +0 -1
- package/dist/factory/options/scopes/yml.js.map +0 -1
- package/dist/factory/scoped.d.ts +0 -13
- package/dist/factory/scoped.d.ts.map +0 -1
- package/dist/factory/scoped.js +0 -17
- package/dist/factory/scoped.js.map +0 -1
- package/src/config/index.ts +0 -42
- package/src/config/rule.ts +0 -14
- package/src/factory/global.ts +0 -45
- package/src/factory/options/option.ts +0 -98
- package/src/factory/options/proto.ts +0 -46
- package/src/factory/options/scopes/html.ts +0 -16
- package/src/factory/options/scopes/js.ts +0 -11
- package/src/factory/options/scopes/json.ts +0 -16
- package/src/factory/options/scopes/jsonc.ts +0 -16
- package/src/factory/options/scopes/mocha.ts +0 -29
- package/src/factory/options/scopes/ts.ts +0 -28
- package/src/factory/options/scopes/yml.ts +0 -17
- package/src/factory/scoped.ts +0 -17
- /package/dist/factory/{options → settings}/index.js +0 -0
- /package/dist/{config → interface/config}/index.js +0 -0
- /package/dist/{config → interface/config}/rule.js +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/factory/options/option.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACP,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAErC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B"}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import globals from "globals";
|
2
|
-
export default class Option {
|
3
|
-
parser;
|
4
|
-
files;
|
5
|
-
ignores;
|
6
|
-
ruleset;
|
7
|
-
constructor(parser, files, ignores, ruleset) {
|
8
|
-
this.parser = parser;
|
9
|
-
this.files = files;
|
10
|
-
this.ignores = ignores;
|
11
|
-
this.ruleset = ruleset;
|
12
|
-
}
|
13
|
-
get configs() {
|
14
|
-
const { scope, files, ignores, ruleset, option, } = this;
|
15
|
-
if (ruleset.scope !== scope)
|
16
|
-
throw new TypeError(`Scope mismatch between option and ruleset`, { cause: { option: scope, ruleset: ruleset.scope } });
|
17
|
-
return files.length < 1
|
18
|
-
? []
|
19
|
-
: ruleset.ruleset.map(({ id, rules }) => {
|
20
|
-
return {
|
21
|
-
name: `linted/${id}`,
|
22
|
-
files,
|
23
|
-
ignores,
|
24
|
-
rules,
|
25
|
-
...option,
|
26
|
-
};
|
27
|
-
});
|
28
|
-
}
|
29
|
-
get option() {
|
30
|
-
try {
|
31
|
-
const { languageOptions, processor, language, } = this;
|
32
|
-
return {
|
33
|
-
languageOptions,
|
34
|
-
...processor,
|
35
|
-
...language,
|
36
|
-
};
|
37
|
-
}
|
38
|
-
catch (e) {
|
39
|
-
throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e });
|
40
|
-
}
|
41
|
-
}
|
42
|
-
globals(group) {
|
43
|
-
if (typeof group !== "string")
|
44
|
-
throw new TypeError(`Expected string`);
|
45
|
-
return globals[group];
|
46
|
-
}
|
47
|
-
}
|
48
|
-
//# sourceMappingURL=option.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"option.js","sourceRoot":"","sources":["../../../src/factory/options/option.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAQ9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IA4BhB;I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AK,QAAQ;YAC3B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAEzC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
export type OptionProto<ParserOptions extends object | boolean, G extends string | boolean, Processor extends object, Language extends object> = ({
|
2
|
-
languageOptions: (G extends never ? object : G extends boolean ? object : G extends string ? string extends G ? object : {
|
3
|
-
globals: Record<string, unknown>;
|
4
|
-
} : object) & (ParserOptions extends never ? object : ParserOptions extends boolean ? ParserOptions extends true ? {
|
5
|
-
parser: unknown;
|
6
|
-
} : object : {
|
7
|
-
parser: unknown;
|
8
|
-
parserOptions: ParserOptions;
|
9
|
-
});
|
10
|
-
} & (Processor extends never ? object : Processor extends {
|
11
|
-
processor: infer P;
|
12
|
-
} ? string extends P ? object : {
|
13
|
-
processor: P;
|
14
|
-
} : object) & (Language extends never ? object : Language extends {
|
15
|
-
language: infer L;
|
16
|
-
} ? string extends L ? object : {
|
17
|
-
language: L;
|
18
|
-
} : object));
|
19
|
-
//# sourceMappingURL=proto.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"proto.d.ts","sourceRoot":"","sources":["../../../src/factory/options/proto.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CACrB,aAAa,SACX,MAAM,GACN,OAAO,EACT,CAAC,SAAS,MAAM,GAAG,OAAO,EAC1B,SAAS,SAAS,MAAM,EACxB,QAAQ,SAAS,MAAM,IACrB,CACJ;IAAE,eAAe,EAAE,CAAC,CAAC,SAAS,KAAK,GAC/B,MAAM,GACN,CAAC,SAAS,OAAO,GACf,MAAM,GACN,CAAC,SAAS,MAAM,GACd,MAAM,SAAS,CAAC,GACd,MAAM,GACN;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GACtC,MAAM,CACb,GACC,CACC,aAAa,SAAS,KAAK,GACvB,MAAM,GACN,aAAa,SAAS,OAAO,GAC3B,aAAa,SAAS,IAAI,GACxB;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GACnB,MAAM,GACR;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,aAAa,CAAA;KAAE,CACzD,CAAC;CAAE,GACF,CACE,SAAS,SAAS,KAAK,GACnB,MAAM,GACN,SAAS,SAAS;IAAE,SAAS,EAAE,MAAM,CAAC,CAAA;CAAE,GACtC,MAAM,SAAS,CAAC,GACd,MAAM,GACN;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAClB,MAAM,CACX,GACC,CACF,QAAQ,SAAS,KAAK,GAClB,MAAM,GACN,QAAQ,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;CAAE,GACpC,MAAM,SAAS,CAAC,GACd,MAAM,GACN;IAAE,QAAQ,EAAE,CAAC,CAAA;CAAE,GACjB,MAAM,CACX,CACJ,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"proto.js","sourceRoot":"","sources":["../../../src/factory/options/proto.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,CACL;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAGjC;IACiB,KAAK,GAAG,MAAM,CAAC;IACf,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC1C,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe,OAEzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAY;IAC1B,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,CACL;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAGjC;IACiB,KAAK,GAAG,MAAM,CAAC;IACf,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,IAAI,CACL;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAGlC;IACiB,KAAK,GAAG,OAAO,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EAChD,CAAC,EACD,OAAO,CACR;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAC9B,SAAgB,KAAK,qBAAsB;IAE3C,IAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAazB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAKlC;IACiB,KAAK,GAAG,OAAO,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IACd,KAAK,GAAG,CAAC,OAAO,CAAU,CAAC;IAE3C,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAC5B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhC,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;YACD,OAAO;SACC,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MAAM,CACxC,QAAQ,EACR;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC3C,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EACpD,CAAC,EACD,KAAK,EACL;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,CAC/B;IACC,SAAgB,KAAK,YAAY;IACjC,SAAgB,SAAS;;MAA2C;IACpE,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;;;;;;;;MAazB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MASnC;IACiB,KAAK,GAAG,QAAQ,CAAC;IACjB,SAAS,GAAG,EAAE,SAAS,EAAE,eAAe,EAAW,CAAC;IACpD,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAEvC,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,MAAM,EAAE,QAAQ;gBAChB,mBAAmB,EAAE,CAAC,SAAS,CAAU;gBACzC,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;SACO,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CACpC,IAAI,EACJ;IACE,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,WAAW,EAAE,IAAI,CAAC;CACnB,EACD,CAAC,CACF;IACC,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;;;;;;MAWzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAQ/B;IACiB,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;SACO,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAAM,CACrC,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,SAAS;IAC9B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../../src/factory/options/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAIhC;IACiB,KAAK,GAAG,KAAK,CAAC;IACd,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
package/dist/factory/scoped.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { Input, Scopes } from "../index.js";
|
2
|
-
import { Ruleset } from "./ruleset.js";
|
3
|
-
export declare class ScopeFactory {
|
4
|
-
readonly defaultScopes: Pick<Input["defaults"], "files" | "ignores" | "rules">;
|
5
|
-
readonly extensions: Omit<Input["extensions"], "*">;
|
6
|
-
constructor(defaultScopes: Pick<Input["defaults"], "files" | "ignores" | "rules">, extensions: Omit<Input["extensions"], "*">);
|
7
|
-
produce(scope: Scopes): readonly [
|
8
|
-
string[],
|
9
|
-
string[],
|
10
|
-
Ruleset
|
11
|
-
];
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=scoped.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../src/factory/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,YAAY;aAEL,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;aACrE,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC;gBAD1C,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,EACrE,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC;IAGrD,OAAO,CAAC,KAAK,EAAE,MAAM;CAO7B"}
|
package/dist/factory/scoped.js
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
import { Ruleset } from "./ruleset.js";
|
2
|
-
export class ScopeFactory {
|
3
|
-
defaultScopes;
|
4
|
-
extensions;
|
5
|
-
constructor(defaultScopes, extensions) {
|
6
|
-
this.defaultScopes = defaultScopes;
|
7
|
-
this.extensions = extensions;
|
8
|
-
}
|
9
|
-
produce(scope) {
|
10
|
-
return [
|
11
|
-
[...this.defaultScopes.files[scope], ...this.extensions[scope]?.files ?? []],
|
12
|
-
[...this.defaultScopes.ignores[scope], ...this.extensions[scope]?.ignores ?? []],
|
13
|
-
new Ruleset(scope, this.defaultScopes.rules[scope], this.extensions[scope]?.rules),
|
14
|
-
];
|
15
|
-
}
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=scoped.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"scoped.js","sourceRoot":"","sources":["../../src/factory/scoped.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,OAAO,YAAY;IAEL;IACA;IAFlB,YACkB,aAAqE,EACrE,UAA0C;QAD1C,kBAAa,GAAb,aAAa,CAAwD;QACrE,eAAU,GAAV,UAAU,CAAgC;IACzD,CAAC;IAEG,OAAO,CAAC,KAAa;QAC1B,OAAO;YACL,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE,CAAa;YACxF,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,EAAE,CAAa;YAC5F,IAAI,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;SAC1E,CAAC;IACb,CAAC;CACF"}
|
package/src/config/index.ts
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
import type { RuleRecord } from "./rule";
|
2
|
-
|
3
|
-
export type * from "./rule";
|
4
|
-
export interface Config<Plugins extends string = string> {
|
5
|
-
name: `linted/${string}`;
|
6
|
-
plugins: Record<Plugins, { configs: unknown }>;
|
7
|
-
files: string[];
|
8
|
-
ignores: string[];
|
9
|
-
rules: RuleRecord;
|
10
|
-
linterOptions: {
|
11
|
-
noInlineConfig: boolean;
|
12
|
-
reportUnusedDisableDirectives:
|
13
|
-
| "error"
|
14
|
-
| "warn"
|
15
|
-
| "off"
|
16
|
-
;
|
17
|
-
};
|
18
|
-
languageOptions: {
|
19
|
-
sourceType:
|
20
|
-
| "module"
|
21
|
-
| "script"
|
22
|
-
;
|
23
|
-
ecmaVersion:
|
24
|
-
| "latest"
|
25
|
-
| 3
|
26
|
-
| 5
|
27
|
-
| 2015
|
28
|
-
| 2016
|
29
|
-
| 2017
|
30
|
-
| 2018
|
31
|
-
| 2019
|
32
|
-
| 2020
|
33
|
-
| 2021
|
34
|
-
| 2022
|
35
|
-
| 2023
|
36
|
-
| 2024
|
37
|
-
;
|
38
|
-
};
|
39
|
-
processor?: string;
|
40
|
-
language?: string;
|
41
|
-
settings?: Record<string, unknown>;
|
42
|
-
}
|
package/src/config/rule.ts
DELETED
package/src/factory/global.ts
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
import type { Input } from "..";
|
2
|
-
|
3
|
-
export class GlobalFactory {
|
4
|
-
constructor(
|
5
|
-
public readonly plugins: Input["imports"]["plugins"],
|
6
|
-
public readonly defaultSettings: Input["defaults"]["settings"],
|
7
|
-
public readonly defaultGlobalIgnores: Input["defaults"]["ignores"]["*"],
|
8
|
-
public readonly globalExtensions: Input["extensions"]["*"] = {},
|
9
|
-
) {}
|
10
|
-
|
11
|
-
public get configs() {
|
12
|
-
const {
|
13
|
-
plugins,
|
14
|
-
defaultSettings,
|
15
|
-
defaultGlobalIgnores,
|
16
|
-
globalExtensions,
|
17
|
-
} = this;
|
18
|
-
|
19
|
-
return [
|
20
|
-
{
|
21
|
-
name: "linted/*/settings",
|
22
|
-
plugins,
|
23
|
-
linterOptions: {
|
24
|
-
noInlineConfig: globalExtensions?.noInlineConfig ?? defaultSettings.noInlineConfig,
|
25
|
-
reportUnusedDisableDirectives: globalExtensions?.reportUnusedDisableDirectives ?? defaultSettings.reportUnusedDisableDirectives,
|
26
|
-
},
|
27
|
-
languageOptions: {
|
28
|
-
sourceType: globalExtensions?.sourceType ?? defaultSettings.sourceType,
|
29
|
-
ecmaVersion: globalExtensions?.ecmaVersion ?? defaultSettings.ecmaVersion,
|
30
|
-
},
|
31
|
-
},
|
32
|
-
{
|
33
|
-
name: "linted/*/ignores",
|
34
|
-
ignores: typeof globalExtensions?.ignores === "undefined" || globalExtensions.ignores.length < 1
|
35
|
-
? defaultGlobalIgnores
|
36
|
-
: [
|
37
|
-
...globalExtensions.override === true
|
38
|
-
? []
|
39
|
-
: defaultGlobalIgnores,
|
40
|
-
...globalExtensions.ignores,
|
41
|
-
],
|
42
|
-
},
|
43
|
-
] as const;
|
44
|
-
}
|
45
|
-
}
|
@@ -1,98 +0,0 @@
|
|
1
|
-
import globals from "globals";
|
2
|
-
import type {
|
3
|
-
Scopes,
|
4
|
-
Output,
|
5
|
-
} from "../..";
|
6
|
-
import type { Ruleset } from "../ruleset";
|
7
|
-
import type { OptionProto } from ".";
|
8
|
-
|
9
|
-
export default abstract class Option<
|
10
|
-
S extends Scopes,
|
11
|
-
ParserOptions extends
|
12
|
-
| object
|
13
|
-
| boolean = false,
|
14
|
-
ParserCount extends 0 | 1 | 2 = ParserOptions extends false ? 0 : 1,
|
15
|
-
G extends keyof typeof globals & (
|
16
|
-
| "mocha"
|
17
|
-
) | false = false,
|
18
|
-
Processor extends object = object,
|
19
|
-
Language extends object = object,
|
20
|
-
> {
|
21
|
-
public abstract readonly scope: S;
|
22
|
-
public abstract readonly processor: (Processor extends never
|
23
|
-
? object
|
24
|
-
: Processor extends { processor: infer P }
|
25
|
-
? string extends P
|
26
|
-
? object
|
27
|
-
: { processor: P }
|
28
|
-
: object);
|
29
|
-
public abstract readonly language: (Language extends never
|
30
|
-
? object
|
31
|
-
: Language extends { language: infer L }
|
32
|
-
? string extends L
|
33
|
-
? object
|
34
|
-
: { language: L }
|
35
|
-
: object);
|
36
|
-
constructor(
|
37
|
-
public readonly parser: unknown[] & { length: ParserCount },
|
38
|
-
public readonly files: string[],
|
39
|
-
public readonly ignores: string[],
|
40
|
-
public readonly ruleset: Ruleset,
|
41
|
-
) {}
|
42
|
-
|
43
|
-
public get configs(): Output[2][] {
|
44
|
-
const {
|
45
|
-
scope,
|
46
|
-
files,
|
47
|
-
ignores,
|
48
|
-
ruleset,
|
49
|
-
option,
|
50
|
-
} = this;
|
51
|
-
|
52
|
-
if (ruleset.scope !== scope)
|
53
|
-
throw new TypeError(`Scope mismatch between option and ruleset`, { cause: { option: scope, ruleset: ruleset.scope } });
|
54
|
-
|
55
|
-
return files.length < 1
|
56
|
-
? []
|
57
|
-
: ruleset.ruleset.map(({ id, rules }) => {
|
58
|
-
return {
|
59
|
-
name: `linted/${id}`,
|
60
|
-
files,
|
61
|
-
ignores,
|
62
|
-
rules,
|
63
|
-
...option,
|
64
|
-
};
|
65
|
-
});
|
66
|
-
}
|
67
|
-
|
68
|
-
private get option() {
|
69
|
-
try {
|
70
|
-
const {
|
71
|
-
languageOptions,
|
72
|
-
processor,
|
73
|
-
language,
|
74
|
-
} = this;
|
75
|
-
|
76
|
-
return {
|
77
|
-
languageOptions,
|
78
|
-
...processor,
|
79
|
-
...language,
|
80
|
-
} satisfies OptionProto<
|
81
|
-
ParserOptions,
|
82
|
-
G,
|
83
|
-
Processor,
|
84
|
-
Language
|
85
|
-
>;
|
86
|
-
}
|
87
|
-
catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
|
88
|
-
}
|
89
|
-
|
90
|
-
protected abstract get languageOptions(): OptionProto<ParserOptions, G, Processor, Language>["languageOptions"];
|
91
|
-
|
92
|
-
protected globals(group: G) {
|
93
|
-
if (typeof group !== "string")
|
94
|
-
throw new TypeError(`Expected string`);
|
95
|
-
|
96
|
-
return globals[group];
|
97
|
-
}
|
98
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
export type OptionProto<
|
2
|
-
ParserOptions extends
|
3
|
-
| object
|
4
|
-
| boolean,
|
5
|
-
G extends string | boolean,
|
6
|
-
Processor extends object,
|
7
|
-
Language extends object,
|
8
|
-
> = (
|
9
|
-
{ languageOptions: (G extends never
|
10
|
-
? object
|
11
|
-
: G extends boolean
|
12
|
-
? object
|
13
|
-
: G extends string
|
14
|
-
? string extends G
|
15
|
-
? object
|
16
|
-
: { globals: Record<string, unknown> }
|
17
|
-
: object
|
18
|
-
)
|
19
|
-
& (
|
20
|
-
ParserOptions extends never
|
21
|
-
? object
|
22
|
-
: ParserOptions extends boolean
|
23
|
-
? ParserOptions extends true
|
24
|
-
? { parser: unknown }
|
25
|
-
: object
|
26
|
-
: { parser: unknown; parserOptions: ParserOptions }
|
27
|
-
); }
|
28
|
-
& (
|
29
|
-
Processor extends never
|
30
|
-
? object
|
31
|
-
: Processor extends { processor: infer P }
|
32
|
-
? string extends P
|
33
|
-
? object
|
34
|
-
: { processor: P }
|
35
|
-
: object
|
36
|
-
)
|
37
|
-
& (
|
38
|
-
Language extends never
|
39
|
-
? object
|
40
|
-
: Language extends { language: infer L }
|
41
|
-
? string extends L
|
42
|
-
? object
|
43
|
-
: { language: L }
|
44
|
-
: object
|
45
|
-
)
|
46
|
-
);
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
|
3
|
-
export default class Html extends Option<
|
4
|
-
"html",
|
5
|
-
true
|
6
|
-
> {
|
7
|
-
public readonly scope = "html";
|
8
|
-
public readonly processor = {};
|
9
|
-
public readonly language = {};
|
10
|
-
|
11
|
-
public get languageOptions() {
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
|
3
|
-
export default class Json extends Option<
|
4
|
-
"json",
|
5
|
-
true
|
6
|
-
> {
|
7
|
-
public readonly scope = "json";
|
8
|
-
public readonly processor = {};
|
9
|
-
public readonly language = {};
|
10
|
-
|
11
|
-
public get languageOptions() {
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
|
3
|
-
export default class Jsonc extends Option<
|
4
|
-
"jsonc",
|
5
|
-
true
|
6
|
-
> {
|
7
|
-
public readonly scope = "jsonc";
|
8
|
-
public readonly processor = {};
|
9
|
-
public readonly language = {};
|
10
|
-
|
11
|
-
public get languageOptions() {
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
16
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
import type Ts from "./ts";
|
3
|
-
|
4
|
-
export default class Mocha extends Option<
|
5
|
-
"mocha",
|
6
|
-
Ts["option"]["languageOptions"]["parserOptions"],
|
7
|
-
1,
|
8
|
-
"mocha"
|
9
|
-
> {
|
10
|
-
public readonly scope = "mocha";
|
11
|
-
public readonly processor = {};
|
12
|
-
public readonly language = {};
|
13
|
-
public readonly types = ["mocha"] as const;
|
14
|
-
|
15
|
-
public get languageOptions() {
|
16
|
-
const [parser] = this.parser,
|
17
|
-
globals = this.globals("mocha");
|
18
|
-
|
19
|
-
return {
|
20
|
-
parser,
|
21
|
-
parserOptions: {
|
22
|
-
project: "tsconfig.json",
|
23
|
-
sourceType: "module",
|
24
|
-
ecmaVersion: 2023,
|
25
|
-
},
|
26
|
-
globals,
|
27
|
-
} as const;
|
28
|
-
}
|
29
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
|
3
|
-
export default class Ts extends Option<
|
4
|
-
"ts",
|
5
|
-
{
|
6
|
-
project: "tsconfig.json";
|
7
|
-
sourceType: "module";
|
8
|
-
ecmaVersion: 2023;
|
9
|
-
},
|
10
|
-
1
|
11
|
-
> {
|
12
|
-
public readonly scope = "ts";
|
13
|
-
public readonly processor = {};
|
14
|
-
public readonly language = {};
|
15
|
-
|
16
|
-
public get languageOptions() {
|
17
|
-
const [parser] = this.parser;
|
18
|
-
|
19
|
-
return {
|
20
|
-
parser,
|
21
|
-
parserOptions: {
|
22
|
-
project: "tsconfig.json",
|
23
|
-
sourceType: "module",
|
24
|
-
ecmaVersion: 2023,
|
25
|
-
},
|
26
|
-
} as const;
|
27
|
-
}
|
28
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import Option from "../option";
|
2
|
-
|
3
|
-
export default class Yml extends Option<
|
4
|
-
"yml",
|
5
|
-
true,
|
6
|
-
1
|
7
|
-
> {
|
8
|
-
public readonly scope = "yml";
|
9
|
-
public readonly processor = {};
|
10
|
-
public readonly language = {};
|
11
|
-
|
12
|
-
public get languageOptions() {
|
13
|
-
const [parser] = this.parser;
|
14
|
-
|
15
|
-
return { parser } as const;
|
16
|
-
}
|
17
|
-
}
|
package/src/factory/scoped.ts
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
import type { Input, Scopes } from "..";
|
2
|
-
import { Ruleset } from "./ruleset";
|
3
|
-
|
4
|
-
export class ScopeFactory {
|
5
|
-
constructor(
|
6
|
-
public readonly defaultScopes: Pick<Input["defaults"], "files" | "ignores" | "rules">,
|
7
|
-
public readonly extensions: Omit<Input["extensions"], "*">,
|
8
|
-
) {}
|
9
|
-
|
10
|
-
public produce(scope: Scopes) {
|
11
|
-
return [
|
12
|
-
[...this.defaultScopes.files[scope], ...this.extensions[scope]?.files ?? []] as string[],
|
13
|
-
[...this.defaultScopes.ignores[scope], ...this.extensions[scope]?.ignores ?? []] as string[],
|
14
|
-
new Ruleset(scope, this.defaultScopes.rules[scope], this.extensions[scope]?.rules),
|
15
|
-
] as const;
|
16
|
-
}
|
17
|
-
}
|
File without changes
|
File without changes
|
File without changes
|