@nest-boot/eslint-config 6.10.1 → 7.0.0-beta.0
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/CHANGELOG.md +19 -0
- package/index.d.ts +5 -0
- package/index.js +92 -48
- package/package.json +27 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @nest-boot/eslint-config
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 14895ac: ESLint 升级到 v9
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [14895ac]
|
|
12
|
+
- @nest-boot/eslint-plugin@7.0.0-beta.0
|
|
13
|
+
|
|
14
|
+
## 6.10.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- bcd62cb: fix: Update dependencies across multiple packages to latest versions.
|
|
19
|
+
- Updated dependencies [bcd62cb]
|
|
20
|
+
- @nest-boot/eslint-plugin@6.10.2
|
|
21
|
+
|
|
3
22
|
## 6.10.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1,49 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
const js = require("@eslint/js");
|
|
2
|
+
const tsParser = require("@typescript-eslint/parser");
|
|
3
|
+
const tseslint = require("typescript-eslint");
|
|
4
|
+
const nestBootPlugin = require("@nest-boot/eslint-plugin");
|
|
5
|
+
const simpleImportSort = require("eslint-plugin-simple-import-sort");
|
|
6
|
+
const prettierConfig = require("eslint-config-prettier");
|
|
7
|
+
const { FlatCompat } = require("@eslint/eslintrc");
|
|
8
|
+
|
|
9
|
+
const compat = new FlatCompat({
|
|
10
|
+
baseDirectory: __dirname,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
14
|
+
module.exports = [
|
|
15
|
+
js.configs.recommended,
|
|
16
|
+
|
|
17
|
+
// 使用 FlatCompat 包装 Standard 配置
|
|
18
|
+
...compat.extends("standard"),
|
|
19
|
+
|
|
20
|
+
// TypeScript 严格类型检查配置
|
|
21
|
+
...tseslint.configs.strictTypeChecked,
|
|
22
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
+
|
|
24
|
+
// TypeScript 和插件配置
|
|
25
|
+
{
|
|
26
|
+
files: ["**/*.{ts,tsx,js,jsx}"],
|
|
27
|
+
languageOptions: {
|
|
28
|
+
parser: tsParser,
|
|
29
|
+
parserOptions: {
|
|
30
|
+
sourceType: "module",
|
|
31
|
+
project: true,
|
|
32
|
+
},
|
|
33
|
+
globals: {
|
|
34
|
+
process: "readonly",
|
|
35
|
+
Buffer: "readonly",
|
|
36
|
+
__dirname: "readonly",
|
|
37
|
+
__filename: "readonly",
|
|
38
|
+
module: "readonly",
|
|
39
|
+
require: "readonly",
|
|
40
|
+
exports: "readonly",
|
|
41
|
+
global: "readonly",
|
|
42
|
+
console: "readonly",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
plugins: {
|
|
46
|
+
"@nest-boot": nestBootPlugin,
|
|
47
|
+
"simple-import-sort": simpleImportSort,
|
|
48
|
+
},
|
|
49
|
+
rules: {
|
|
50
|
+
// 基础规则
|
|
51
|
+
"no-void": "off",
|
|
52
|
+
"no-use-before-define": "off",
|
|
53
|
+
|
|
54
|
+
// 导入排序
|
|
55
|
+
"import/order": "off",
|
|
56
|
+
"simple-import-sort/imports": "error",
|
|
57
|
+
"simple-import-sort/exports": "error",
|
|
58
|
+
|
|
59
|
+
// 禁用 no-unused-expressions 和 @typescript-eslint/no-unused-expressions
|
|
60
|
+
"no-unused-expressions": "off",
|
|
61
|
+
"@typescript-eslint/no-unused-expressions": "off",
|
|
62
|
+
|
|
63
|
+
// TypeScript 规则
|
|
64
|
+
"@typescript-eslint/return-await": ["error", "always"],
|
|
65
|
+
"@typescript-eslint/restrict-plus-operands": "error",
|
|
66
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
67
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
68
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
69
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
70
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
71
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
72
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
73
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
74
|
+
"@typescript-eslint/no-empty-function": [
|
|
75
|
+
"error",
|
|
76
|
+
{ allow: ["constructors"] },
|
|
77
|
+
],
|
|
78
|
+
"@typescript-eslint/no-unused-vars": [
|
|
79
|
+
"error",
|
|
80
|
+
{ argsIgnorePattern: "^_" },
|
|
81
|
+
],
|
|
82
|
+
|
|
83
|
+
// NestBoot 自定义规则
|
|
84
|
+
"@nest-boot/entity-constructor": "error",
|
|
85
|
+
"@nest-boot/entity-property-no-optional-or-non-null-assertion": "error",
|
|
86
|
+
"@nest-boot/entity-property-nullable": "error",
|
|
87
|
+
"@nest-boot/graphql-field-arguments-match-property-type": "error",
|
|
88
|
+
"@nest-boot/graphql-resolver-method-return-type": "error",
|
|
89
|
+
},
|
|
48
90
|
},
|
|
49
|
-
|
|
91
|
+
|
|
92
|
+
prettierConfig,
|
|
93
|
+
];
|
package/package.json
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"types": "index.d.ts",
|
|
5
6
|
"license": "MIT",
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"@nest-boot/eslint-plugin": "^6.10.1",
|
|
8
|
-
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
9
|
-
"@typescript-eslint/parser": "^7.16.0",
|
|
10
|
-
"eslint": "^8.56.0",
|
|
11
|
-
"eslint-config-prettier": "^9.0.0",
|
|
12
|
-
"eslint-config-standard": "^17.1.0",
|
|
13
|
-
"eslint-plugin-import": "^2.28.1",
|
|
14
|
-
"eslint-plugin-n": "^17.9.0",
|
|
15
|
-
"eslint-plugin-promise": "^6.4.0",
|
|
16
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
17
|
-
"typescript": "^5.5.3"
|
|
18
|
-
},
|
|
19
7
|
"devDependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"eslint": "^
|
|
23
|
-
"eslint-
|
|
8
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
9
|
+
"@eslint/js": "^9.28.0",
|
|
10
|
+
"@nest-boot/eslint-plugin": "^7.0.0-beta.0",
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
12
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
13
|
+
"eslint": "^9.28.0",
|
|
14
|
+
"eslint-config-prettier": "^10.1.5",
|
|
24
15
|
"eslint-config-standard": "^17.1.0",
|
|
25
|
-
"eslint-plugin-import": "^2.
|
|
26
|
-
"eslint-plugin-n": "^
|
|
27
|
-
"eslint-plugin-promise": "^
|
|
28
|
-
"eslint-plugin-simple-import-sort": "^
|
|
29
|
-
"typescript": "^5.
|
|
16
|
+
"eslint-plugin-import": "^2.31.0",
|
|
17
|
+
"eslint-plugin-n": "^17.19.0",
|
|
18
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
19
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
20
|
+
"typescript": "^5.8.3",
|
|
21
|
+
"typescript-eslint": "^8.33.1"
|
|
30
22
|
},
|
|
31
23
|
"peerDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"eslint": "^8.0.0",
|
|
35
|
-
"eslint
|
|
24
|
+
"@eslint/eslintrc": "^3.0.0",
|
|
25
|
+
"@eslint/js": "^9.0.0",
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
27
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
28
|
+
"eslint": "^9.0.0",
|
|
29
|
+
"eslint-config-prettier": "^10.0.0",
|
|
36
30
|
"eslint-config-standard": "^17.0.0",
|
|
37
31
|
"eslint-plugin-import": "^2.0.0",
|
|
38
|
-
"eslint-plugin-n": "^
|
|
39
|
-
"eslint-plugin-promise": "^
|
|
40
|
-
"eslint-plugin-simple-import-sort": "^
|
|
41
|
-
"typescript": "^5.0.0"
|
|
32
|
+
"eslint-plugin-n": "^17.0.0",
|
|
33
|
+
"eslint-plugin-promise": "^7.0.0",
|
|
34
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
35
|
+
"typescript": "^5.0.0",
|
|
36
|
+
"typescript-eslint": "^8.0.0",
|
|
37
|
+
"@nest-boot/eslint-plugin": "^7.0.0-beta.07.0.0-beta.0"
|
|
42
38
|
},
|
|
43
39
|
"publishConfig": {
|
|
44
40
|
"access": "public"
|