@eslinted/core 0.7.0-rc.3 → 0.7.0-rc.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/boundary/input/input.d.ts +3 -2
- package/dist/boundary/input/input.d.ts.map +1 -1
- package/dist/boundary/input/parsers/parsers.d.ts +7 -0
- package/dist/boundary/input/parsers/parsers.d.ts.map +1 -0
- package/dist/boundary/input/parsers/parsers.js +2 -0
- package/dist/boundary/input/parsers/parsers.js.map +1 -0
- package/dist/boundary/input/plugins/plugins.d.ts +6 -0
- package/dist/boundary/input/plugins/plugins.d.ts.map +1 -0
- package/dist/boundary/input/plugins/plugins.js +2 -0
- package/dist/boundary/input/plugins/plugins.js.map +1 -0
- package/dist/boundary/output/config/IConfig.d.ts +19 -0
- package/dist/boundary/output/config/IConfig.d.ts.map +1 -0
- package/dist/boundary/output/config/IConfig.js +2 -0
- package/dist/boundary/output/config/IConfig.js.map +1 -0
- package/dist/boundary/output/output.d.ts +2 -2
- package/dist/boundary/output/output.d.ts.map +1 -1
- package/dist/factory/Factory.d.ts +1 -0
- package/dist/factory/Factory.d.ts.map +1 -1
- package/dist/factory/Factory.js.map +1 -1
- package/dist/factory/options/Options.d.ts +7 -7
- package/dist/factory/options/Options.d.ts.map +1 -1
- package/dist/factory/options/Options.js.map +1 -1
- package/dist/factory/options/option/Option.d.ts +26 -3
- package/dist/factory/options/option/Option.d.ts.map +1 -1
- package/dist/factory/options/option/Option.js +22 -3
- package/dist/factory/options/option/Option.js.map +1 -1
- package/dist/factory/options/option/html/index.d.ts +6 -2
- package/dist/factory/options/option/html/index.d.ts.map +1 -1
- package/dist/factory/options/option/html/index.js +5 -11
- package/dist/factory/options/option/html/index.js.map +1 -1
- package/dist/factory/options/option/js/index.d.ts +6 -1
- package/dist/factory/options/option/js/index.d.ts.map +1 -1
- package/dist/factory/options/option/js/index.js +7 -14
- package/dist/factory/options/option/js/index.js.map +1 -1
- package/dist/factory/options/option/json/index.d.ts +6 -2
- package/dist/factory/options/option/json/index.d.ts.map +1 -1
- package/dist/factory/options/option/json/index.js +5 -11
- package/dist/factory/options/option/json/index.js.map +1 -1
- package/dist/factory/options/option/jsonc/index.d.ts +6 -2
- package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
- package/dist/factory/options/option/jsonc/index.js +5 -11
- package/dist/factory/options/option/jsonc/index.js.map +1 -1
- package/dist/factory/options/option/svelte/index.d.ts +21 -4
- package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
- package/dist/factory/options/option/svelte/index.js +13 -20
- package/dist/factory/options/option/svelte/index.js.map +1 -1
- package/dist/factory/options/option/ts/index.d.ts +14 -3
- package/dist/factory/options/option/ts/index.d.ts.map +1 -1
- package/dist/factory/options/option/ts/index.js +11 -17
- package/dist/factory/options/option/ts/index.js.map +1 -1
- package/dist/factory/options/option/yml/index.d.ts +6 -2
- package/dist/factory/options/option/yml/index.d.ts.map +1 -1
- package/dist/factory/options/option/yml/index.js +5 -11
- package/dist/factory/options/option/yml/index.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/boundary/input/input.ts +4 -2
- package/src/boundary/input/parsers/parsers.ts +6 -0
- package/src/boundary/input/plugins/plugins.ts +7 -0
- package/src/boundary/output/config/{index.ts → IConfig.ts} +3 -4
- package/src/boundary/output/config/interface/option/IOption.d.ts +15 -20
- package/src/boundary/output/config/interface/option/language/IOLanguage.d.ts +16 -13
- package/src/boundary/output/config/interface/option/language/ecma/IOLanguageEcma.d.ts +1 -19
- package/src/boundary/output/config/interface/option/language/globals/IOLanguageGlobals.d.ts +1 -3
- package/src/boundary/output/config/interface/option/language/source/IOLanguageSource.d.ts +3 -12
- package/src/boundary/output/config/interface/option/linter/IOLinter.d.ts +3 -29
- package/src/boundary/output/config/interface/option/name/IOName.d.ts +1 -3
- package/src/boundary/output/config/interface/option/plugins/IOPlugins.d.ts +1 -3
- package/src/boundary/output/config/interface/option/processor/IOProcessor.d.ts +1 -3
- package/src/boundary/output/output.ts +2 -2
- package/src/factory/Factory.ts +1 -0
- package/src/factory/options/Options.ts +1 -1
- package/src/factory/options/option/Option.ts +47 -16
- package/src/factory/options/option/html/index.ts +9 -22
- package/src/factory/options/option/js/index.ts +8 -19
- package/src/factory/options/option/json/index.ts +9 -22
- package/src/factory/options/option/jsonc/index.ts +9 -22
- package/src/factory/options/option/svelte/index.ts +22 -33
- package/src/factory/options/option/ts/index.ts +19 -28
- package/src/factory/options/option/yml/index.ts +9 -22
- package/src/index.ts +30 -23
- package/types/project/OmitLast.d.ts +1 -0
- package/src/boundary/input/parsers/index.ts +0 -12
- package/src/boundary/input/plugins/index.ts +0 -20
- package/src/boundary/output/config/interface/files/IFiles.d.ts +0 -1
- package/src/boundary/output/config/interface/option/language/parser/IOLanguageParser.d.ts +0 -3
- package/src/boundary/output/config/interface/option/language/parserOptions/IOLanguageParserOptions.d.ts +0 -5
- package/src/boundary/output/config/interface/rules/IRules.d.ts +0 -1
- /package/src/boundary/output/config/interface/rules/{rule/IRule.d.ts → IRule.d.ts} +0 -0
- /package/src/boundary/output/config/interface/rules/{rule/state → state}/RuleSeverity.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/base32.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/base64.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/binary.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/decimal.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/hex.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/octal.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/quatral.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/ternary.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/base64char.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/digit.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/hexchar.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/letter.d.ts +0 -0
- /package/types/{safe → typioca/safe}/Safe.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/finite/Finite.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/finite.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/fint.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/int/Int.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/int.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/numberful.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/Negative.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/Positive.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/pole/Pole.d.ts +0 -0
- /package/types/{safe → typioca/safe}/primitive.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/char.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/length/PropLength.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/stringful.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Particord.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Property.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Recordful.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Table.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Field.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Flag.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Limit.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/List.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Listish.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Scalar.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/FieldTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/FlagTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ListTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ListishTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ScalarTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/identity/Interface.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/identity/Keys.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/transform/Unrequire.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/ArrayN.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/Tuple.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/arrays/Arrays.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/tuples/Tuples.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/DyadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/MonadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/TriadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/array/ArrayType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/array/length/ArrayLength.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/Join.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/Unflat.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/Chain.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/PathN.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/stringify/Stringify.d.ts +0 -0
- /package/types/{utility → typioca/utility}/length/Length.d.ts +0 -0
- /package/types/{utility → typioca/utility}/null/null.d.ts +0 -0
- /package/types/{utility → typioca/utility}/null/nullable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/Primeval.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/boolean/True.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/number/Numbered.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/string/literal.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/string/literalful.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAOrC;IACiB,IAAI,GAAG,UAAU,CAAC;IAClB,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,UAAU,EAAE,QAAQ;YACpB,MAAM;YACN,aAAa,EAAE;gBACb,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,eAAe;aACzB;SACO,CAAC;IACb,CAAC;CACF"}
|
@@ -1,5 +1,9 @@
|
|
1
1
|
import Option from "../Option.js";
|
2
|
-
export default class YmlOption extends Option<"yml", "yml",
|
3
|
-
|
2
|
+
export default class YmlOption extends Option<"yml", "yml", false, true, 1> {
|
3
|
+
readonly name = "scope:yml";
|
4
|
+
readonly processor: {};
|
5
|
+
get languageOptions(): {
|
6
|
+
readonly parser: unknown;
|
7
|
+
};
|
4
8
|
}
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,MAAM,CAC3C,KAAK,EACL,KAAK,EACL,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,MAAM,CAC3C,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,IAAI,eAAe;IACnC,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1,16 +1,10 @@
|
|
1
1
|
import Option from "../Option.js";
|
2
2
|
export default class YmlOption extends Option {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
linterOptions: {
|
9
|
-
noInlineConfig: true,
|
10
|
-
reportUnusedDisableDirectives: "error",
|
11
|
-
},
|
12
|
-
languageOptions: { parser },
|
13
|
-
});
|
3
|
+
name = "scope:yml";
|
4
|
+
processor = {};
|
5
|
+
get languageOptions() {
|
6
|
+
const [parser] = this.parser;
|
7
|
+
return { parser };
|
14
8
|
}
|
15
9
|
}
|
16
10
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,MAMtC;IACiB,IAAI,GAAG,WAAW,CAAC;IACnB,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,OAAO,EACP,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,KAAK,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAC7B,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,MAAM,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,OAAO,EACP,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,KAAK,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAC7B,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,MAAM,EAAE,CAgGV"}
|
package/dist/index.js
CHANGED
@@ -3,31 +3,42 @@ import { Options, Files, Ruleset, Rule, } from "./factory/Factory.js";
|
|
3
3
|
export { Ruleset, Rule };
|
4
4
|
export default function (plugins, parsers, base, includes, rulesets, overrides) {
|
5
5
|
try {
|
6
|
-
const files = new Files(base, includes)
|
6
|
+
const files = new Files(base, includes), imports = {
|
7
|
+
js: [plugins.js, []],
|
8
|
+
ts: [plugins.ts, [parsers.ts]],
|
9
|
+
svelte: [
|
10
|
+
plugins.svelte,
|
11
|
+
[parsers.svelte, parsers.ts],
|
12
|
+
],
|
13
|
+
html: [plugins.html, [parsers.html]],
|
14
|
+
json: [plugins.json, [parsers.json]],
|
15
|
+
jsonc: [plugins.jsonc, [parsers.jsonc]],
|
16
|
+
yml: [plugins.yml, [parsers.yml]],
|
17
|
+
};
|
7
18
|
for (const scope of scopes)
|
8
19
|
rulesets[scope].override(overrides[scope]);
|
9
20
|
const options = {
|
10
21
|
js: new Options
|
11
|
-
.js(
|
12
|
-
.
|
22
|
+
.js(files.files("js"), ...imports.js)
|
23
|
+
.option,
|
13
24
|
ts: new Options
|
14
|
-
.ts(
|
15
|
-
.
|
25
|
+
.ts(files.files("ts"), ...imports.ts)
|
26
|
+
.option,
|
16
27
|
svelte: new Options
|
17
|
-
.svelte(
|
18
|
-
.
|
28
|
+
.svelte(files.files("svelte"), ...imports.svelte)
|
29
|
+
.option,
|
19
30
|
html: new Options
|
20
|
-
.html(
|
21
|
-
.
|
31
|
+
.html(files.files("html"), ...imports.html)
|
32
|
+
.option,
|
22
33
|
json: new Options
|
23
|
-
.json(
|
24
|
-
.
|
34
|
+
.json(files.files("json"), ...imports.json)
|
35
|
+
.option,
|
25
36
|
jsonc: new Options
|
26
|
-
.jsonc(
|
27
|
-
.
|
37
|
+
.jsonc(files.files("jsonc"), ...imports.jsonc)
|
38
|
+
.option,
|
28
39
|
yml: new Options
|
29
|
-
.yml(
|
30
|
-
.
|
40
|
+
.yml(files.files("yml"), ...imports.yml)
|
41
|
+
.option,
|
31
42
|
};
|
32
43
|
return scopes
|
33
44
|
.map(scope => options[scope].files.length > 0
|
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,wBAAwB,CAAC;AAO5C,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAgB,EAChB,OAAgB,EAChB,IAA6B,EAC7B,QAAoC,EACpC,QAAsC,EACtC,SAAkC;IAElC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,IAAI,EACJ,QAAQ,CACT,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import type Plugins from "./plugins/plugins.js";
|
2
|
+
import type Parsers from "./parsers/parsers.js";
|
3
|
+
|
4
|
+
export type { Plugins, Parsers };
|
3
5
|
export type { Scope } from "../boundary.js";
|
@@ -1,7 +1,7 @@
|
|
1
|
-
export default interface
|
1
|
+
export default interface IConfig {
|
2
|
+
name: `scope:${string}`;
|
2
3
|
rules: IRule;
|
3
4
|
files: readonly string[];
|
4
|
-
name: `linted/scope:${string}`;
|
5
5
|
linterOptions: {
|
6
6
|
noInlineConfig: true;
|
7
7
|
reportUnusedDisableDirectives: "error";
|
@@ -9,8 +9,7 @@ export default interface Config {
|
|
9
9
|
languageOptions: {
|
10
10
|
sourceType?:
|
11
11
|
| "module"
|
12
|
-
| "script"
|
13
|
-
;
|
12
|
+
| "script";
|
14
13
|
ecmaVersion?: "latest";
|
15
14
|
globals?: Record<string, true>;
|
16
15
|
parser?: unknown;
|
@@ -1,25 +1,20 @@
|
|
1
1
|
declare type IOption<
|
2
2
|
Name extends string,
|
3
|
-
NoInline extends boolean,
|
4
|
-
ReportUnused extends boolean | IOLinter.States,
|
5
3
|
PluginId extends string,
|
6
|
-
|
7
|
-
|
8
|
-
UseParser extends boolean,
|
9
|
-
ParserOptions extends object,
|
4
|
+
IsEcma extends boolean,
|
5
|
+
ParserOptions extends object | boolean,
|
10
6
|
GlobalTypes extends string,
|
11
|
-
|
7
|
+
Processor extends object,
|
12
8
|
> =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
>
|
24
|
-
&
|
25
|
-
;
|
9
|
+
{
|
10
|
+
name: IOName<Name>;
|
11
|
+
files: readonly string[];
|
12
|
+
linterOptions: IOLinter;
|
13
|
+
languageOptions: IOLanguage<
|
14
|
+
IsEcma,
|
15
|
+
ParserOptions,
|
16
|
+
GlobalTypes
|
17
|
+
>;
|
18
|
+
}
|
19
|
+
& (IOPlugins<PluginId> extends never ? object : { plugins: IOPlugins<PluginId> })
|
20
|
+
& (Interface<Processor> extends never ? object : Interface<Processor> extends { "interface": string } ? Interface<Processor> : object);
|
@@ -1,15 +1,18 @@
|
|
1
1
|
declare type IOLanguage<
|
2
|
-
|
3
|
-
|
4
|
-
UseParser extends boolean,
|
5
|
-
ParserOptions extends object,
|
2
|
+
IsEcma extends boolean,
|
3
|
+
ParserOptions extends object | boolean,
|
6
4
|
GlobalTypes extends string,
|
7
|
-
> =
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
> =
|
6
|
+
& (True<IsEcma> extends never ? object : { ecmaVersion: IOLanguageEcma; sourceType: IOLanguageSource })
|
7
|
+
& (literalful<GlobalTypes> extends never ? object : { globals: IOLanguageGlobals<GlobalTypes> })
|
8
|
+
& (
|
9
|
+
ParserOptions extends boolean
|
10
|
+
? True<ParserOptions> extends never
|
11
|
+
? object
|
12
|
+
: { parser: unknown }
|
13
|
+
: ParserOptions extends object
|
14
|
+
? Interface<ParserOptions> extends never
|
15
|
+
? object
|
16
|
+
: { parser: unknown; parserOptions: ParserOptions }
|
17
|
+
: object
|
18
|
+
);
|
@@ -1,19 +1 @@
|
|
1
|
-
declare type IOLanguageEcma
|
2
|
-
? Numbered<Ecma> extends never
|
3
|
-
? object
|
4
|
-
: { ecmaVersion: Numbered<Ecma> }
|
5
|
-
: [Ecma] extends [string]
|
6
|
-
? literalful<Ecma> extends never
|
7
|
-
? object
|
8
|
-
: literalful<Ecma> extends IOLanguageEcma.Ecma
|
9
|
-
? { ecmaVersion: literalful<Ecma> }
|
10
|
-
: object
|
11
|
-
: object;
|
12
|
-
|
13
|
-
declare namespace IOLanguageEcma {
|
14
|
-
export type Ecma =
|
15
|
-
| `${number}`
|
16
|
-
| `ES${number}`
|
17
|
-
| `es${number}`
|
18
|
-
| "latest";
|
19
|
-
}
|
1
|
+
declare type IOLanguageEcma = "latest";
|
@@ -1,12 +1,3 @@
|
|
1
|
-
declare type IOLanguageSource
|
2
|
-
|
3
|
-
|
4
|
-
? { sourceType: literalful<Source> }
|
5
|
-
: object;
|
6
|
-
|
7
|
-
declare namespace IOLanguageSource {
|
8
|
-
export type Source =
|
9
|
-
| "module"
|
10
|
-
| "script"
|
11
|
-
| "commonjs";
|
12
|
-
}
|
1
|
+
declare type IOLanguageSource =
|
2
|
+
| "module"
|
3
|
+
| "script";
|
@@ -1,30 +1,4 @@
|
|
1
|
-
declare
|
2
|
-
|
3
|
-
|
4
|
-
| boolean
|
5
|
-
| IOLinter.States,
|
6
|
-
> = {
|
7
|
-
linterOptions: {
|
8
|
-
noInlineConfig: True<NoInline> extends never
|
9
|
-
? false
|
10
|
-
: True<NoInline>;
|
11
|
-
reportUnusedDisableDirectives: [ReportUnused] extends [boolean]
|
12
|
-
? True<ReportUnused> extends never
|
13
|
-
? false
|
14
|
-
: True<ReportUnused>
|
15
|
-
: [ReportUnused] extends [string]
|
16
|
-
? literalful<ReportUnused> extends never
|
17
|
-
? false
|
18
|
-
: literalful<ReportUnused> extends IOLinter.States
|
19
|
-
? literalful<ReportUnused>
|
20
|
-
: false
|
21
|
-
: false;
|
22
|
-
};
|
23
|
-
};
|
24
|
-
|
25
|
-
declare namespace IOLinter {
|
26
|
-
export type States =
|
27
|
-
| "error"
|
28
|
-
| "warn"
|
29
|
-
| "off";
|
1
|
+
declare interface IOLinter {
|
2
|
+
noInlineConfig: true;
|
3
|
+
reportUnusedDisableDirectives: "error";
|
30
4
|
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type
|
1
|
+
import type IConfig from "./config/IConfig.js";
|
2
2
|
|
3
|
-
export type {
|
3
|
+
export type { IConfig as default };
|
package/src/factory/Factory.ts
CHANGED
@@ -1,27 +1,58 @@
|
|
1
1
|
import type { Scope } from "../Options.js";
|
2
2
|
|
3
|
-
export default class Option<
|
3
|
+
export default abstract class Option<
|
4
4
|
S extends Scope,
|
5
5
|
PluginId extends string,
|
6
|
-
|
7
|
-
ParserOptions extends object =
|
6
|
+
IsEcma extends boolean = true,
|
7
|
+
ParserOptions extends object | boolean = false,
|
8
|
+
ParserCount extends 0 | 1 | 2 = 0,
|
8
9
|
GlobalTypes extends string = never,
|
9
|
-
|
10
|
-
Source extends IOLanguageSource.Source = "module",
|
11
|
-
Ecma extends number | IOLanguageEcma.Ecma = "latest",
|
10
|
+
Processor extends object = never,
|
12
11
|
> {
|
12
|
+
public readonly linterOptions = {
|
13
|
+
noInlineConfig: true,
|
14
|
+
reportUnusedDisableDirectives: "error",
|
15
|
+
} as const;
|
16
|
+
|
17
|
+
public abstract readonly name: literalful<`scope:${S}`>;
|
18
|
+
public abstract readonly processor: (Interface<Processor> extends never ? object : Interface<Processor> extends { "interface": string } ? Interface<Processor> : object);
|
19
|
+
|
13
20
|
constructor(
|
14
|
-
public readonly
|
15
|
-
|
16
|
-
|
17
|
-
|
21
|
+
public readonly files: readonly string[],
|
22
|
+
public readonly plugins: IOPlugins<PluginId>,
|
23
|
+
public readonly parser: Tuple<unknown, ParserCount>,
|
24
|
+
) {}
|
25
|
+
|
26
|
+
public get option() {
|
27
|
+
const {
|
28
|
+
name,
|
29
|
+
files,
|
30
|
+
plugins,
|
31
|
+
linterOptions,
|
32
|
+
languageOptions,
|
33
|
+
processor,
|
34
|
+
} = this;
|
35
|
+
|
36
|
+
return {
|
37
|
+
name,
|
38
|
+
files,
|
39
|
+
linterOptions,
|
40
|
+
languageOptions,
|
41
|
+
plugins,
|
42
|
+
...processor,
|
43
|
+
} satisfies IOption<
|
44
|
+
`scope:${S}`,
|
18
45
|
PluginId,
|
19
|
-
|
20
|
-
Source,
|
21
|
-
UseParser,
|
46
|
+
IsEcma,
|
22
47
|
ParserOptions,
|
23
48
|
GlobalTypes,
|
24
|
-
|
25
|
-
|
26
|
-
|
49
|
+
Processor
|
50
|
+
>;
|
51
|
+
}
|
52
|
+
|
53
|
+
public abstract get languageOptions(): IOLanguage<
|
54
|
+
IsEcma,
|
55
|
+
ParserOptions,
|
56
|
+
GlobalTypes
|
57
|
+
>;
|
27
58
|
}
|
@@ -3,29 +3,16 @@ import Option from "../Option.js";
|
|
3
3
|
export default class HtmlOption extends Option<
|
4
4
|
"html",
|
5
5
|
"@html-eslint",
|
6
|
+
false,
|
6
7
|
true,
|
7
|
-
|
8
|
-
never,
|
9
|
-
never,
|
10
|
-
never,
|
11
|
-
never
|
8
|
+
1
|
12
9
|
> {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
name: "linted/scope:html",
|
21
|
-
files,
|
22
|
-
plugins,
|
23
|
-
linterOptions: {
|
24
|
-
noInlineConfig: true,
|
25
|
-
reportUnusedDisableDirectives: "error",
|
26
|
-
},
|
27
|
-
languageOptions: { parser },
|
28
|
-
},
|
29
|
-
);
|
10
|
+
public readonly name = "scope:html";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
30
17
|
}
|
31
18
|
}
|
@@ -1,24 +1,13 @@
|
|
1
1
|
import Option from "../Option.js";
|
2
2
|
|
3
3
|
export default class JsOption extends Option<"js", "@stylistic"> {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
) {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
plugins,
|
13
|
-
linterOptions: {
|
14
|
-
noInlineConfig: true,
|
15
|
-
reportUnusedDisableDirectives: "error",
|
16
|
-
},
|
17
|
-
languageOptions: {
|
18
|
-
ecmaVersion: "latest",
|
19
|
-
sourceType: "module",
|
20
|
-
},
|
21
|
-
},
|
22
|
-
);
|
4
|
+
public readonly name = "scope:js";
|
5
|
+
public readonly processor = {};
|
6
|
+
|
7
|
+
public get languageOptions() {
|
8
|
+
return {
|
9
|
+
ecmaVersion: "latest",
|
10
|
+
sourceType: "module",
|
11
|
+
} as const;
|
23
12
|
}
|
24
13
|
}
|
@@ -3,29 +3,16 @@ import Option from "../Option.js";
|
|
3
3
|
export default class JsonOption extends Option<
|
4
4
|
"json",
|
5
5
|
"jsonc",
|
6
|
+
false,
|
6
7
|
true,
|
7
|
-
|
8
|
-
never,
|
9
|
-
never,
|
10
|
-
never,
|
11
|
-
never
|
8
|
+
1
|
12
9
|
> {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
name: "linted/scope:json",
|
21
|
-
files,
|
22
|
-
plugins,
|
23
|
-
linterOptions: {
|
24
|
-
noInlineConfig: true,
|
25
|
-
reportUnusedDisableDirectives: "error",
|
26
|
-
},
|
27
|
-
languageOptions: { parser },
|
28
|
-
},
|
29
|
-
);
|
10
|
+
public readonly name = "scope:json";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
30
17
|
}
|
31
18
|
}
|
@@ -3,29 +3,16 @@ import Option from "../Option.js";
|
|
3
3
|
export default class JsoncOption extends Option<
|
4
4
|
"jsonc",
|
5
5
|
"jsonc",
|
6
|
+
false,
|
6
7
|
true,
|
7
|
-
|
8
|
-
never,
|
9
|
-
never,
|
10
|
-
never,
|
11
|
-
never
|
8
|
+
1
|
12
9
|
> {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
name: "linted/scope:jsonc",
|
21
|
-
files,
|
22
|
-
plugins,
|
23
|
-
linterOptions: {
|
24
|
-
noInlineConfig: true,
|
25
|
-
reportUnusedDisableDirectives: "error",
|
26
|
-
},
|
27
|
-
languageOptions: { parser },
|
28
|
-
},
|
29
|
-
);
|
10
|
+
public readonly name = "scope:jsonc";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
30
17
|
}
|
31
18
|
}
|