Add rules from eslint's recommended set that triggered good lints - #50422
Conversation
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "warnOnUnsupportedTypeScriptVersion": false, | ||
| "ecmaVersion": 6, |
There was a problem hiding this comment.
We don't need to set this; the default of "latest" is fine because we compile our source and any new syntax will be downleveled. No need to make eslint complain about it.
|
TypeScript Bot (@typescript-bot) perf test this pretty please |
|
Heya Jake Bailey (@jakebailey), I've started to run the perf test suite on this PR at 4650c81. You can monitor the build here. Update: The results are in! |
|
Jake Bailey (@jakebailey) Here they are:
CompilerComparison Report - main..50422
System
Hosts
Scenarios
TSServerComparison Report - main..50422
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (container && (container.kind === SyntaxKind.Constructor || isJSConstructor(container))) { | ||
| return container as ConstructorDeclaration; | ||
| } | ||
| }; |
There was a problem hiding this comment.
❤️ semicolons
| /* @internal */ | ||
| export function computeLineStarts(text: string): number[] { | ||
| const result: number[] = new Array(); | ||
| const result: number[] = []; |
There was a problem hiding this comment.
Maybe there was some reason for using new Array here? But performance doesn't seem to have changed.
There was a problem hiding this comment.
I don't think so. It's been there since the first commit of the TypeScript compiler.
Out of interest, I enabled eslint/tseslint's recommended sets. These rules were ones that fired in our repo with standout results that I believe are good changes in the repo.