@html-validate/eslint-config-typescript 9.16.3 → 9.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.mts +1 -1
- package/index.mjs +27 -1
- package/package.json +3 -3
package/index.d.mts
CHANGED
package/index.mjs
CHANGED
|
@@ -14,6 +14,19 @@ function defineConfig(config) {
|
|
|
14
14
|
return config;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @param {Config} a
|
|
19
|
+
* @param {Config} b
|
|
20
|
+
* @returns {Config}
|
|
21
|
+
*/
|
|
22
|
+
function merge(a, b) {
|
|
23
|
+
return {
|
|
24
|
+
...a,
|
|
25
|
+
...b,
|
|
26
|
+
rules: { ...a.rules, ...b.rules },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
function flatten(result, it) {
|
|
18
31
|
return {
|
|
19
32
|
...result,
|
|
@@ -42,18 +55,24 @@ const stylistic = tseConfig.stylistic.reduce(flatten, {});
|
|
|
42
55
|
/** @type {Config} */
|
|
43
56
|
const importConfig = importX.flatConfigs.typescript;
|
|
44
57
|
|
|
45
|
-
|
|
58
|
+
const defaultConfig = defineConfig({
|
|
59
|
+
name: "@html-validate/eslint-config-typescript",
|
|
60
|
+
files: ["**/*.{ts,cts,mts}"],
|
|
61
|
+
|
|
46
62
|
languageOptions: {
|
|
47
63
|
parser: tseParser,
|
|
48
64
|
sourceType: "module",
|
|
49
65
|
},
|
|
66
|
+
|
|
50
67
|
plugins: {
|
|
51
68
|
"@typescript-eslint": tsePlugin,
|
|
52
69
|
tsdoc: tsdocPlugin,
|
|
53
70
|
},
|
|
71
|
+
|
|
54
72
|
settings: {
|
|
55
73
|
...importConfig.settings,
|
|
56
74
|
},
|
|
75
|
+
|
|
57
76
|
rules: {
|
|
58
77
|
...strict.rules,
|
|
59
78
|
...stylistic.rules,
|
|
@@ -133,3 +152,10 @@ export default defineConfig({
|
|
|
133
152
|
"off" /* @typescript-eslint/prefer-string-starts-ends-with */,
|
|
134
153
|
},
|
|
135
154
|
});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param {Config} [override]
|
|
158
|
+
* @returns {Config}
|
|
159
|
+
*/
|
|
160
|
+
const config = (override) => merge(defaultConfig, override ?? {});
|
|
161
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-validate/eslint-config-typescript",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.17.4",
|
|
4
4
|
"description": "Eslint sharable config used by the various HTML-validate packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"eslint-plugin-import-x": "4.17.1",
|
|
33
33
|
"eslint-plugin-tsdoc": "0.5.2",
|
|
34
|
-
"typescript-eslint": "8.
|
|
34
|
+
"typescript-eslint": "8.67.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"eslint": "^10.0.0"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "abac9ab214ebca1aadf70fecdc7ae3f9d5c636f0"
|
|
47
47
|
}
|