@eslinted/core 11.0.0 → 11.1.0-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/factory/options/html.d.ts +1 -1
- package/dist/factory/options/html.d.ts.map +1 -1
- package/dist/factory/options/html.js.map +1 -1
- package/dist/factory/options/js.d.ts +2 -5
- package/dist/factory/options/js.d.ts.map +1 -1
- package/dist/factory/options/js.js +1 -4
- package/dist/factory/options/js.js.map +1 -1
- package/dist/factory/options/json.d.ts +1 -1
- package/dist/factory/options/json.d.ts.map +1 -1
- package/dist/factory/options/json.js.map +1 -1
- package/dist/factory/options/jsonc.d.ts +1 -2
- package/dist/factory/options/jsonc.d.ts.map +1 -1
- package/dist/factory/options/jsonc.js.map +1 -1
- package/dist/factory/options/mocha.d.ts +2 -4
- package/dist/factory/options/mocha.d.ts.map +1 -1
- package/dist/factory/options/mocha.js +5 -3
- package/dist/factory/options/mocha.js.map +1 -1
- package/dist/factory/options/option/index.d.ts +5 -7
- package/dist/factory/options/option/index.d.ts.map +1 -1
- package/dist/factory/options/option/index.js +2 -7
- package/dist/factory/options/option/index.js.map +1 -1
- package/dist/factory/options/option/template/index.d.ts +5 -10
- package/dist/factory/options/option/template/index.d.ts.map +1 -1
- package/dist/factory/options/option/template/languageOptions.d.ts +9 -0
- package/dist/factory/options/option/template/languageOptions.d.ts.map +1 -0
- package/dist/factory/options/option/template/languageOptions.js +2 -0
- package/dist/factory/options/option/template/languageOptions.js.map +1 -0
- package/dist/factory/options/svelte.d.ts +2 -5
- package/dist/factory/options/svelte.d.ts.map +1 -1
- package/dist/factory/options/svelte.js +1 -3
- package/dist/factory/options/svelte.js.map +1 -1
- package/dist/factory/options/ts.d.ts +5 -6
- package/dist/factory/options/ts.d.ts.map +1 -1
- package/dist/factory/options/ts.js +5 -3
- package/dist/factory/options/ts.js.map +1 -1
- package/dist/factory/options/yml.d.ts +1 -1
- package/dist/factory/options/yml.d.ts.map +1 -1
- package/dist/factory/options/yml.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -10
- package/dist/index.js.map +1 -1
- package/dist/output.d.ts +28 -18
- package/dist/output.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/factory/options/html.ts +0 -2
- package/src/factory/options/js.ts +2 -8
- package/src/factory/options/json.ts +0 -2
- package/src/factory/options/jsonc.ts +1 -4
- package/src/factory/options/mocha.ts +5 -5
- package/src/factory/options/option/index.ts +2 -15
- package/src/factory/options/option/template/index.ts +1 -9
- package/src/factory/options/option/template/{languageOptions/index.ts → languageOptions.ts} +0 -5
- package/src/factory/options/svelte.ts +5 -6
- package/src/factory/options/ts.ts +10 -7
- package/src/factory/options/yml.ts +0 -2
- package/src/index.ts +17 -10
- package/src/output.ts +57 -13
- package/typings/common/utility/primitive/cast/number.d.ts +3 -0
- package/dist/factory/options/option/template/languageOptions/ecma.d.ts +0 -2
- package/dist/factory/options/option/template/languageOptions/ecma.d.ts.map +0 -1
- package/dist/factory/options/option/template/languageOptions/ecma.js +0 -2
- package/dist/factory/options/option/template/languageOptions/ecma.js.map +0 -1
- package/dist/factory/options/option/template/languageOptions/index.d.ts +0 -14
- package/dist/factory/options/option/template/languageOptions/index.d.ts.map +0 -1
- package/dist/factory/options/option/template/languageOptions/index.js +0 -2
- package/dist/factory/options/option/template/languageOptions/index.js.map +0 -1
- package/dist/factory/options/option/template/languageOptions/source.d.ts +0 -2
- package/dist/factory/options/option/template/languageOptions/source.d.ts.map +0 -1
- package/dist/factory/options/option/template/languageOptions/source.js +0 -2
- package/dist/factory/options/option/template/languageOptions/source.js.map +0 -1
- package/dist/factory/options/option/template/linter.d.ts +0 -5
- package/dist/factory/options/option/template/linter.d.ts.map +0 -1
- package/dist/factory/options/option/template/linter.js +0 -2
- package/dist/factory/options/option/template/linter.js.map +0 -1
- package/dist/factory/options/option/template/plugins.d.ts +0 -4
- package/dist/factory/options/option/template/plugins.d.ts.map +0 -1
- package/dist/factory/options/option/template/plugins.js +0 -2
- package/dist/factory/options/option/template/plugins.js.map +0 -1
- package/src/factory/options/option/template/languageOptions/ecma.ts +0 -3
- package/src/factory/options/option/template/languageOptions/source.ts +0 -4
- package/src/factory/options/option/template/linter.ts +0 -8
- package/src/factory/options/option/template/plugins.ts +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,
|
1
|
+
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAIjC;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,11 +1,8 @@
|
|
1
1
|
import Option from "./option/index.js";
|
2
|
-
export default class Js extends Option<"js"
|
2
|
+
export default class Js extends Option<"js"> {
|
3
3
|
readonly scope = "js";
|
4
4
|
readonly processor: {};
|
5
5
|
readonly language: {};
|
6
|
-
get languageOptions(): {
|
7
|
-
readonly ecmaVersion: "latest";
|
8
|
-
readonly sourceType: "module";
|
9
|
-
};
|
6
|
+
get languageOptions(): {};
|
10
7
|
}
|
11
8
|
//# sourceMappingURL=js.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,
|
1
|
+
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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 +1 @@
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,
|
1
|
+
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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 +1 @@
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAIjC;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,6 +1,5 @@
|
|
1
1
|
import Option from "./option/index.js";
|
2
|
-
|
3
|
-
export default class Jsonc extends Option<"jsonc", keyof Json["plugins"], false, true, ConstructorParameters<typeof Json>[1]["length"]> {
|
2
|
+
export default class Jsonc extends Option<"jsonc", true, 1> {
|
4
3
|
readonly scope = "jsonc";
|
5
4
|
readonly processor: {};
|
6
5
|
readonly language: {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAIlC;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,6 +1,6 @@
|
|
1
1
|
import Option from "./option/index.js";
|
2
2
|
import type Ts from "./ts.js";
|
3
|
-
export default class Mocha extends Option<"mocha",
|
3
|
+
export default class Mocha extends Option<"mocha", Ts["option"]["languageOptions"]["parserOptions"], 1, "mocha"> {
|
4
4
|
readonly scope = "mocha";
|
5
5
|
readonly processor: {};
|
6
6
|
readonly language: {};
|
@@ -8,13 +8,11 @@ export default class Mocha extends Option<"mocha", "mocha" | keyof Ts["option"][
|
|
8
8
|
"mocha"
|
9
9
|
];
|
10
10
|
get languageOptions(): {
|
11
|
-
readonly ecmaVersion: "latest";
|
12
|
-
readonly sourceType: "module";
|
13
11
|
readonly parser: unknown;
|
14
12
|
readonly parserOptions: {
|
15
13
|
readonly project: "tsconfig.json";
|
16
|
-
readonly ecmaVersion: "latest";
|
17
14
|
readonly sourceType: "module";
|
15
|
+
readonly ecmaVersion: 2023;
|
18
16
|
};
|
19
17
|
readonly globals: {
|
20
18
|
readonly after: false;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,
|
1
|
+
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,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"}
|
@@ -7,10 +7,12 @@ export default class Mocha extends Option {
|
|
7
7
|
get languageOptions() {
|
8
8
|
const [parser] = this.parser, globals = this.globals("mocha");
|
9
9
|
return {
|
10
|
-
ecmaVersion: "latest",
|
11
|
-
sourceType: "module",
|
12
10
|
parser,
|
13
|
-
parserOptions: {
|
11
|
+
parserOptions: {
|
12
|
+
project: "tsconfig.json",
|
13
|
+
sourceType: "module",
|
14
|
+
ecmaVersion: 2023,
|
15
|
+
},
|
14
16
|
globals,
|
15
17
|
};
|
16
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,
|
1
|
+
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,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,18 +1,16 @@
|
|
1
1
|
import type { Ruleset } from "../../rulesets/ruleset.js";
|
2
|
-
import type { Scope,
|
3
|
-
export default abstract class Option<S extends Scope,
|
4
|
-
readonly plugins: Plugins<Plugin>;
|
2
|
+
import type { Scope, Output, LanguageOptions, Globals } from "./template/index.js";
|
3
|
+
export default abstract class Option<S extends Scope, ParserOptions extends object | boolean = false, ParserCount extends 0 | 1 | 2 = 0, Global extends Globals = never, Processor extends object = never, Language extends object = never> {
|
5
4
|
readonly parser: Tuple<ParserCount, unknown>;
|
6
5
|
readonly files: string[];
|
7
6
|
readonly ruleset: Ruleset;
|
8
|
-
private readonly linterOptions;
|
9
7
|
abstract readonly scope: literalful<S>;
|
10
8
|
abstract readonly processor: Interface<Processor> extends never ? object : Interface<Processor> extends Readonly<Record<"processor", string>> ? Interface<Processor> : object;
|
11
9
|
abstract readonly language: Interface<Language> extends never ? object : Interface<Language> extends Readonly<Record<"language", string>> ? Interface<Language> : object;
|
12
|
-
constructor(
|
13
|
-
get configs(): Output;
|
10
|
+
constructor(parser: Tuple<ParserCount, unknown>, files: string[], ruleset: Ruleset);
|
11
|
+
get configs(): Output[1][];
|
14
12
|
private get option();
|
15
|
-
protected abstract get languageOptions(): LanguageOptions<
|
13
|
+
protected abstract get languageOptions(): LanguageOptions<ParserOptions, Global>;
|
16
14
|
protected globals(type: Global): {
|
17
15
|
readonly amd: {
|
18
16
|
readonly define: false;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EACV,KAAK,EACL,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EAEN,eAAe,EACf,OAAO,EACR,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,OAAO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constructor(plugins, parser, files, ruleset) {
|
9
|
-
this.plugins = plugins;
|
6
|
+
constructor(parser, files, ruleset) {
|
10
7
|
this.parser = parser;
|
11
8
|
this.files = files;
|
12
9
|
this.ruleset = ruleset;
|
@@ -28,10 +25,8 @@ export default class Option {
|
|
28
25
|
}
|
29
26
|
get option() {
|
30
27
|
try {
|
31
|
-
const {
|
28
|
+
const { languageOptions, processor, language, } = this;
|
32
29
|
return {
|
33
|
-
plugins,
|
34
|
-
linterOptions,
|
35
30
|
languageOptions,
|
36
31
|
...processor,
|
37
32
|
...language,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAU9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IAqBhB;IACA;IACA;IAHlB,YACkB,MAAmC,EACnC,KAAe,EACf,OAAgB;QAFhB,WAAM,GAAN,MAAM,CAA6B;QACnC,UAAK,GAAL,KAAK,CAAU;QACf,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEJ,IAAW,OAAO;QAChB,MAAM,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,GACP,GAAG,IAAI,CAAC;QAET,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;YACzB,MAAM,IAAI,SAAS,CAAC,2CAA2C,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzH,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;gBACrC,OAAO;oBACL,IAAI,EAAE,UAAU,EAAE,EAAE;oBACpB,KAAK;oBACL,KAAK,EAAE,IAAI;oBACX,GAAG,MAAM;iBACV,CAAC;YACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,eAAe,EACf,SAAS,EACT,QAAQ,GACT,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,eAAe;gBACf,GAAG,SAAS;gBACZ,GAAG,QAAQ;aAMZ,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACnG,CAAC;IAIS,OAAO,CAAC,IAAY;QAC5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF"}
|
@@ -1,15 +1,10 @@
|
|
1
1
|
export type { Scope, Input, Output } from "../../index.js";
|
2
|
-
import type { LanguageOptions } from "./languageOptions
|
3
|
-
import type { Linter } from "./linter.js";
|
4
|
-
import type { Plugins } from "./plugins.js";
|
2
|
+
import type { LanguageOptions } from "./languageOptions.js";
|
5
3
|
import type { Globals } from "./globals.js";
|
6
|
-
export type { LanguageOptions,
|
7
|
-
export type OptionTemplate<
|
8
|
-
|
9
|
-
|
10
|
-
} & (Plugins<PluginId> extends never ? object : {
|
11
|
-
plugins: Plugins<PluginId>;
|
12
|
-
}) & (Interface<Processor> extends never ? object : Interface<Processor> extends {
|
4
|
+
export type { LanguageOptions, Globals, };
|
5
|
+
export type OptionTemplate<ParserOptions extends boolean | object, GlobalTypes extends Globals, Processor extends object, Language extends object> = {
|
6
|
+
languageOptions: LanguageOptions<ParserOptions, GlobalTypes>;
|
7
|
+
} & (Interface<Processor> extends never ? object : Interface<Processor> extends {
|
13
8
|
processor: string;
|
14
9
|
} ? Interface<Processor> : object) & (Interface<Language> extends never ? object : Interface<Language> extends {
|
15
10
|
language: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,OAAO,GACR,CAAC;AACF,MAAM,MAAM,cAAc,CACxB,aAAa,SAAS,OAAO,GAAG,MAAM,EACtC,WAAW,SAAS,OAAO,EAC3B,SAAS,SAAS,MAAM,EACxB,QAAQ,SAAS,MAAM,IAErB;IACA,eAAe,EAAE,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;CAC9D,GACC,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAClI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export type LanguageOptions<ParserOptions extends object | boolean, GlobalTypes extends string> = (literalful<GlobalTypes> extends never ? object : {
|
2
|
+
globals: Record<string, unknown>;
|
3
|
+
}) & (ParserOptions extends boolean ? Truth<ParserOptions> extends never ? object : {
|
4
|
+
parser: unknown;
|
5
|
+
} : ParserOptions extends object ? Interface<ParserOptions> extends never ? object : {
|
6
|
+
parser: unknown;
|
7
|
+
parserOptions: ParserOptions;
|
8
|
+
} : object);
|
9
|
+
//# sourceMappingURL=languageOptions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"languageOptions.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CACzB,aAAa,SAAS,MAAM,GAAG,OAAO,EACtC,WAAW,SAAS,MAAM,IAEzB,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GACvF,CACC,aAAa,SAAS,OAAO,GACzB,KAAK,CAAC,aAAa,CAAC,SAAS,KAAK,GAChC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACrB,aAAa,SAAS,MAAM,GAC1B,SAAS,CAAC,aAAa,CAAC,SAAS,KAAK,GACpC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,GACnD,MAAM,CACb,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"languageOptions.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":""}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import Option from "./option/index.js";
|
2
2
|
import type Ts from "./ts.js";
|
3
|
-
export default class Svelte extends Option<"svelte",
|
3
|
+
export default class Svelte extends Option<"svelte", {
|
4
4
|
parser: unknown;
|
5
|
-
} & {
|
6
5
|
extraFileExtensions: readonly [
|
7
6
|
".svelte"
|
8
7
|
];
|
@@ -15,8 +14,6 @@ export default class Svelte extends Option<"svelte", "svelte" | keyof Ts["option
|
|
15
14
|
};
|
16
15
|
readonly language: {};
|
17
16
|
get languageOptions(): {
|
18
|
-
readonly ecmaVersion: "latest";
|
19
|
-
readonly sourceType: "module";
|
20
17
|
readonly parser: unknown;
|
21
18
|
readonly parserOptions: {
|
22
19
|
readonly parser: unknown;
|
@@ -24,8 +21,8 @@ export default class Svelte extends Option<"svelte", "svelte" | keyof Ts["option
|
|
24
21
|
".svelte"
|
25
22
|
];
|
26
23
|
readonly project: "tsconfig.json";
|
27
|
-
readonly ecmaVersion: "latest";
|
28
24
|
readonly sourceType: "module";
|
25
|
+
readonly ecmaVersion: 2023;
|
29
26
|
};
|
30
27
|
};
|
31
28
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MAAM,CACxC,QAAQ,EACR
|
1
|
+
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,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"}
|
@@ -6,15 +6,13 @@ export default class Svelte extends Option {
|
|
6
6
|
get languageOptions() {
|
7
7
|
const [parser, tsParser] = this.parser;
|
8
8
|
return {
|
9
|
-
ecmaVersion: "latest",
|
10
|
-
sourceType: "module",
|
11
9
|
parser,
|
12
10
|
parserOptions: {
|
13
11
|
parser: tsParser,
|
14
12
|
extraFileExtensions: [".svelte"],
|
15
13
|
project: "tsconfig.json",
|
16
|
-
ecmaVersion: "latest",
|
17
14
|
sourceType: "module",
|
15
|
+
ecmaVersion: 2023,
|
18
16
|
},
|
19
17
|
};
|
20
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,
|
1
|
+
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,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,19 +1,18 @@
|
|
1
1
|
import Option from "./option/index.js";
|
2
|
-
|
3
|
-
export default class Ts extends Option<"ts", "@typescript-eslint" | keyof Js["option"]["plugins"], true, {
|
2
|
+
export default class Ts extends Option<"ts", {
|
4
3
|
project: "tsconfig.json";
|
5
|
-
|
4
|
+
sourceType: "module";
|
5
|
+
ecmaVersion: 2023;
|
6
|
+
}, 1> {
|
6
7
|
readonly scope = "ts";
|
7
8
|
readonly processor: {};
|
8
9
|
readonly language: {};
|
9
10
|
get languageOptions(): {
|
10
|
-
readonly ecmaVersion: "latest";
|
11
|
-
readonly sourceType: "module";
|
12
11
|
readonly parser: unknown;
|
13
12
|
readonly parserOptions: {
|
14
13
|
readonly project: "tsconfig.json";
|
15
|
-
readonly ecmaVersion: "latest";
|
16
14
|
readonly sourceType: "module";
|
15
|
+
readonly ecmaVersion: 2023;
|
17
16
|
};
|
18
17
|
};
|
19
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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"}
|
@@ -6,10 +6,12 @@ export default class Ts extends Option {
|
|
6
6
|
get languageOptions() {
|
7
7
|
const [parser] = this.parser;
|
8
8
|
return {
|
9
|
-
ecmaVersion: "latest",
|
10
|
-
sourceType: "module",
|
11
9
|
parser,
|
12
|
-
parserOptions: {
|
10
|
+
parserOptions: {
|
11
|
+
project: "tsconfig.json",
|
12
|
+
sourceType: "module",
|
13
|
+
ecmaVersion: 2023,
|
14
|
+
},
|
13
15
|
};
|
14
16
|
}
|
15
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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 +1 @@
|
|
1
|
-
{"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAAM,CACrC,KAAK,EACL,
|
1
|
+
{"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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 +1 @@
|
|
1
|
-
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,
|
1
|
+
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAQ9B,MAAM,CAAC,OAAO,WAAW,KAAK,EAAE,KAAK,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAQ9B,MAAM,CAAC,OAAO,WAAW,KAAK,EAAE,KAAK,GAAG,MAAM,CAsE7C"}
|
package/dist/index.js
CHANGED
@@ -2,25 +2,39 @@ import { scopes } from "./scopes.js";
|
|
2
2
|
import { Factory, Options, } from "./factory/index.js";
|
3
3
|
export default function (input) {
|
4
4
|
try {
|
5
|
-
const {
|
5
|
+
const { plugins, parsers, files, rules, } = input, base = {
|
6
|
+
name: "linted",
|
7
|
+
plugins,
|
8
|
+
linterOptions: {
|
9
|
+
noInlineConfig: true,
|
10
|
+
reportUnusedDisableDirectives: "error",
|
11
|
+
},
|
12
|
+
languageOptions: {
|
13
|
+
sourceType: "module",
|
14
|
+
ecmaVersion: 2023,
|
15
|
+
},
|
16
|
+
}, factory = new Factory(files, rules), options = {
|
6
17
|
js: new Options
|
7
|
-
.js(
|
18
|
+
.js([], ...factory.produce("js")).configs,
|
8
19
|
ts: new Options
|
9
|
-
.ts(
|
20
|
+
.ts([parsers.ts], ...factory.produce("ts")).configs,
|
10
21
|
svelte: new Options
|
11
|
-
.svelte(
|
22
|
+
.svelte([parsers.svelte, parsers.ts], ...factory.produce("svelte")).configs,
|
12
23
|
mocha: new Options
|
13
|
-
.mocha(
|
24
|
+
.mocha([parsers.ts], ...factory.produce("mocha")).configs,
|
14
25
|
html: new Options
|
15
|
-
.html(
|
26
|
+
.html([parsers.html], ...factory.produce("html")).configs,
|
16
27
|
json: new Options
|
17
|
-
.json(
|
28
|
+
.json([parsers.jsonc], ...factory.produce("json")).configs,
|
18
29
|
jsonc: new Options
|
19
|
-
.jsonc(
|
30
|
+
.jsonc([parsers.jsonc], ...factory.produce("jsonc")).configs,
|
20
31
|
yml: new Options
|
21
|
-
.yml(
|
32
|
+
.yml([parsers.yml], ...factory.produce("yml")).configs,
|
22
33
|
};
|
23
|
-
return
|
34
|
+
return [
|
35
|
+
base,
|
36
|
+
...scopes.flatMap(scope => options[scope]),
|
37
|
+
];
|
24
38
|
}
|
25
39
|
catch (e) {
|
26
40
|
throw new Error(`Linted Core`, { cause: e });
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,OAAO,EACP,OAAO,GACR,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,OAAO,WAAW,KAAY;IACnC,IAAI,CAAC;QACH,MAAM,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,GACN,GAAG,KAAK,EACT,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,OAAO,EACP,OAAO,GACR,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,OAAO,WAAW,KAAY;IACnC,IAAI,CAAC;QACH,MAAM,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,GACN,GAAG,KAAK,EACT,IAAI,GAAG;YACL,IAAI,EAAE,QAAQ;YACd,OAAO;YACP,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,OAAO;aACvC;YACD,eAAe,EAAE;gBACf,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;SACO,EACV,OAAO,GAAG,IAAI,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EACnC,OAAO,GAAiF;YACtF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,EAAE,EACF,GAAG,OAAO,CAAC,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AAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
|
package/dist/output.d.ts
CHANGED
@@ -1,20 +1,30 @@
|
|
1
1
|
import type { Input } from "./index.js";
|
2
|
-
export type Output =
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
export type Output = [
|
3
|
+
{
|
4
|
+
name: `linted`;
|
5
|
+
plugins: Table<Record<"configs", unknown>>;
|
6
|
+
linterOptions: {
|
7
|
+
noInlineConfig: true;
|
8
|
+
reportUnusedDisableDirectives: "error";
|
9
|
+
};
|
10
|
+
languageOptions: {
|
11
|
+
sourceType?: "module" | "script";
|
12
|
+
ecmaVersion?: "latest" | 3 | 5 | ToNumber<`20${15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24}`>;
|
13
|
+
};
|
14
|
+
},
|
15
|
+
...({
|
16
|
+
name: `linted/${string}`;
|
17
|
+
rules: Input["rules"]["rules"]["html"][number][1];
|
18
|
+
files: string[];
|
19
|
+
languageOptions: {
|
20
|
+
sourceType?: "module" | "script";
|
21
|
+
ecmaVersion?: "latest" | 3 | 5 | ToNumber<`20${15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24}`>;
|
22
|
+
globals?: Table<true>;
|
23
|
+
parser?: unknown;
|
24
|
+
parserOptions?: Table;
|
25
|
+
};
|
26
|
+
processor?: string;
|
27
|
+
language?: string;
|
28
|
+
})[]
|
29
|
+
];
|
20
30
|
//# sourceMappingURL=output.d.ts.map
|
package/dist/output.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,MAAM,MAAM,MAAM,GAAG
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,MAAM,MAAM,MAAM,GAAG;IACnB;QACE,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;QAC3C,aAAa,EAAE;YACb,cAAc,EAAE,IAAI,CAAC;YACrB,6BAA6B,EAAE,OAAO,CAAC;SACxC,CAAC;QACF,eAAe,EAAE;YACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CACX;YACD,WAAW,CAAC,EACR,QAAQ,GACR,CAAC,GACD,CAAC,GACD,QAAQ,CAAC,KACT,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EACF,EAAE,CAAC,CAAC;SACP,CAAC;KACH;IACD,GAAG,CACD;QACE,IAAI,EAAE,UAAU,MAAM,EAAE,CAAC;QACzB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,eAAe,EAAE;YACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CACX;YACD,WAAW,CAAC,EACR,QAAQ,GACR,CAAC,GACD,CAAC,GACD,QAAQ,CAAC,KACT,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EACF,EAAE,CAAC,CAAC;YACN,OAAO,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACtB,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,aAAa,CAAC,EAAE,KAAK,CAAC;SACvB,CAAC;QACF,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CACF,EAAE;CACJ,CAAC"}
|
package/package.json
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
import Option from "./option";
|
2
2
|
|
3
|
-
export default class Js extends Option<
|
4
|
-
"js",
|
5
|
-
"@stylistic"
|
6
|
-
> {
|
3
|
+
export default class Js extends Option<"js"> {
|
7
4
|
public readonly scope = "js";
|
8
5
|
public readonly processor = {};
|
9
6
|
public readonly language = {};
|
10
7
|
|
11
8
|
public get languageOptions() {
|
12
|
-
return {
|
13
|
-
ecmaVersion: "latest",
|
14
|
-
sourceType: "module",
|
15
|
-
} as const;
|
9
|
+
return {};
|
16
10
|
}
|
17
11
|
}
|