Skip to content

Commit 2d571bb

Browse files
authored
Merge pull request #7 from ttionya/feature/update
update dependencies (close #5)
2 parents 680edb5 + 76c1c8f commit 2d571bb

File tree

14 files changed

+155
-126
lines changed

14 files changed

+155
-126
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@swc/core": "^1.3.0",
3636
"@ttionya/prettier-config": "workspace:*",
3737
"@types/mocha": "^10.0.0",
38-
"eslint": "^8.25.0",
38+
"eslint": "^8.26.0",
3939
"husky": "^8.0.0",
4040
"lint-staged": "^13.0.0",
4141
"mocha": "^10.0.0",

packages/eslint-config/dist/manifest.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@
375375
"@typescript-eslint/no-unnecessary-condition",
376376
"@typescript-eslint/no-unnecessary-qualifier",
377377
"@typescript-eslint/no-unnecessary-type-arguments",
378+
"@typescript-eslint/no-unsafe-declaration-merging",
378379
"@typescript-eslint/no-unused-expressions",
379380
"@typescript-eslint/no-use-before-define",
380381
"@typescript-eslint/no-useless-constructor",
@@ -399,7 +400,7 @@
399400
"@typescript-eslint/promise-function-async",
400401
"@typescript-eslint/require-array-sort-compare",
401402
"@typescript-eslint/return-await",
402-
"@typescript-eslint/sort-type-union-intersection-members",
403+
"@typescript-eslint/sort-type-constituents",
403404
"@typescript-eslint/strict-boolean-expressions",
404405
"@typescript-eslint/switch-exhaustiveness-check",
405406
"@typescript-eslint/typedef",

packages/eslint-config/dist/typescript.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,13 @@ module.exports = {
575575
*/
576576
'@typescript-eslint/no-unsafe-call': 'off',
577577

578+
/**
579+
* 禁止 interface 和 class 的声明合并
580+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-declaration-merging/}
581+
* @category TypeScript
582+
*/
583+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
584+
578585
/**
579586
* 禁止获取 any 类型的变量中的属性
580587
* @see {@link https://typescript-eslint.io/rules/no-unsafe-member-access/}
@@ -819,11 +826,11 @@ module.exports = {
819826

820827
/**
821828
* 联合类型和交叉类型的每一项必须按字母排序
822-
* @see {@link https://typescript-eslint.io/rules/sort-type-union-intersection-members/}
829+
* @see {@link https://typescript-eslint.io/rules/sort-type-constituents/}
823830
* @category TypeScript
824831
* @fixable
825832
*/
826-
'@typescript-eslint/sort-type-union-intersection-members': 'off',
833+
'@typescript-eslint/sort-type-constituents': 'off',
827834

828835
/**
829836
* 条件判断必须传入布尔值

packages/eslint-config/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"@types/prettier": "^2.7.1",
5151
"@types/rimraf": "^3.0.2",
5252
"@types/yargs-parser": "^21.0.0",
53-
"@typescript-eslint/eslint-plugin": "^5.38.0",
54-
"@typescript-eslint/parser": "^5.40.0",
53+
"@typescript-eslint/eslint-plugin": "^5.42.0",
54+
"@typescript-eslint/parser": "^5.42.0",
5555
"chai": "^4.3.0",
5656
"chalk": "^4.0.0",
5757
"eslint-config-prettier": "^8.5.0",
@@ -64,13 +64,13 @@
6464
"yargs-parser": "^21.1.0"
6565
},
6666
"dependencies": {
67-
"eslint": "^8.25.0"
67+
"eslint": "^8.26.0"
6868
},
6969
"peerDependencies": {
7070
"@babel/core": ">=7.18.0",
7171
"@babel/eslint-parser": ">=7.18.0",
72-
"@typescript-eslint/eslint-plugin": "*",
73-
"@typescript-eslint/parser": "*",
72+
"@typescript-eslint/eslint-plugin": ">=5.42.0",
73+
"@typescript-eslint/parser": ">=5.42.0",
7474
"typescript": "4.x"
7575
},
7676
"peerDependenciesMeta": {

packages/eslint-config/tests/typescript/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module.exports = {
5454
'no-unsafe-argument': require('./no-unsafe-argument/.eslintrc.js'),
5555
'no-unsafe-assignment': require('./no-unsafe-assignment/.eslintrc.js'),
5656
'no-unsafe-call': require('./no-unsafe-call/.eslintrc.js'),
57+
'no-unsafe-declaration-merging': require('./no-unsafe-declaration-merging/.eslintrc.js'),
5758
'no-unsafe-member-access': require('./no-unsafe-member-access/.eslintrc.js'),
5859
'no-unsafe-return': require('./no-unsafe-return/.eslintrc.js'),
5960
'no-unused-expressions': require('./no-unused-expressions/.eslintrc.js'),
@@ -80,7 +81,7 @@ module.exports = {
8081
'promise-function-async': require('./promise-function-async/.eslintrc.js'),
8182
'require-array-sort-compare': require('./require-array-sort-compare/.eslintrc.js'),
8283
'return-await': require('./return-await/.eslintrc.js'),
83-
'sort-type-union-intersection-members': require('./sort-type-union-intersection-members/.eslintrc.js'),
84+
'sort-type-constituents': require('./sort-type-constituents/.eslintrc.js'),
8485
'strict-boolean-expressions': require('./strict-boolean-expressions/.eslintrc.js'),
8586
'switch-exhaustiveness-check': require('./switch-exhaustiveness-check/.eslintrc.js'),
8687
'triple-slash-reference': require('./triple-slash-reference/.eslintrc.js'),

packages/eslint-config/tests/typescript/no-invalid-void-type/bad.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
/* eslint-disable */
22
/* eslint-enable @typescript-eslint/no-invalid-void-type */
33

4-
// errorCount 7
4+
// errorCount 6
55

66
export default 1
77

88
type PossibleValues = string | number | void
99
type MorePossibleValues = string | ((number & any) | (string | void))
1010

1111
function logSomething(thing: void) {}
12-
function printArg<T = void>(arg: T) {}
1312

1413
logSomething<void>(undefined)
1514

packages/eslint-config/tests/typescript/no-invalid-void-type/good.ts

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ let trulyUndefined = void 0
1212
async function promiseMeSomething(): Promise<void> {}
1313

1414
type stillVoid = void | never
15+
16+
function printArg<T = void>(arg: T) {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
rules: {
3+
/**
4+
* 禁止 interface 和 class 的声明合并
5+
* @see {@link https://typescript-eslint.io/rules/no-unsafe-declaration-merging/}
6+
* @category TypeScript
7+
*/
8+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
9+
},
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* eslint-disable */
2+
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
3+
4+
// errorCount 2
5+
6+
interface Foo {}
7+
8+
class Foo {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-disable */
2+
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
3+
4+
interface Foo {}
5+
class Bar implements Foo {}
6+
7+
namespace Baz {}
8+
namespace Baz {}
9+
enum Baz {}
10+
11+
namespace Qux {}
12+
function Qux() {}

packages/eslint-config/tests/typescript/sort-type-union-intersection-members/.eslintrc.js packages/eslint-config/tests/typescript/sort-type-constituents/.eslintrc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ module.exports = {
22
rules: {
33
/**
44
* 联合类型和交叉类型的每一项必须按字母排序
5-
* @see {@link https://typescript-eslint.io/rules/sort-type-union-intersection-members/}
5+
* @see {@link https://typescript-eslint.io/rules/sort-type-constituents/}
66
* @category TypeScript
77
* @fixable
88
*/
9-
'@typescript-eslint/sort-type-union-intersection-members': 'off',
9+
'@typescript-eslint/sort-type-constituents': 'off',
1010
},
1111
}

0 commit comments

Comments
 (0)