@tb-dev/eslint-config 6.6.1 → 6.7.1
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/dist/index.cjs +25 -17
- package/dist/index.d.ts +5 -1
- package/dist/index.js +25 -17
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -911,24 +911,32 @@ async function typescript(options) {
|
|
|
911
911
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|
|
912
912
|
...options.overrides?.typescript
|
|
913
913
|
};
|
|
914
|
-
return
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
914
|
+
return [
|
|
915
|
+
{
|
|
916
|
+
files,
|
|
917
|
+
languageOptions: {
|
|
918
|
+
ecmaVersion: "latest",
|
|
919
|
+
sourceType: "module",
|
|
920
|
+
parser: tsParser,
|
|
921
|
+
parserOptions: {
|
|
922
|
+
project: options.project,
|
|
923
|
+
tsconfigRootDir: process.cwd(),
|
|
924
|
+
extraFileExtensions,
|
|
925
|
+
ecmaFeatures: {
|
|
926
|
+
jsx: isEnabled(options.features, "react")
|
|
927
|
+
}
|
|
926
928
|
}
|
|
927
|
-
}
|
|
929
|
+
},
|
|
930
|
+
plugins: { "@typescript-eslint": tsPlugin },
|
|
931
|
+
rules
|
|
928
932
|
},
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
933
|
+
{
|
|
934
|
+
files: options.moduleBoundaryTypesFiles ?? ["*.ts", "*.tsx"],
|
|
935
|
+
rules: {
|
|
936
|
+
"@typescript-eslint/explicit-module-boundary-types": "error"
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
];
|
|
932
940
|
}
|
|
933
941
|
|
|
934
942
|
async function reactHooks(options) {
|
|
@@ -1062,7 +1070,7 @@ async function defineConfig(options) {
|
|
|
1062
1070
|
};
|
|
1063
1071
|
const objects = await Promise.all([
|
|
1064
1072
|
javascript(options),
|
|
1065
|
-
typescript(options),
|
|
1073
|
+
...await typescript(options),
|
|
1066
1074
|
...await vue(options),
|
|
1067
1075
|
...await svelte(options),
|
|
1068
1076
|
...await react(options),
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
declare interface ConfigObject {
|
|
3
3
|
files: string[];
|
|
4
4
|
ignores?: Ignores['ignores'];
|
|
5
|
-
languageOptions
|
|
5
|
+
languageOptions?: {
|
|
6
6
|
ecmaVersion?: 'latest';
|
|
7
7
|
globals?: Record<string, boolean | 'readonly' | 'writeable'>;
|
|
8
8
|
parser?: unknown;
|
|
@@ -41,6 +41,10 @@ declare interface ConfigOptions {
|
|
|
41
41
|
* @see https://typescript-eslint.io/rules/no-floating-promises#allowforknownsafepromises
|
|
42
42
|
*/
|
|
43
43
|
knownSafePromises?: KnownSafePromise[];
|
|
44
|
+
/**
|
|
45
|
+
* @see https://typescript-eslint.io/rules/explicit-module-boundary-types#configuring-in-a-mixed-jsts-codebase
|
|
46
|
+
*/
|
|
47
|
+
moduleBoundaryTypesFiles?: string[];
|
|
44
48
|
/**
|
|
45
49
|
* @see https://github.com/jsx-eslint/eslint-plugin-react#configuration
|
|
46
50
|
*/
|
package/dist/index.js
CHANGED
|
@@ -907,24 +907,32 @@ async function typescript(options) {
|
|
|
907
907
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|
|
908
908
|
...options.overrides?.typescript
|
|
909
909
|
};
|
|
910
|
-
return
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
910
|
+
return [
|
|
911
|
+
{
|
|
912
|
+
files,
|
|
913
|
+
languageOptions: {
|
|
914
|
+
ecmaVersion: "latest",
|
|
915
|
+
sourceType: "module",
|
|
916
|
+
parser: tsParser,
|
|
917
|
+
parserOptions: {
|
|
918
|
+
project: options.project,
|
|
919
|
+
tsconfigRootDir: process.cwd(),
|
|
920
|
+
extraFileExtensions,
|
|
921
|
+
ecmaFeatures: {
|
|
922
|
+
jsx: isEnabled(options.features, "react")
|
|
923
|
+
}
|
|
922
924
|
}
|
|
923
|
-
}
|
|
925
|
+
},
|
|
926
|
+
plugins: { "@typescript-eslint": tsPlugin },
|
|
927
|
+
rules
|
|
924
928
|
},
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
929
|
+
{
|
|
930
|
+
files: options.moduleBoundaryTypesFiles ?? ["*.ts", "*.tsx"],
|
|
931
|
+
rules: {
|
|
932
|
+
"@typescript-eslint/explicit-module-boundary-types": "error"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
];
|
|
928
936
|
}
|
|
929
937
|
|
|
930
938
|
async function reactHooks(options) {
|
|
@@ -1058,7 +1066,7 @@ async function defineConfig(options) {
|
|
|
1058
1066
|
};
|
|
1059
1067
|
const objects = await Promise.all([
|
|
1060
1068
|
javascript(options),
|
|
1061
|
-
typescript(options),
|
|
1069
|
+
...await typescript(options),
|
|
1062
1070
|
...await vue(options),
|
|
1063
1071
|
...await svelte(options),
|
|
1064
1072
|
...await react(options),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.1",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"eslint-plugin-unicorn": "^57.0.0",
|
|
34
34
|
"eslint-plugin-vue": "^10.0.0",
|
|
35
35
|
"globals": "^16.0.0",
|
|
36
|
-
"svelte": "^5.
|
|
36
|
+
"svelte": "^5.25.2",
|
|
37
37
|
"svelte-eslint-parser": "^1.1.0",
|
|
38
38
|
"vue-eslint-parser": "^10.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "^22.13.
|
|
42
|
-
"eslint": "^9.
|
|
41
|
+
"@types/node": "^22.13.11",
|
|
42
|
+
"eslint": "^9.23.0",
|
|
43
43
|
"prettier": "^3.5.3",
|
|
44
44
|
"tslib": "^2.8.1",
|
|
45
45
|
"typescript": "^5.8.2",
|