Add TypeScript linting support#6513
Conversation
|
This looks great, @ianschmitz. Do you think we should consider adding I can see that you already took a little from that plugin. I've been playing with it and it does force you to define return types for every function, but otherwise seems fairly light. |
|
I looked through the rules there and quite a few were stylistic which I know we've avoided in our ESLint config. There's a few missing rules from TSLint like some of their promise rules that were really nice that I wish typescript-eslint had. |
|
Now that TSLint is going to be deprecated it sounds like they will be bringing missing rules over to typescript-eslint. |
Revert eslint changes when react/create-react-app#6513 will be merged Revert to react-scripts when react/create-react-app#5829 will be merged
* masterd: (24 commits) Add TypeScript linting support (react#6513) Support React Hooks (react#5602) (react#5997) Support browserslist in @babel/preset-env (react#6608) Add empty mock for http2 (react#5686) Add note about npx caching (react#6374) change named import into default import (react#6625) Stage files for commit after ejecting (react#5960) Upgrade dependencies (react#6614) Make compiler variable const instead of let (react#6621) Type check JSON files (react#6615) Change class components to functional components in templates (react#6451) Convert JSON.stringify \n to os.EOL when writing tsconfig.json (react#6610) Update html-webpack-plugin (react#6361) Enable click to go to error in console for TypeScript (react#6502) Update webpack-dev-server to 3.2.1 (react#6483) [docs] revert removal of newlines from html (react#6386) Publish Prepare 2.1.8 release Reapply "Speed up TypeScript v2 (react#6406)" (react#6586) Publish ... # Conflicts: # packages/babel-preset-react-app/create.js # packages/react-scripts/scripts/build.js
Closes #5641.
This adds linting support for TypeScript via typescript-eslint. With this setup we are able to reuse the vast majority of our current ESLint rules.
TODO:
indent)