├── .editorconfig ├── .gitignore ├── .npmignore ├── .prettierrc ├── .vscode └── settings.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── azure-pipelines.yml ├── package.json ├── src ├── react-hooks-nesting-walker │ ├── error-messages.ts │ ├── find-ancestor-function.ts │ ├── find-closest-ancestor-node.ts │ ├── function-node.ts │ ├── is-binary-conditional-expression.ts │ ├── is-component-identifier.ts │ ├── is-component-or-hook-identifier.ts │ ├── is-hook-call.ts │ ├── is-hook-identifier.ts │ ├── is-react-api-expression.ts │ ├── is-react-component-decorator.ts │ ├── options.ts │ ├── predicate.ts │ └── react-hooks-nesting-walker.ts └── reactHooksNestingRule.ts ├── test ├── hooks-from-non-react-namespaces │ ├── non-react-namespaces.ts.lint │ ├── react-namespace.ts.lint │ └── tslint.json ├── not-covered-cases │ ├── renamed-hook.ts.lint │ ├── static-arrays.ts.lint │ ├── tslint.json │ ├── unconditional-nesting.ts.lint │ └── use-hook-in-return.ts.lint └── tslint-rule │ ├── allowed-block.ts.lint │ ├── early-return.ts.lint │ ├── forbidden-nesting.ts.lint │ ├── hook-in-module-scope.ts.lint │ ├── hooks-in-class-components.ts.lint │ ├── named-funciton-expressions.ts.lint │ ├── native-hooks.ts.lint │ ├── react-top-level-api.ts.lint │ ├── tslint.json │ ├── use-custom-hooks.ts.lint │ └── use-inside-custom-hook.ts.lint ├── tsconfig.json └── tslint-react-hooks.json /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/.npmignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/.prettierrc -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/README.md -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/azure-pipelines.yml -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/package.json -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/error-messages.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/error-messages.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/find-ancestor-function.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/find-ancestor-function.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/find-closest-ancestor-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/find-closest-ancestor-node.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/function-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/function-node.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-binary-conditional-expression.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-binary-conditional-expression.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-component-identifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-component-identifier.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-component-or-hook-identifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-component-or-hook-identifier.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-hook-call.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-hook-call.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-hook-identifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-hook-identifier.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-react-api-expression.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-react-api-expression.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/is-react-component-decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/is-react-component-decorator.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/options.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/options.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/predicate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/predicate.ts -------------------------------------------------------------------------------- /src/react-hooks-nesting-walker/react-hooks-nesting-walker.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/react-hooks-nesting-walker/react-hooks-nesting-walker.ts -------------------------------------------------------------------------------- /src/reactHooksNestingRule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/src/reactHooksNestingRule.ts -------------------------------------------------------------------------------- /test/hooks-from-non-react-namespaces/non-react-namespaces.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/hooks-from-non-react-namespaces/non-react-namespaces.ts.lint -------------------------------------------------------------------------------- /test/hooks-from-non-react-namespaces/react-namespace.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/hooks-from-non-react-namespaces/react-namespace.ts.lint -------------------------------------------------------------------------------- /test/hooks-from-non-react-namespaces/tslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/hooks-from-non-react-namespaces/tslint.json -------------------------------------------------------------------------------- /test/not-covered-cases/renamed-hook.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/not-covered-cases/renamed-hook.ts.lint -------------------------------------------------------------------------------- /test/not-covered-cases/static-arrays.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/not-covered-cases/static-arrays.ts.lint -------------------------------------------------------------------------------- /test/not-covered-cases/tslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/not-covered-cases/tslint.json -------------------------------------------------------------------------------- /test/not-covered-cases/unconditional-nesting.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/not-covered-cases/unconditional-nesting.ts.lint -------------------------------------------------------------------------------- /test/not-covered-cases/use-hook-in-return.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/not-covered-cases/use-hook-in-return.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/allowed-block.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/allowed-block.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/early-return.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/early-return.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/forbidden-nesting.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/forbidden-nesting.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/hook-in-module-scope.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/hook-in-module-scope.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/hooks-in-class-components.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/hooks-in-class-components.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/named-funciton-expressions.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/named-funciton-expressions.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/native-hooks.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/native-hooks.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/react-top-level-api.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/react-top-level-api.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/tslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/tslint.json -------------------------------------------------------------------------------- /test/tslint-rule/use-custom-hooks.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/use-custom-hooks.ts.lint -------------------------------------------------------------------------------- /test/tslint-rule/use-inside-custom-hook.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/test/tslint-rule/use-inside-custom-hook.ts.lint -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gelio/tslint-react-hooks/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tslint-react-hooks.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": "./dist" 3 | } 4 | --------------------------------------------------------------------------------