Skip to content

Commit 92901e8

Browse files
authored
Merge pull request #26 from Gelio/upgrade-deps-ts-3.8
Upgrade deps (TypeScript 3.8, TSLint 6.x)
2 parents 6e3dfe0 + df8bd0e commit 92901e8

File tree

4 files changed

+59
-57
lines changed

4 files changed

+59
-57
lines changed

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
"author": "Grzegorz Rozdzialik <voreny.gelio@gmail.com>",
2424
"license": "MIT",
2525
"devDependencies": {
26-
"@types/node": "^12.0.7",
27-
"tslint": "^5.17.0",
28-
"typescript": "^3.5.1"
26+
"@types/node": "^12.12.30",
27+
"tslint": "^6.1.0",
28+
"typescript": "^3.8.3"
2929
},
3030
"homepage": "https://github.com/Gelio/tslint-react-hooks",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Gelio/tslint-react-hooks"
3434
},
3535
"peerDependencies": {
36-
"tslint": "^5.1.0",
36+
"tslint": "5 - 6",
3737
"typescript": ">=2.1.0"
3838
}
3939
}

src/react-hooks-nesting-walker/is-hook-call.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function isHookCall(
2323
return true;
2424
} else if (
2525
isPropertyAccessExpression(expression) &&
26+
isIdentifier(expression.name) &&
2627
isHookIdentifier(expression.name)
2728
) {
2829
if (ruleOptions[detectHooksFromNonReactNamespaceOptionName]) {

src/react-hooks-nesting-walker/is-react-api-expression.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const isReactApiExpression = (predicate: Predicate<Identifier>) => (
2727
return (
2828
isIdentifier(expression.expression) &&
2929
expression.expression.text === 'React' &&
30+
isIdentifier(expression.name) &&
3031
predicate(expression.name)
3132
);
3233
}

0 commit comments

Comments
 (0)