Skip to content

Commit d43bf9a

Browse files
authored
chore: update dev dependencies (#948)
chore: update dev dependencies (#948)
1 parent 102b0d3 commit d43bf9a

26 files changed

+5422
-10371
lines changed

.eslintrc.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extends:
1212
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
1313
- 'plugin:jest/recommended'
1414
- 'prettier'
15-
- 'prettier/@typescript-eslint'
1615
rules:
1716
'@typescript-eslint/explicit-member-accessibility': off
1817
'@typescript-eslint/no-angle-bracket-type-assertion': off
@@ -32,3 +31,5 @@ rules:
3231
'@typescript-eslint/no-unsafe-call': off
3332
'@typescript-eslint/no-unsafe-member-access': off
3433
'@typescript-eslint/explicit-module-boundary-types': off
34+
'@typescript-eslint/no-unsafe-argument': off
35+
'@typescript-eslint/no-var-requires': off

docs/lang/chinese/README.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
并确认在使用 routing-controllers 前引入
8888

8989
```typescript
90+
9091
```
9192

9293
3. 安装框架:
@@ -944,23 +945,24 @@ app.listen(3000);
944945

945946
第二种,声明一个类:
946947

948+
```typescript
949+
import { KoaMiddlewareInterface } from 'routing-controllers';
947950

948-
```typescript
949-
import { KoaMiddlewareInterface } from "routing-controllers";
950-
951-
export class MyMiddleware implements KoaMiddlewareInterface { // 接口声明可选
952-
953-
use(context: any, next: (err?: any) => Promise<any>): Promise<any> {
954-
console.log("do something before execution...");
955-
return next().then(() => {
956-
console.log("do something after execution");
957-
}).catch(error => {
958-
console.log("error handling is also here");
959-
});
960-
}
951+
export class MyMiddleware implements KoaMiddlewareInterface {
952+
// 接口声明可选
961953

962-
}
963-
```
954+
use(context: any, next: (err?: any) => Promise<any>): Promise<any> {
955+
console.log('do something before execution...');
956+
return next()
957+
.then(() => {
958+
console.log('do something after execution');
959+
})
960+
.catch(error => {
961+
console.log('error handling is also here');
962+
});
963+
}
964+
}
965+
```
964966

965967
2. 应用:
966968

jest.config.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
44
collectCoverageFrom: ['src/**/*.ts', '!src/**/index.ts', '!src/**/*.interface.ts'],
5-
globals: {
6-
'ts-jest': {
7-
tsConfig: 'tsconfig.spec.json',
8-
},
9-
},
10-
setupFilesAfterEnv: ["./jest.setup.js"]
5+
globals: {},
6+
setupFilesAfterEnv: ["./jest.setup.js"],
7+
transform: {
8+
'^.+\\.tsx?$': [
9+
'ts-jest',
10+
{tsconfig: './tsconfig.spec.json'},
11+
],
12+
}
1113
};

lang/chinese/README.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -952,23 +952,24 @@ app.listen(3000);
952952

953953
第二种,声明一个类:
954954

955+
```typescript
956+
import { KoaMiddlewareInterface } from 'routing-controllers';
955957

956-
```typescript
957-
import { KoaMiddlewareInterface } from "routing-controllers";
958-
959-
export class MyMiddleware implements KoaMiddlewareInterface { // 接口声明可选
960-
961-
use(context: any, next: (err?: any) => Promise<any>): Promise<any> {
962-
console.log("do something before execution...");
963-
return next().then(() => {
964-
console.log("do something after execution");
965-
}).catch(error => {
966-
console.log("error handling is also here");
967-
});
968-
}
958+
export class MyMiddleware implements KoaMiddlewareInterface {
959+
// 接口声明可选
969960

970-
}
971-
```
961+
use(context: any, next: (err?: any) => Promise<any>): Promise<any> {
962+
console.log('do something before execution...');
963+
return next()
964+
.then(() => {
965+
console.log('do something after execution');
966+
})
967+
.catch(error => {
968+
console.log('error handling is also here');
969+
});
970+
}
971+
}
972+
```
972973

973974
2. 应用:
974975

0 commit comments

Comments
 (0)