Skip to content

Commit

Permalink
Update typescript-eslint to 2.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed Apr 23, 2020
1 parent 3d72e34 commit 7eb91d1
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 298 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ npm upgrade \
}
}
```

## TODO

method-signature-style error https://github.com/typescript-eslint/typescript-eslint/pull/1685
prefer-ts-expect-error error https://github.com/typescript-eslint/typescript-eslint/pull/1705
52 changes: 31 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dist"
],
"dependencies": {
"@typescript-eslint/experimental-utils": "2.17.0",
"@typescript-eslint/experimental-utils": "2.29.0",
"core-js": "3.6.5"
},
"devDependencies": {
Expand All @@ -33,8 +33,8 @@
"rollup": "1.29.1",
"rollup-plugin-babel": "4.4.0",
"typescript": "3.8.3",
"@typescript-eslint/eslint-plugin": "2.17.0",
"@typescript-eslint/parser": "2.17.0",
"@typescript-eslint/eslint-plugin": "2.29.0",
"@typescript-eslint/parser": "2.29.0",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "2.3.0",
"eslint-plugin-react-native": "3.8.1",
Expand All @@ -43,8 +43,8 @@
"peerDependencies": {
"eslint": "^6.8.0",
"typescript": "^3.2.1",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.3.0",
"eslint-plugin-react-native": "^3.8.1",
Expand Down
11 changes: 11 additions & 0 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,16 @@ export default {
// allowNullable: true,
// ignoreRhs: true,
// }],
"@typescript-eslint/prefer-as-const": "error",
"no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error",
"default-case": "off",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
},
};
10 changes: 9 additions & 1 deletion test/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
exports[`simple.ts 1`] = `
"src/simple.ts:1:1: Unexpected var, use let or const instead. [Error/no-var]
src/simple.ts:1:5: 'a' is assigned a value but never used. Allowed unused vars must match /^_/u. [Error/@typescript-eslint/no-unused-vars]
src/simple.ts:1:8: Expected a \`const\` assertion instead of a literal type annotation [Error/@typescript-eslint/prefer-as-const]
src/simple.ts:6:11: Switch is not exhaustive. Cases not matched: \\"b\\" [Error/@typescript-eslint/switch-exhaustiveness-check]
src/simple.ts:14:3: Unsafe return of an any typed value [Error/@typescript-eslint/no-unsafe-return]
src/simple.ts:19:9: Unsafe assignment of an any value [Error/@typescript-eslint/no-unsafe-assignment]
src/simple.ts:25:3: Expected an assignment or function call and instead saw an expression. [Error/no-unused-expressions]
src/simple.ts:25:3: Unsafe member access .foobar on an any value [Error/@typescript-eslint/no-unsafe-member-access]
src/simple.ts:26:3: Unsafe member access .foobar on an any value [Error/@typescript-eslint/no-unsafe-member-access]
src/simple.ts:26:3: Unsafe call of an any typed value [Error/@typescript-eslint/no-unsafe-call]
2 problems"
10 problems"
`;
Loading

0 comments on commit 7eb91d1

Please sign in to comment.