@eslinted/core 2.1.1 → 2.2.0-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dependency/dependency.d.ts +2 -1
- package/dist/dependency/dependency.d.ts.map +1 -1
- package/dist/dependency/globals/index.d.ts +4 -0
- package/dist/dependency/globals/index.d.ts.map +1 -0
- package/dist/dependency/globals/index.js +2 -0
- package/dist/dependency/globals/index.js.map +1 -0
- package/dist/dependency/plugins/index.d.ts +1 -1
- package/dist/dependency/plugins/index.d.ts.map +1 -1
- package/dist/factory/options/Options.d.ts +2 -0
- package/dist/factory/options/Options.d.ts.map +1 -1
- package/dist/factory/options/Options.js +2 -0
- package/dist/factory/options/Options.js.map +1 -1
- package/dist/factory/options/option/Option.d.ts +2929 -1
- package/dist/factory/options/option/Option.d.ts.map +1 -1
- package/dist/factory/options/option/Option.js +9 -0
- package/dist/factory/options/option/Option.js.map +1 -1
- package/dist/factory/options/option/mocha/index.d.ts +40 -0
- package/dist/factory/options/option/mocha/index.d.ts.map +1 -0
- package/dist/factory/options/option/mocha/index.js +26 -0
- package/dist/factory/options/option/mocha/index.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/scopes/Scopes.d.ts +1 -1
- package/dist/scopes/Scopes.d.ts.map +1 -1
- package/dist/scopes/Scopes.js +1 -0
- package/dist/scopes/Scopes.js.map +1 -1
- package/package.json +5 -3
- package/src/boundary/output/config/option/language/IOLanguage.d.ts +1 -1
- package/src/dependency/dependency.ts +6 -1
- package/src/dependency/globals/index.ts +8 -0
- package/src/dependency/plugins/index.ts +1 -0
- package/src/factory/options/Options.ts +2 -0
- package/src/factory/options/option/Option.ts +14 -1
- package/src/factory/options/option/mocha/index.ts +40 -0
- package/src/index.ts +17 -1
- package/src/scopes/Scopes.ts +1 -0
- package/src/boundary/output/config/option/language/globals/IOLanguageGlobals.d.ts +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/Option.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,MAAM,CAClC,CAAC,SAAS,KAAK,EACf,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,OAAO,GAAG,IAAI,EAC7B,aAAa,SAAS,MAAM,GAAG,OAAO,GAAG,KAAK,EAC9C,WAAW,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EACjC,WAAW,SAAS,MAAM,GAAG,KAAK,
|
1
|
+
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/Option.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,MAAM,CAClC,CAAC,SAAS,KAAK,EACf,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,OAAO,GAAG,IAAI,EAC7B,aAAa,SAAS,MAAM,GAAG,OAAO,GAAG,KAAK,EAC9C,WAAW,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EACjC,WAAW,SAAS,MAAM,OAAO,OAAO,GAAG,KAAK,EAChD,SAAS,SAAS,MAAM,GAAG,KAAK;aAed,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import globals from "globals";
|
1
2
|
export default class Option {
|
2
3
|
files;
|
3
4
|
ruleset;
|
@@ -51,5 +52,13 @@ export default class Option {
|
|
51
52
|
throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e });
|
52
53
|
}
|
53
54
|
}
|
55
|
+
globals(type) {
|
56
|
+
try {
|
57
|
+
return globals[type];
|
58
|
+
}
|
59
|
+
catch (e) {
|
60
|
+
throw new Error(`linted.factory.Option/scope:${this.scope}: globals`, { cause: e });
|
61
|
+
}
|
62
|
+
}
|
54
63
|
}
|
55
64
|
//# sourceMappingURL=Option.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../src/factory/options/option/Option.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../src/factory/options/option/Option.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAM9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IAsBhB;IACA;IACA;IACA;IAhBD,aAAa,GAAG;QAC/B,cAAc,EAAE,IAAI;QACpB,6BAA6B,EAAE,OAAO;KAC9B,CAAC;IASX,YACkB,KAAwB,EACxB,OAAmB,EACnB,OAA4B,EAC5B,MAAmC;QAHnC,UAAK,GAAL,KAAK,CAAmB;QACxB,YAAO,GAAP,OAAO,CAAY;QACnB,YAAO,GAAP,OAAO,CAAqB;QAC5B,WAAM,GAAN,MAAM,CAA6B;IAClD,CAAC;IAEJ,IAAW,OAAO;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,GACP,GAAG,IAAI,CAAC;YAET,IAAI,OAAO,CAAC,EAAE,KAAK,KAAK;gBACtB,MAAM,IAAI,SAAS,CACjB,mCAAmC,EACnC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,CAClD,CAAC;iBACC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBACvB,OAAO,EAAE,CAAC;iBACP,CAAC;gBACJ,MAAM,QAAQ,GAAG,gBAAgB,KAAK,SAAS,OAAO,CAAC,EAAE,EAAW,CAAC;gBAErE,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CACxB,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE;oBAClB,MAAM,IAAI,GAAG,GAAG,QAAQ,IAAI,MAAM,EAAW,CAAC;oBAE9C,OAAO;wBACL,IAAI;wBACJ,KAAK;wBACL,KAAK;wBACL,GAAG,MAAM;qBACV,CAAC;gBACJ,CAAC,CACF,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,CAAC,KAAK,WAAW,EACpD,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,SAAS,GACV,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,aAAa;gBACb,eAAe;gBACf,OAAO;gBACP,GAAG,SAAS;aAOb,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,CAAC,KAAK,UAAU,EACnD,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAQS,OAAO,CAAC,IAAiB;QACjC,IAAI,CAAC;YACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,CAAC,KAAK,WAAW,EACpD,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import Option from "../Option.js";
|
2
|
+
import type Ts from "../ts/index.js";
|
3
|
+
export default class Mocha extends Option<"mocha", "mocha" | keyof Ts["option"]["plugins"], true, Ts["option"]["languageOptions"]["parserOptions"], 1, "mocha"> {
|
4
|
+
readonly scope = "mocha";
|
5
|
+
readonly processor: {};
|
6
|
+
readonly types: readonly ["mocha"];
|
7
|
+
get languageOptions(): {
|
8
|
+
readonly ecmaVersion: "latest";
|
9
|
+
readonly sourceType: "module";
|
10
|
+
readonly parser: unknown;
|
11
|
+
readonly parserOptions: {
|
12
|
+
readonly ecmaVersion: "latest";
|
13
|
+
readonly sourceType: "module";
|
14
|
+
readonly project: "tsconfig.json";
|
15
|
+
};
|
16
|
+
readonly globals: {
|
17
|
+
readonly after: false;
|
18
|
+
readonly afterEach: false;
|
19
|
+
readonly before: false;
|
20
|
+
readonly beforeEach: false;
|
21
|
+
readonly context: false;
|
22
|
+
readonly describe: false;
|
23
|
+
readonly it: false;
|
24
|
+
readonly mocha: false;
|
25
|
+
readonly run: false;
|
26
|
+
readonly setup: false;
|
27
|
+
readonly specify: false;
|
28
|
+
readonly suite: false;
|
29
|
+
readonly suiteSetup: false;
|
30
|
+
readonly suiteTeardown: false;
|
31
|
+
readonly teardown: false;
|
32
|
+
readonly test: false;
|
33
|
+
readonly xcontext: false;
|
34
|
+
readonly xdescribe: false;
|
35
|
+
readonly xit: false;
|
36
|
+
readonly xspecify: false;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
}
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/mocha/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EACvC,IAAI,EACF,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EAClD,CAAC,EACD,OAAO,CACR;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAe;IACxC,SAAgB,KAAK,qBAAsB;IAE3C,IAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBzB;CACF"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import Option from "../Option.js";
|
2
|
+
export default class Mocha extends Option {
|
3
|
+
scope = "mocha";
|
4
|
+
processor = {};
|
5
|
+
types = ["mocha"];
|
6
|
+
get languageOptions() {
|
7
|
+
try {
|
8
|
+
const [parser] = this.parser, globals = this.globals("mocha");
|
9
|
+
return {
|
10
|
+
ecmaVersion: "latest",
|
11
|
+
sourceType: "module",
|
12
|
+
parser,
|
13
|
+
parserOptions: {
|
14
|
+
ecmaVersion: "latest",
|
15
|
+
sourceType: "module",
|
16
|
+
project: "tsconfig.json",
|
17
|
+
},
|
18
|
+
globals,
|
19
|
+
};
|
20
|
+
}
|
21
|
+
catch (e) {
|
22
|
+
throw new Error(`linted.factory.options.mocha: languageOptions`, { cause: e });
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/mocha/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAOlC;IACiB,KAAK,GAAG,OAAO,CAAC;IAChB,SAAS,GAAG,EAAW,CAAC;IACxB,KAAK,GAAG,CAAC,OAAO,CAAU,CAAC;IAE3C,IAAW,eAAe;QACxB,IAAI,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAC5B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAEhC,OAAO;gBACL,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,MAAM;gBACN,aAAa,EAAE;oBACb,WAAW,EAAE,QAAQ;oBACrB,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,eAAe;iBACzB;gBACD,OAAO;aACC,CAAC;QACb,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,+CAA+C,EAC/C,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +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AC;CAC3C,GACA,QAAQ,CAAC,MAAM,EAAE,CAqKnB"}
|
package/dist/index.js
CHANGED
@@ -6,6 +6,7 @@ export default function (plugins, parsers, files, rules) {
|
|
6
6
|
js: new Ruleset("js", ...rules.preset.js.map(args => new Rule(...args))),
|
7
7
|
ts: new Ruleset("ts", ...rules.preset.ts.map(args => new Rule(...args))),
|
8
8
|
svelte: new Ruleset("svelte", ...rules.preset.svelte.map(args => new Rule(...args))),
|
9
|
+
mocha: new Ruleset("mocha", ...rules.preset.mocha.map(args => new Rule(...args))),
|
9
10
|
html: new Ruleset("html", ...rules.preset.html.map(args => new Rule(...args))),
|
10
11
|
json: new Ruleset("json", ...rules.preset.json.map(args => new Rule(...args))),
|
11
12
|
jsonc: new Ruleset("jsonc", ...rules.preset.jsonc.map(args => new Rule(...args))),
|
@@ -15,6 +16,7 @@ export default function (plugins, parsers, files, rules) {
|
|
15
16
|
js: [],
|
16
17
|
ts: [parsers.ts],
|
17
18
|
svelte: [parsers.svelte, parsers.ts],
|
19
|
+
mocha: [parsers.ts],
|
18
20
|
html: [parsers.html],
|
19
21
|
json: [parsers.jsonc],
|
20
22
|
jsonc: [parsers.jsonc],
|
@@ -42,6 +44,13 @@ export default function (plugins, parsers, files, rules) {
|
|
42
44
|
svelte: plugins.svelte,
|
43
45
|
}, scopedParsers.svelte)
|
44
46
|
.configs,
|
47
|
+
mocha: new Options
|
48
|
+
.mocha(f.files("mocha"), rulesets.mocha, {
|
49
|
+
"@stylistic": plugins["@stylistic"],
|
50
|
+
"@typescript-eslint": plugins["@typescript-eslint"],
|
51
|
+
mocha: plugins.mocha,
|
52
|
+
}, scopedParsers.mocha)
|
53
|
+
.configs,
|
45
54
|
html: new Options
|
46
55
|
.html(f.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html)
|
47
56
|
.configs,
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index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QAEF,OAAO,MAAM;aACV,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aAC5B,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,aAAa,EACb,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/scopes/Scopes.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
declare const scopes: readonly ["js", "ts", "svelte", "html", "json", "jsonc", "yml", "md"];
|
1
|
+
declare const scopes: readonly ["js", "ts", "svelte", "mocha", "html", "json", "jsonc", "yml", "md"];
|
2
2
|
export default scopes;
|
3
3
|
export type Scope = (typeof scopes)[number];
|
4
4
|
//# sourceMappingURL=Scopes.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Scopes.d.ts","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"Scopes.d.ts","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,gFAUF,CAAC;AAEX,eAAe,MAAM,CAAC;AACtB,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/scopes/Scopes.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Scopes.js","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,IAAI;CACI,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
1
|
+
{"version":3,"file":"Scopes.js","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,IAAI;CACI,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_schemaVersion": "20.13.0",
|
3
3
|
"name": "@eslinted/core",
|
4
|
-
"version": "2.
|
4
|
+
"version": "2.2.0-rc.2",
|
5
5
|
"description": "Core ESLint flat config factory npm package `linted`.",
|
6
6
|
"keywords": [],
|
7
7
|
"license": "MIT",
|
@@ -23,10 +23,12 @@
|
|
23
23
|
"peerDependencies": {},
|
24
24
|
"peerDependenciesMeta": {},
|
25
25
|
"optionalDependencies": {},
|
26
|
-
"dependencies": {
|
26
|
+
"dependencies": {
|
27
|
+
"globals": "^15.8.0"
|
28
|
+
},
|
27
29
|
"devDependencies": {
|
28
30
|
"eslint": "~8.57.0",
|
29
|
-
"linted": "~15.5.
|
31
|
+
"linted": "~15.5.1",
|
30
32
|
"npm-run-all": "^4.1.5",
|
31
33
|
"typescript": "^5.5.4"
|
32
34
|
},
|
@@ -4,7 +4,7 @@ declare type IOLanguage<
|
|
4
4
|
GlobalTypes extends string,
|
5
5
|
> =
|
6
6
|
& (True<IsEcma> extends never ? object : { ecmaVersion: IOLanguageEcma; sourceType: IOLanguageSource })
|
7
|
-
& (literalful<GlobalTypes> extends never ? object : { globals:
|
7
|
+
& (literalful<GlobalTypes> extends never ? object : { globals: Record<string, unknown> })
|
8
8
|
& (
|
9
9
|
ParserOptions extends boolean
|
10
10
|
? True<ParserOptions> extends never
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import js from "./option/js/index.js";
|
2
2
|
import ts from "./option/ts/index.js";
|
3
3
|
import svelte from "./option/svelte/index.js";
|
4
|
+
import mocha from "./option/mocha/index.js";
|
4
5
|
import html from "./option/html/index.js";
|
5
6
|
import json from "./option/json/index.js";
|
6
7
|
import jsonc from "./option/jsonc/index.js";
|
@@ -11,6 +12,7 @@ export default {
|
|
11
12
|
js,
|
12
13
|
ts,
|
13
14
|
svelte,
|
15
|
+
mocha,
|
14
16
|
html,
|
15
17
|
json,
|
16
18
|
jsonc,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import globals from "globals";
|
1
2
|
import type { Scope } from "../../../scopes/Scopes.js";
|
2
3
|
import type { Ruleset } from "../../factory.js";
|
3
4
|
import type { Plugins } from "../../../dependency/dependency.js";
|
@@ -9,7 +10,7 @@ export default abstract class Option<
|
|
9
10
|
IsEcma extends boolean = true,
|
10
11
|
ParserOptions extends object | boolean = false,
|
11
12
|
ParserCount extends 0 | 1 | 2 = 0,
|
12
|
-
GlobalTypes extends
|
13
|
+
GlobalTypes extends keyof typeof globals = never,
|
13
14
|
Processor extends object = never,
|
14
15
|
> {
|
15
16
|
private readonly linterOptions = {
|
@@ -107,4 +108,16 @@ export default abstract class Option<
|
|
107
108
|
ParserOptions,
|
108
109
|
GlobalTypes
|
109
110
|
>;
|
111
|
+
|
112
|
+
protected globals(type: GlobalTypes) {
|
113
|
+
try {
|
114
|
+
return globals[type];
|
115
|
+
}
|
116
|
+
catch (e) {
|
117
|
+
throw new Error(
|
118
|
+
`linted.factory.Option/scope:${this.scope}: globals`,
|
119
|
+
{ cause: e },
|
120
|
+
);
|
121
|
+
}
|
122
|
+
}
|
110
123
|
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import Option from "../Option.js";
|
2
|
+
import type Ts from "../ts/index.js";
|
3
|
+
|
4
|
+
export default class Mocha extends Option<
|
5
|
+
"mocha",
|
6
|
+
"mocha" | keyof Ts["option"]["plugins"],
|
7
|
+
true,
|
8
|
+
& Ts["option"]["languageOptions"]["parserOptions"],
|
9
|
+
1,
|
10
|
+
"mocha"
|
11
|
+
> {
|
12
|
+
public readonly scope = "mocha";
|
13
|
+
public readonly processor = {} as const;
|
14
|
+
public readonly types = ["mocha"] as const;
|
15
|
+
|
16
|
+
public get languageOptions() {
|
17
|
+
try {
|
18
|
+
const [parser] = this.parser,
|
19
|
+
globals = this.globals("mocha");
|
20
|
+
|
21
|
+
return {
|
22
|
+
ecmaVersion: "latest",
|
23
|
+
sourceType: "module",
|
24
|
+
parser,
|
25
|
+
parserOptions: {
|
26
|
+
ecmaVersion: "latest",
|
27
|
+
sourceType: "module",
|
28
|
+
project: "tsconfig.json",
|
29
|
+
},
|
30
|
+
globals,
|
31
|
+
} as const;
|
32
|
+
}
|
33
|
+
catch (e) {
|
34
|
+
throw new Error(
|
35
|
+
`linted.factory.options.mocha: languageOptions`,
|
36
|
+
{ cause: e },
|
37
|
+
);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
package/src/index.ts
CHANGED
@@ -38,6 +38,10 @@ export default function (
|
|
38
38
|
"svelte",
|
39
39
|
...rules.preset.svelte.map(args => new Rule(...args)),
|
40
40
|
),
|
41
|
+
mocha: new Ruleset(
|
42
|
+
"mocha",
|
43
|
+
...rules.preset.mocha.map(args => new Rule(...args)),
|
44
|
+
),
|
41
45
|
html: new Ruleset(
|
42
46
|
"html",
|
43
47
|
...rules.preset.html.map(args => new Rule(...args)),
|
@@ -65,6 +69,7 @@ export default function (
|
|
65
69
|
js: [] as const,
|
66
70
|
ts: [parsers.ts] as const,
|
67
71
|
svelte: [parsers.svelte, parsers.ts] as const,
|
72
|
+
mocha: [parsers.ts] as const,
|
68
73
|
html: [parsers.html] as const,
|
69
74
|
json: [parsers.jsonc] as const,
|
70
75
|
jsonc: [parsers.jsonc] as const,
|
@@ -113,6 +118,18 @@ export default function (
|
|
113
118
|
scopedParsers.svelte,
|
114
119
|
)
|
115
120
|
.configs,
|
121
|
+
mocha: new Options
|
122
|
+
.mocha(
|
123
|
+
f.files("mocha"),
|
124
|
+
rulesets.mocha,
|
125
|
+
{
|
126
|
+
"@stylistic": plugins["@stylistic"],
|
127
|
+
"@typescript-eslint": plugins["@typescript-eslint"],
|
128
|
+
mocha: plugins.mocha,
|
129
|
+
},
|
130
|
+
scopedParsers.mocha,
|
131
|
+
)
|
132
|
+
.configs,
|
116
133
|
html: new Options
|
117
134
|
.html(
|
118
135
|
f.files("html"),
|
@@ -155,7 +172,6 @@ export default function (
|
|
155
172
|
scopedParsers.md,
|
156
173
|
)
|
157
174
|
.configs,
|
158
|
-
|
159
175
|
};
|
160
176
|
|
161
177
|
return scopes
|
package/src/scopes/Scopes.ts
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
declare type IOLanguageGlobals<GlobalTypes extends string> = Record<GlobalTypes, true>;
|