@eslinted/core 13.3.0-rc.1 → 13.3.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/factory/index.d.ts +230 -2
- package/dist/factory/index.d.ts.map +1 -1
- package/dist/factory/index.js +65 -2
- package/dist/factory/index.js.map +1 -1
- package/dist/factory/scopes/html.d.ts +11 -0
- package/dist/factory/scopes/html.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/html.js +3 -5
- package/dist/factory/scopes/html.js.map +1 -0
- package/dist/factory/scopes/js.d.ts +9 -0
- package/dist/factory/scopes/js.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/js.js +3 -4
- package/dist/factory/scopes/js.js.map +1 -0
- package/dist/factory/scopes/json.d.ts +11 -0
- package/dist/factory/scopes/json.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/json.js +3 -5
- package/dist/factory/scopes/json.js.map +1 -0
- package/dist/factory/scopes/jsonc.d.ts +11 -0
- package/dist/factory/scopes/jsonc.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/jsonc.js +3 -5
- package/dist/factory/scopes/jsonc.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/mocha.d.ts +6 -4
- package/dist/factory/scopes/mocha.d.ts.map +1 -0
- package/dist/factory/scopes/mocha.js +19 -0
- package/dist/factory/scopes/mocha.js.map +1 -0
- package/dist/factory/{settings/setting.d.ts → scopes/setting/index.d.ts} +52 -39
- package/dist/factory/{settings/setting.d.ts.map → scopes/setting/index.d.ts.map} +1 -1
- package/dist/factory/{settings/setting.js → scopes/setting/index.js} +6 -7
- package/dist/factory/scopes/setting/index.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/svelte.d.ts +17 -13
- package/dist/factory/scopes/svelte.d.ts.map +1 -0
- package/dist/factory/scopes/svelte.js +19 -0
- package/dist/factory/scopes/svelte.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/ts.d.ts +11 -7
- package/dist/factory/scopes/ts.d.ts.map +1 -0
- package/dist/factory/scopes/ts.js +17 -0
- package/dist/factory/scopes/ts.js.map +1 -0
- package/dist/factory/scopes/yml.d.ts +11 -0
- package/dist/factory/scopes/yml.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/yml.js +3 -5
- package/dist/factory/scopes/yml.js.map +1 -0
- package/dist/factory/{settings/index.d.ts → settings.d.ts} +1 -2
- package/dist/factory/settings.d.ts.map +1 -0
- package/dist/factory/{settings/index.js → settings.js} +1 -1
- package/dist/factory/settings.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/factory/index.ts +104 -2
- package/src/factory/{settings/scopes → scopes}/html.ts +4 -9
- package/src/factory/scopes/js.ts +9 -0
- package/src/factory/{settings/scopes → scopes}/json.ts +4 -9
- package/src/factory/{settings/scopes → scopes}/jsonc.ts +4 -9
- package/src/factory/scopes/mocha.ts +24 -0
- package/src/factory/scopes/setting/index.ts +61 -0
- package/src/factory/scopes/svelte.ts +30 -0
- package/src/factory/scopes/ts.ts +27 -0
- package/src/factory/{settings/scopes → scopes}/yml.ts +4 -10
- package/src/factory/{settings/index.ts → settings.ts} +0 -1
- package/src/index.ts +3 -13
- package/dist/factory/factory.d.ts +0 -129
- package/dist/factory/factory.d.ts.map +0 -1
- package/dist/factory/factory.js +0 -46
- package/dist/factory/factory.js.map +0 -1
- package/dist/factory/settings/index.d.ts.map +0 -1
- package/dist/factory/settings/index.js.map +0 -1
- package/dist/factory/settings/scopes/html.d.ts +0 -10
- package/dist/factory/settings/scopes/html.d.ts.map +0 -1
- package/dist/factory/settings/scopes/html.js.map +0 -1
- package/dist/factory/settings/scopes/js.d.ts +0 -8
- package/dist/factory/settings/scopes/js.d.ts.map +0 -1
- package/dist/factory/settings/scopes/js.js.map +0 -1
- package/dist/factory/settings/scopes/json.d.ts +0 -10
- package/dist/factory/settings/scopes/json.d.ts.map +0 -1
- package/dist/factory/settings/scopes/json.js.map +0 -1
- package/dist/factory/settings/scopes/jsonc.d.ts +0 -10
- package/dist/factory/settings/scopes/jsonc.d.ts.map +0 -1
- package/dist/factory/settings/scopes/jsonc.js.map +0 -1
- package/dist/factory/settings/scopes/mocha.d.ts.map +0 -1
- package/dist/factory/settings/scopes/mocha.js +0 -20
- package/dist/factory/settings/scopes/mocha.js.map +0 -1
- package/dist/factory/settings/scopes/svelte.d.ts.map +0 -1
- package/dist/factory/settings/scopes/svelte.js +0 -20
- package/dist/factory/settings/scopes/svelte.js.map +0 -1
- package/dist/factory/settings/scopes/ts.d.ts.map +0 -1
- package/dist/factory/settings/scopes/ts.js +0 -18
- package/dist/factory/settings/scopes/ts.js.map +0 -1
- package/dist/factory/settings/scopes/yml.d.ts +0 -10
- package/dist/factory/settings/scopes/yml.d.ts.map +0 -1
- package/dist/factory/settings/scopes/yml.js.map +0 -1
- package/dist/factory/settings/setting.js.map +0 -1
- package/src/factory/factory.ts +0 -83
- package/src/factory/settings/scopes/js.ts +0 -11
- package/src/factory/settings/scopes/mocha.ts +0 -28
- package/src/factory/settings/scopes/svelte.ts +0 -32
- package/src/factory/settings/scopes/ts.ts +0 -28
- package/src/factory/settings/setting.ts +0 -65
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factory/scopes/setting/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,8BAAsB,YAAY,CAChC,MAAM,SAAS,MAAM,GAAG,KAAK,GAAG,KAAK,EACrC,aAAa,SAAS,MAAM,GAAG,MAAM,EACrC,MAAM,SAAS,MAAM,OAAO,OAAO,GAAG,KAAK,GAAG,KAAK,EACnD,SAAS,SAAS,MAAM,GAAG,MAAM,EACjC,QAAQ,SAAS,MAAM,GAAG,MAAM;IAEhC,kBAAyB,KAAK,EAAE,MAAM,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD"}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import globals from "globals";
|
2
2
|
export class ScopeSetting {
|
3
|
-
parser;
|
4
|
-
constructor(parser) {
|
5
|
-
this.parser = parser;
|
6
|
-
}
|
7
3
|
get option() {
|
8
|
-
const { languageOptions, processor, language } = this;
|
4
|
+
const { languageOptions, parserOptions, processor, language, } = this;
|
9
5
|
return {
|
10
|
-
languageOptions
|
6
|
+
languageOptions: {
|
7
|
+
...languageOptions,
|
8
|
+
...parserOptions,
|
9
|
+
},
|
11
10
|
...processor,
|
12
11
|
...language,
|
13
12
|
};
|
@@ -18,4 +17,4 @@ export class ScopeSetting {
|
|
18
17
|
return globals[global];
|
19
18
|
}
|
20
19
|
}
|
21
|
-
//# sourceMappingURL=
|
20
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/scopes/setting/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,MAAM,OAAgB,YAAY;IAoChC,IAAW,MAAM;QACf,MAAM,EACJ,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,GACpD,GAAG,IAAI,CAAC;QAET,OAAO;YACL,eAAe,EAAE;gBACf,GAAG,eAAe;gBAClB,GAAG,aAAa;aACjB;YACD,GAAG,SAAS;YACZ,GAAG,QAAQ;SACH,CAAC;IACb,CAAC;IAES,OAAO,CAAC,MAAqC;QACrD,IAAI,OAAO,MAAM,KAAK,SAAS;YAC7B,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC,CAAC;QAE5E,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;CACF"}
|
@@ -1,11 +1,13 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
2
|
import type TsSetting from "./ts.js";
|
3
|
-
export default class SvelteSetting extends ScopeSetting<"svelte", {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
export default class SvelteSetting extends ScopeSetting<"svelte" | "ts", TsSetting["parserOptions"] & {
|
4
|
+
parserOptions: {
|
5
|
+
readonly parser: "ts";
|
6
|
+
readonly extraFileExtensions: readonly [
|
7
|
+
".svelte"
|
8
|
+
];
|
9
|
+
};
|
10
|
+
}, false, {
|
9
11
|
readonly processor: "svelte/svelte";
|
10
12
|
}> {
|
11
13
|
readonly scope = "svelte";
|
@@ -13,17 +15,19 @@ export default class SvelteSetting extends ScopeSetting<"svelte", {
|
|
13
15
|
readonly processor: "svelte/svelte";
|
14
16
|
};
|
15
17
|
readonly language: {};
|
16
|
-
|
17
|
-
readonly parser: unknown;
|
18
|
+
readonly parserOptions: {
|
18
19
|
readonly parserOptions: {
|
19
|
-
readonly parser: unknown;
|
20
|
-
readonly extraFileExtensions: readonly [
|
21
|
-
".svelte"
|
22
|
-
];
|
23
20
|
readonly project: "tsconfig.json";
|
24
21
|
readonly sourceType: "module";
|
25
22
|
readonly ecmaVersion: 2023;
|
23
|
+
readonly parser: "ts";
|
24
|
+
readonly extraFileExtensions: readonly [
|
25
|
+
".svelte"
|
26
|
+
];
|
26
27
|
};
|
27
28
|
};
|
29
|
+
readonly languageOptions: {
|
30
|
+
readonly parser: "svelte";
|
31
|
+
};
|
28
32
|
}
|
29
33
|
//# sourceMappingURL=svelte.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/factory/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,MAAM,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY,CACrD,QAAQ,GAAG,IAAI,EACf,SAAS,CAAC,eAAe,CAAC,GAAG;IAC3B,aAAa,EAAE;QACb,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;QACtB,QAAQ,CAAC,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KACpD,CAAC;CACH,EACD,KAAK,EACL;IAAE,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;CAAE,CACxC;IACC,SAAgB,KAAK,YAAY;IACjC,SAAgB,SAAS;;MAA2C;IACpE,SAAgB,QAAQ,KAAe;IACvC,SAAgB,aAAa;;;;;;;;MAQlB;IACX,SAAgB,eAAe;;MAEpB;CACZ"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
|
+
export default class SvelteSetting extends ScopeSetting {
|
3
|
+
scope = "svelte";
|
4
|
+
processor = { processor: "svelte/svelte" };
|
5
|
+
language = {};
|
6
|
+
parserOptions = {
|
7
|
+
parserOptions: {
|
8
|
+
project: "tsconfig.json",
|
9
|
+
sourceType: "module",
|
10
|
+
ecmaVersion: 2023,
|
11
|
+
parser: "ts",
|
12
|
+
extraFileExtensions: [".svelte"],
|
13
|
+
},
|
14
|
+
};
|
15
|
+
languageOptions = {
|
16
|
+
parser: "svelte",
|
17
|
+
};
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=svelte.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/factory/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAU1C;IACiB,KAAK,GAAG,QAAQ,CAAC;IACjB,SAAS,GAAG,EAAE,SAAS,EAAE,eAAe,EAAW,CAAC;IACpD,QAAQ,GAAG,EAAW,CAAC;IACvB,aAAa,GAAG;QAC9B,aAAa,EAAE;YACb,OAAO,EAAE,eAAe;YACxB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,IAAI;YACZ,mBAAmB,EAAE,CAAC,SAAS,CAAU;SACjC;KACF,CAAC;IACK,eAAe,GAAG;QAChC,MAAM,EAAE,QAAQ;KACR,CAAC;CACZ"}
|
@@ -1,19 +1,23 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
2
|
export default class TsSetting extends ScopeSetting<"ts", {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
parserOptions: {
|
4
|
+
readonly project: "tsconfig.json";
|
5
|
+
readonly sourceType: "module";
|
6
|
+
readonly ecmaVersion: 2023;
|
7
|
+
};
|
8
|
+
}> {
|
7
9
|
readonly scope = "ts";
|
8
10
|
readonly processor: {};
|
9
11
|
readonly language: {};
|
10
|
-
|
11
|
-
readonly parser: unknown;
|
12
|
+
readonly parserOptions: {
|
12
13
|
readonly parserOptions: {
|
13
14
|
readonly project: "tsconfig.json";
|
14
15
|
readonly sourceType: "module";
|
15
16
|
readonly ecmaVersion: 2023;
|
16
17
|
};
|
17
18
|
};
|
19
|
+
readonly languageOptions: {
|
20
|
+
readonly parser: "ts";
|
21
|
+
};
|
18
22
|
}
|
19
23
|
//# sourceMappingURL=ts.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/factory/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,YAAY,CACjD,IAAI,EACJ;IACE,aAAa,EAAE;QACb,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;QAClC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;QAC9B,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC;KAC5B,CAAC;CACH,CACF;IACC,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAe;IACxC,SAAgB,QAAQ,KAAe;IACvC,SAAgB,aAAa;;;;;;MAMlB;IACX,SAAgB,eAAe;;MAGpB;CACZ"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
|
+
export default class TsSetting extends ScopeSetting {
|
3
|
+
scope = "ts";
|
4
|
+
processor = {};
|
5
|
+
language = {};
|
6
|
+
parserOptions = {
|
7
|
+
parserOptions: {
|
8
|
+
project: "tsconfig.json",
|
9
|
+
sourceType: "module",
|
10
|
+
ecmaVersion: 2023,
|
11
|
+
},
|
12
|
+
};
|
13
|
+
languageOptions = {
|
14
|
+
parser: "ts",
|
15
|
+
};
|
16
|
+
}
|
17
|
+
//# sourceMappingURL=ts.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/factory/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,YAStC;IACiB,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAW,CAAC;IACxB,QAAQ,GAAG,EAAW,CAAC;IACvB,aAAa,GAAG;QAC9B,aAAa,EAAE;YACb,OAAO,EAAE,eAAe;YACxB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,IAAI;SACT;KACF,CAAC;IACK,eAAe,GAAG;QAChC,MAAM,EAAE,IAAI;KAEJ,CAAC;CACZ"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
|
+
export default class YmlSetting extends ScopeSetting<"yml"> {
|
3
|
+
readonly scope = "yml";
|
4
|
+
readonly processor: {};
|
5
|
+
readonly language: {};
|
6
|
+
readonly parserOptions: {};
|
7
|
+
readonly languageOptions: {
|
8
|
+
readonly parser: "yml";
|
9
|
+
};
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=yml.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../src/factory/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY,CAClD,KAAK,CACN;IACC,SAAgB,KAAK,SAAS;IAC9B,SAAgB,SAAS,KAAe;IACxC,SAAgB,QAAQ,KAAe;IACvC,SAAgB,aAAa,KAAe;IAC5C,SAAgB,eAAe;;MAA8B;CAC9D"}
|
@@ -1,11 +1,9 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting/index.js";
|
2
2
|
export default class YmlSetting extends ScopeSetting {
|
3
3
|
scope = "yml";
|
4
4
|
processor = {};
|
5
5
|
language = {};
|
6
|
-
|
7
|
-
|
8
|
-
return { parser };
|
9
|
-
}
|
6
|
+
parserOptions = {};
|
7
|
+
languageOptions = { parser: "yml" };
|
10
8
|
}
|
11
9
|
//# sourceMappingURL=yml.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/factory/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAEvC;IACiB,KAAK,GAAG,KAAK,CAAC;IACd,SAAS,GAAG,EAAW,CAAC;IACxB,QAAQ,GAAG,EAAW,CAAC;IACvB,aAAa,GAAG,EAAW,CAAC;IAC5B,eAAe,GAAG,EAAE,MAAM,EAAE,KAAK,EAAW,CAAC;CAC9D"}
|
@@ -6,7 +6,6 @@ import html from "./scopes/html.js";
|
|
6
6
|
import json from "./scopes/json.js";
|
7
7
|
import jsonc from "./scopes/jsonc.js";
|
8
8
|
import yml from "./scopes/yml.js";
|
9
|
-
export type * from "./setting.js";
|
10
9
|
export declare const ScopeSettings: {
|
11
10
|
readonly js: typeof js;
|
12
11
|
readonly ts: typeof ts;
|
@@ -17,4 +16,4 @@ export declare const ScopeSettings: {
|
|
17
16
|
readonly jsonc: typeof jsonc;
|
18
17
|
readonly yml: typeof yml;
|
19
18
|
};
|
20
|
-
//# sourceMappingURL=
|
19
|
+
//# sourceMappingURL=settings.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/factory/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/factory/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE;IACF,EAAE;IACF,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;CACK,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIjD,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,UAAU,CAAC;AAC9B,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACX,EAAE,KAAK,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIjD,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,UAAU,CAAC;AAC9B,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACX,EAAE,KAAK,GAAG,MAAM,CAchB"}
|
package/dist/index.js
CHANGED
@@ -1,22 +1,13 @@
|
|
1
1
|
import { scopes } from "./scopes/index.js";
|
2
|
-
import { Factory
|
2
|
+
import { Factory } from "./factory/index.js";
|
3
3
|
export default function ({ imports: { plugins, parsers }, defaults, extensions, }) {
|
4
4
|
try {
|
5
|
-
const factory = new Factory(defaults, extensions)
|
6
|
-
js: new ScopeSettings.js([]),
|
7
|
-
ts: new ScopeSettings.ts([parsers.ts]),
|
8
|
-
svelte: new ScopeSettings.svelte([parsers.svelte, parsers.ts]),
|
9
|
-
mocha: new ScopeSettings.mocha([parsers.ts]),
|
10
|
-
html: new ScopeSettings.html([parsers.html]),
|
11
|
-
json: new ScopeSettings.json([parsers.jsonc]),
|
12
|
-
jsonc: new ScopeSettings.jsonc([parsers.jsonc]),
|
13
|
-
yml: new ScopeSettings.yml([parsers.yml]),
|
14
|
-
};
|
5
|
+
const factory = new Factory(parsers, defaults, extensions);
|
15
6
|
return [
|
16
7
|
{ name: `linted/*/plugins`, plugins },
|
17
8
|
factory.common.settings,
|
18
9
|
factory.common.ignores,
|
19
|
-
...scopes.flatMap(scope => factory.scope(scope
|
10
|
+
...scopes.flatMap(scope => factory.scope(scope)),
|
20
11
|
];
|
21
12
|
}
|
22
13
|
catch (e) {
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACJ;IACN,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAE3D,OAAO;YACL,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAW;YAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ;YACvB,OAAO,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxC,CAAC;IACb,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/src/factory/index.ts
CHANGED
@@ -1,2 +1,104 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { ScopeSettings } from "./settings";
|
2
|
+
import type { Input } from "../interface";
|
3
|
+
|
4
|
+
export class Factory {
|
5
|
+
public readonly common;
|
6
|
+
public readonly scopes;
|
7
|
+
|
8
|
+
constructor(
|
9
|
+
public readonly parsers: Input["imports"]["parsers"],
|
10
|
+
{
|
11
|
+
settings: defaultSettings,
|
12
|
+
files: defaultFiles,
|
13
|
+
ignores: defaultIgnores,
|
14
|
+
rules: defaultRules,
|
15
|
+
}: Input["defaults"],
|
16
|
+
{ "*": commonExtension = {}, ...scopeExtensions }: Input["extensions"] = {} as const,
|
17
|
+
) {
|
18
|
+
const {
|
19
|
+
noInlineConfig = defaultSettings.noInlineConfig,
|
20
|
+
reportUnusedDisableDirectives = defaultSettings.reportUnusedDisableDirectives,
|
21
|
+
sourceType = defaultSettings.sourceType,
|
22
|
+
ecmaVersion = defaultSettings.ecmaVersion,
|
23
|
+
ignores = [] as const,
|
24
|
+
override = false,
|
25
|
+
} = commonExtension;
|
26
|
+
|
27
|
+
this.common = {
|
28
|
+
settings: {
|
29
|
+
name: "linted/*/settings",
|
30
|
+
linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
|
31
|
+
languageOptions: { sourceType, ecmaVersion } as const,
|
32
|
+
} as const,
|
33
|
+
ignores: {
|
34
|
+
name: "linted/*/ignores",
|
35
|
+
ignores: [
|
36
|
+
...override ? [] as const : defaultIgnores["*"],
|
37
|
+
...ignores,
|
38
|
+
] as const,
|
39
|
+
} as const,
|
40
|
+
} as const;
|
41
|
+
this.scopes = {
|
42
|
+
files: defaultFiles,
|
43
|
+
ignores: defaultIgnores,
|
44
|
+
rules: defaultRules,
|
45
|
+
} as const;
|
46
|
+
|
47
|
+
for (const s in scopeExtensions) {
|
48
|
+
const {
|
49
|
+
[s as keyof typeof scopeExtensions]: {
|
50
|
+
files: moreFiles = [],
|
51
|
+
ignores: moreIgnores = [],
|
52
|
+
rules: moreRules = null,
|
53
|
+
} = {} as const,
|
54
|
+
} = scopeExtensions;
|
55
|
+
|
56
|
+
this.scopes.files[s as keyof typeof scopeExtensions].push(...moreFiles);
|
57
|
+
this.scopes.ignores[s as keyof typeof scopeExtensions].push(...moreIgnores);
|
58
|
+
|
59
|
+
if (moreRules !== null)
|
60
|
+
this.scopes.rules[s as keyof typeof scopeExtensions].push([`${s}:override`, moreRules]);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
public scope<S extends keyof typeof ScopeSettings>(scope: S) {
|
65
|
+
const {
|
66
|
+
files: {
|
67
|
+
[scope]: files,
|
68
|
+
},
|
69
|
+
ignores: { [scope]: ignores },
|
70
|
+
rules: { [scope]: rules },
|
71
|
+
} = this.scopes,
|
72
|
+
ruleset = rules.map(([id, rules]) => ({ id: `${scope}:${id}`, rules } as const)),
|
73
|
+
settings = new ScopeSettings[scope](),
|
74
|
+
{ languageOptions, parserOptions } = settings,
|
75
|
+
loadedLanguageOptions = {
|
76
|
+
...languageOptions,
|
77
|
+
..."parserOptions" in parserOptions
|
78
|
+
? {
|
79
|
+
parserOptions: {
|
80
|
+
...parserOptions.parserOptions,
|
81
|
+
..."parser" in parserOptions.parserOptions
|
82
|
+
? { parser: this.parsers[parserOptions.parserOptions.parser] } as const
|
83
|
+
: {} as const,
|
84
|
+
} as const,
|
85
|
+
} as const
|
86
|
+
: {} as const,
|
87
|
+
..."parser" in languageOptions
|
88
|
+
? { parser: this.parsers[languageOptions.parser] } as const
|
89
|
+
: {} as const,
|
90
|
+
} as const;
|
91
|
+
|
92
|
+
return files.length < 1
|
93
|
+
? [] as const
|
94
|
+
: ruleset.map(({ id, rules }) => ({
|
95
|
+
name: `linted/${id}`,
|
96
|
+
files,
|
97
|
+
ignores,
|
98
|
+
rules,
|
99
|
+
languageOptions: loadedLanguageOptions,
|
100
|
+
...settings.processor,
|
101
|
+
...settings.language,
|
102
|
+
} as const));
|
103
|
+
}
|
104
|
+
}
|
@@ -1,16 +1,11 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
2
|
|
3
3
|
export default class HtmlSetting extends ScopeSetting<
|
4
|
-
"html"
|
5
|
-
true
|
4
|
+
"html"
|
6
5
|
> {
|
7
6
|
public readonly scope = "html";
|
8
7
|
public readonly processor = {} as const;
|
9
8
|
public readonly language = {} as const;
|
10
|
-
|
11
|
-
public
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
9
|
+
public readonly parserOptions = {} as const;
|
10
|
+
public readonly languageOptions = { parser: "html" } as const;
|
16
11
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
|
+
|
3
|
+
export default class JsSetting extends ScopeSetting {
|
4
|
+
public readonly scope = "js";
|
5
|
+
public readonly processor = {} as const;
|
6
|
+
public readonly language = {} as const;
|
7
|
+
public readonly parserOptions = {} as const;
|
8
|
+
public readonly languageOptions = {} as const;
|
9
|
+
}
|
@@ -1,16 +1,11 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
2
|
|
3
3
|
export default class JsonSetting extends ScopeSetting<
|
4
|
-
"
|
5
|
-
true
|
4
|
+
"jsonc"
|
6
5
|
> {
|
7
6
|
public readonly scope = "json";
|
8
7
|
public readonly processor = {} as const;
|
9
8
|
public readonly language = {} as const;
|
10
|
-
|
11
|
-
public
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
9
|
+
public readonly parserOptions = {} as const;
|
10
|
+
public readonly languageOptions = { parser: "jsonc" } as const;
|
16
11
|
}
|
@@ -1,16 +1,11 @@
|
|
1
|
-
import { ScopeSetting } from "
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
2
|
|
3
3
|
export default class JsoncSetting extends ScopeSetting<
|
4
|
-
"jsonc"
|
5
|
-
true
|
4
|
+
"jsonc"
|
6
5
|
> {
|
7
6
|
public readonly scope = "jsonc";
|
8
7
|
public readonly processor = {} as const;
|
9
8
|
public readonly language = {} as const;
|
10
|
-
|
11
|
-
public
|
12
|
-
const [parser] = this.parser;
|
13
|
-
|
14
|
-
return { parser } as const;
|
15
|
-
}
|
9
|
+
public readonly parserOptions = {} as const;
|
10
|
+
public readonly languageOptions = { parser: "jsonc" } as const;
|
16
11
|
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
|
+
import type TsSetting from "./ts";
|
3
|
+
|
4
|
+
export default class MochaSetting extends ScopeSetting<
|
5
|
+
"ts",
|
6
|
+
TsSetting["parserOptions"],
|
7
|
+
"mocha"
|
8
|
+
> {
|
9
|
+
public readonly scope = "mocha";
|
10
|
+
public readonly processor = {} as const;
|
11
|
+
public readonly language = {} as const;
|
12
|
+
public readonly types = ["mocha"] as const;
|
13
|
+
public readonly parserOptions = {
|
14
|
+
parserOptions: {
|
15
|
+
project: "tsconfig.json",
|
16
|
+
sourceType: "module",
|
17
|
+
ecmaVersion: 2023,
|
18
|
+
} as const,
|
19
|
+
} as const;
|
20
|
+
public readonly languageOptions = {
|
21
|
+
parser: "ts",
|
22
|
+
globals: this.globals("mocha"),
|
23
|
+
} as const;
|
24
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import globals from "globals";
|
2
|
+
import type { Scopes } from "../../../scopes";
|
3
|
+
|
4
|
+
export abstract class ScopeSetting<
|
5
|
+
Parser extends Scopes | false = false,
|
6
|
+
ParserOptions extends object = object,
|
7
|
+
Global extends keyof typeof globals | false = false,
|
8
|
+
Processor extends object = object,
|
9
|
+
Language extends object = object,
|
10
|
+
> {
|
11
|
+
public abstract readonly scope: Scopes;
|
12
|
+
public abstract readonly processor: (Processor extends { readonly processor: infer P }
|
13
|
+
? string extends P
|
14
|
+
? Record<string, never>
|
15
|
+
: { readonly processor: P }
|
16
|
+
: Record<string, never>);
|
17
|
+
public abstract readonly language: (Language extends { readonly language: infer L }
|
18
|
+
? string extends L
|
19
|
+
? Record<string, never>
|
20
|
+
: { readonly language: L }
|
21
|
+
: Record<string, never>);
|
22
|
+
public abstract readonly parserOptions: (ParserOptions extends { readonly parserOptions: infer PO }
|
23
|
+
? PO extends { readonly parser: infer P }
|
24
|
+
? P extends Parser
|
25
|
+
? ParserOptions
|
26
|
+
: Record<string, never>
|
27
|
+
: ParserOptions
|
28
|
+
: Record<string, never>);
|
29
|
+
public abstract readonly languageOptions: (
|
30
|
+
[Parser] extends [boolean]
|
31
|
+
? { readonly parser?: never }
|
32
|
+
: { parser: Parser }
|
33
|
+
|
34
|
+
) & (
|
35
|
+
Global extends boolean
|
36
|
+
? { readonly globals?: never }
|
37
|
+
: { readonly globals: Readonly<Record<string, unknown>> }
|
38
|
+
);
|
39
|
+
|
40
|
+
public get option() {
|
41
|
+
const {
|
42
|
+
languageOptions, parserOptions, processor, language,
|
43
|
+
} = this;
|
44
|
+
|
45
|
+
return {
|
46
|
+
languageOptions: {
|
47
|
+
...languageOptions,
|
48
|
+
...parserOptions,
|
49
|
+
},
|
50
|
+
...processor,
|
51
|
+
...language,
|
52
|
+
} as const;
|
53
|
+
}
|
54
|
+
|
55
|
+
protected globals(global: Global & keyof typeof globals) {
|
56
|
+
if (typeof global === "boolean")
|
57
|
+
throw new TypeError("`global` must be a string key of `globals` package");
|
58
|
+
|
59
|
+
return globals[global];
|
60
|
+
}
|
61
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { ScopeSetting } from "./setting";
|
2
|
+
import type TsSetting from "./ts";
|
3
|
+
|
4
|
+
export default class SvelteSetting extends ScopeSetting<
|
5
|
+
"svelte" | "ts",
|
6
|
+
TsSetting["parserOptions"] & {
|
7
|
+
parserOptions: {
|
8
|
+
readonly parser: "ts";
|
9
|
+
readonly extraFileExtensions: readonly [".svelte"];
|
10
|
+
};
|
11
|
+
},
|
12
|
+
false,
|
13
|
+
{ readonly processor: "svelte/svelte" }
|
14
|
+
> {
|
15
|
+
public readonly scope = "svelte";
|
16
|
+
public readonly processor = { processor: "svelte/svelte" } as const;
|
17
|
+
public readonly language = {} as const;
|
18
|
+
public readonly parserOptions = {
|
19
|
+
parserOptions: {
|
20
|
+
project: "tsconfig.json",
|
21
|
+
sourceType: "module",
|
22
|
+
ecmaVersion: 2023,
|
23
|
+
parser: "ts",
|
24
|
+
extraFileExtensions: [".svelte"] as const,
|
25
|
+
} as const,
|
26
|
+
} as const;
|
27
|
+
public readonly languageOptions = {
|
28
|
+
parser: "svelte",
|
29
|
+
} as const;
|
30
|
+
}
|