Skip to content

Commit 52a6c2f

Browse files
chore(): update eslint
1 parent 2722485 commit 52a6c2f

8 files changed

+176
-351
lines changed

.eslintrc.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,20 @@ 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
1918
'@typescript-eslint/no-parameter-properties': off
2019
'@typescript-eslint/explicit-function-return-type': off
21-
'@typescript-eslint/member-delimiter-style': off
22-
'@typescript-eslint/no-inferrable-types': off
2320
'@typescript-eslint/no-explicit-any': off
2421
'@typescript-eslint/member-ordering': 'error'
2522
'@typescript-eslint/no-unused-vars':
2623
- 'error'
2724
- args: 'none'
28-
# TODO: Remove these and fixed issues once we merged all the current PRs.
25+
'@typescript-eslint/no-unsafe-argument': off
2926
'@typescript-eslint/ban-types': off
3027
'@typescript-eslint/no-unsafe-return': off
3128
'@typescript-eslint/no-unsafe-assignment': off
3229
'@typescript-eslint/no-unsafe-call': off
3330
'@typescript-eslint/no-unsafe-member-access': off
3431
'@typescript-eslint/explicit-module-boundary-types': off
35-
'@typescript-eslint/restrict-template-expressions': off

package-lock.json

+166-337
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"@rollup/plugin-node-resolve": "13.0.6",
4646
"@types/jest": "27.0.2",
4747
"@types/node": "16.11.6",
48-
"@typescript-eslint/eslint-plugin": "4.33.0",
49-
"@typescript-eslint/parser": "4.33.0",
50-
"eslint": "7.32.0",
51-
"eslint-config-prettier": "7.2.0",
48+
"@typescript-eslint/eslint-plugin": "5.2.0",
49+
"@typescript-eslint/parser": "5.2.0",
50+
"eslint": "8.1.0",
51+
"eslint-config-prettier": "8.3.0",
5252
"eslint-plugin-jest": "25.2.2",
5353
"husky": "7.0.4",
5454
"jest": "27.3.1",

src/metadata/ConstraintMetadata.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class ConstraintMetadata {
2828
// Constructor
2929
// -------------------------------------------------------------------------
3030

31-
constructor(target: Function, name?: string, async: boolean = false) {
31+
constructor(target: Function, name?: string, async = false) {
3232
this.target = target;
3333
this.name = name;
3434
this.async = async;

src/metadata/ValidationMetadata.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ValidationMetadata {
5252
/**
5353
* Specifies if validated value is an array and each of its item must be validated.
5454
*/
55-
each: boolean = false;
55+
each = false;
5656

5757
/*
5858
* A transient set of data passed through to the validation result for response mapping

src/validation/ValidationError.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class ValidationError {
4646
* @param hasParent true when the error is a child of an another one
4747
* @param parentPath path as string to the parent of this property
4848
*/
49-
toString(shouldDecorate: boolean = false, hasParent: boolean = false, parentPath: string = ``): string {
49+
toString(shouldDecorate = false, hasParent = false, parentPath = ``): string {
5050
const boldStart = shouldDecorate ? `\x1b[1m` : ``;
5151
const boldEnd = shouldDecorate ? `\x1b[22m` : ``;
5252
const propConstraintFailed = (propertyName: string): string =>

src/validation/ValidationExecutor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class ValidationExecutor {
1818
// -------------------------------------------------------------------------
1919

2020
awaitingPromises: Promise<any>[] = [];
21-
ignoreAsyncValidations: boolean = false;
21+
ignoreAsyncValidations = false;
2222

2323
// -------------------------------------------------------------------------
2424
// Private Properties

src/validation/ValidationUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function constraintToString(constraint: unknown): string {
88
return constraint.join(', ');
99
}
1010

11-
return `${constraint}`;
11+
return `${constraint as string}`;
1212
}
1313

1414
export class ValidationUtils {

0 commit comments

Comments
 (0)