Add TypeScript linting support
See original GitHub issueWe should lint TypeScript files and try to approximate to match our ESLint configuration as close as possible.
TSLint rules we want:
no-namespace
: enforce usage of ES Modules / disallow deprecated behaviorno-duplicate-super
: prevent runtime errorno-duplicate-switch-case
no-duplicate-variable
: prevent redeclare ofvar
no-invalid-template-strings
no-invalid-this
triple-equals
use-isnan
- react hooks plugin
- match eslint config closely
- restrictedGlobals
maybe:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:66
- Comments:24 (9 by maintainers)
Top Results From Across the Web
How to use ESLint with TypeScript | Khalil Stemmler
ESLint is a JavaScript linter that enables you to enforce a set of style, formatting, and coding standards for your codebase. It looks...
Read more >Linting in TypeScript using ESLint and Prettier - LogRocket Blog
Integrate Prettier with ESLint to automate type-checking in your TypeScript code and ensure that the code has no bugs.
Read more >Lint and Style Your TypeScript Code with ESLint and Prettier
Tools like ESLint and Prettier can help automate and assert that code style be the same, and common pitfalls are caught.
Read more >typescript-eslint
ESLint statically analyzes your code to quickly find problems. It allows creating a series of assertions called lint rules around what your code...
Read more >How to add ESLint to your TypeScript Project - Medium
ESLint is an analyzer that help you find problems, ... Install TypeScript and run the command to create tsconfig file and add your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@copiali for now, you can add linting manually:
yarn add tslint tslint-react tslint-whatever-else-you-use
tslint.json
in your root"lint": "tslint -c tslint.json src/**/*.{ts,tsx}"
in yourpackage.json
scripts (I also add--fix --format verbose
)and then
yarn lint
+1 Really need support for tslint…