Skip to content

Commit 301ac74

Browse files
koba04toshi-toma
authored andcommitted
deps: update @typescript-eslint to v2 (#169)
BREAKING CHANGE: This adds some rules enabled by plugin:@typescript-eslint/recommended
1 parent 25cdc0c commit 301ac74

File tree

4 files changed

+41
-28
lines changed

4 files changed

+41
-28
lines changed

lib/typescript.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module.exports = {
22
parser: "@typescript-eslint/parser",
33
plugins: ["@typescript-eslint"],
4-
extends: ["plugin:@typescript-eslint/recommended"],
4+
extends: [
5+
"plugin:@typescript-eslint/eslint-recommended",
6+
"plugin:@typescript-eslint/recommended"
7+
],
58
// It's 5〜10x slower with the project setting.
69
// So We disable it until the issue has been fixed
710
/*
@@ -10,7 +13,7 @@ module.exports = {
1013
},
1114
*/
1215
rules: {
13-
"@typescript-eslint/array-type": ["error", "array-simple"],
16+
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
1417

1518
"no-useless-constructor": "off",
1619
"@typescript-eslint/no-useless-constructor": "warn",
@@ -23,6 +26,7 @@ module.exports = {
2326
"@typescript-eslint/explicit-member-accessibility": "off",
2427
"@typescript-eslint/interface-name-prefix": "off",
2528
"@typescript-eslint/no-explicit-any": "off",
29+
"@typescript-eslint/no-empty-interface": "off",
2630
"@typescript-eslint/no-inferrable-types": "off",
2731
// FIXME use NonNullable<T> instead
2832
"@typescript-eslint/no-non-null-assertion": "off",

package-lock.json

Lines changed: 29 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"typescript": "^3.3.3333"
4141
},
4242
"dependencies": {
43-
"@typescript-eslint/eslint-plugin": "^1.13.0",
44-
"@typescript-eslint/parser": "^1.13.0",
43+
"@typescript-eslint/eslint-plugin": "^2.0.0",
44+
"@typescript-eslint/parser": "^2.0.0",
4545
"babel-eslint": "^10.0.2",
4646
"eslint-config-prettier": "^6.0.0",
4747
"eslint-plugin-flowtype": "^4.2.0",

test/fixtures/react-typescript/warning.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ class Foo extends React.Component<Props> {
99
super(props);
1010
}
1111

12-
componentDidMount() {}
12+
componentDidMount() {
13+
// noop
14+
}
1315

1416
concat(a: string, b: string): string {
1517
return a + b!;
@@ -21,4 +23,4 @@ class Foo extends React.Component<Props> {
2123
}
2224

2325
const Component = () => <Foo name="bar" />;
24-
export default Component;
26+
export default Component;

0 commit comments

Comments
 (0)