Commit Graph

1046 Commits

Author SHA1 Message Date
Josh Goldberg ✨
0ae8ca11d2 Updated typescript-eslint to v6 (#54693)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2023-07-14 15:36:10 -07:00
navya9singh
a602c668fb Fix(54376) (#54975) 2023-07-12 10:00:32 -07:00
Andrew Branch
c97e4b64a0 Fix auto imports in JS files in nodenext (#54817) 2023-06-28 15:03:14 -07:00
Ron Buckton
f9cf8216c6 Support using and await using declarations (#54505) 2023-06-22 17:02:56 -04:00
Andrew Branch
1e0b2f4912 Code fix should prefer import type (#54255) 2023-06-01 09:57:08 -07:00
Oleksandr T
d495200a4a fix(54366): bug: getCodeFixesAtPosition fails when TS2339 diagnostic paired with large pojo; Debug Failure. False expression: Token end is child end (#54432) 2023-05-30 13:47:31 -07:00
Oleksandr T
d762534463 fix(54383): Declare method quick fix not returned for #private method (#54400) 2023-05-26 10:06:20 -07:00
Gabriela Araujo Britto
24ac9e75c2 Improve class member snippet completions and keyword completions interaction (#52525) 2023-05-17 15:14:34 -07:00
Oleksandr T
0c5be02dcc feat(7411): JSX namespaced attribute syntax not supported (#47356) 2023-04-14 16:58:49 -07:00
Vitaly
a97ba985b2 infer from usages: support short-circuiting assignment operators (#52860) 2023-04-10 13:13:46 -07:00
Anders Hejlsberg
b40385b595 Explicit undefined return type checked similar to explicit void return type (#53607) 2023-04-01 14:44:52 -07:00
David Sherret
710e7d914d Remove non-ascii characters from internal code comments (#53608) 2023-03-31 10:57:57 -07:00
Andrew Branch
52a8061e11 Type-only auto-import improvements (#53590) 2023-03-30 12:01:40 -07:00
Iván
2b57a88b72 Use related spans for "implement abstract class" errors (#48030)
Co-authored-by: Gabriela Araujo Britto <gabrielaa@microsoft.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2023-03-28 07:54:36 -07:00
Jake Bailey
ac55b297b7 Upgrade "boolean-trivia" lint to new "argument-trivia" lint that uses type info, has quick fixes, etc. (#53002) 2023-03-23 16:26:39 -07:00
Jake Bailey
2c952fe850 Remove redundant throws of Debug.assertNever (#53405) 2023-03-21 16:04:06 -07:00
Jake Bailey
79a414bb5e Consistently use '...args' for diagnostic args (#53193) 2023-03-20 12:53:09 -07:00
Kagami Sascha Rosylight
f473058361 Allow implicit return with explicit undefined return type (#53092)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2023-03-17 12:08:01 -07:00
Oleksandr T
0e3e14d39e fix(52992): no add missing properties quick for nested object literal (#53004) 2023-03-09 10:00:55 -08:00
Oleksandr T
5240f060b8 feat(52569): fixUnusedIdentifier: Unwanted side-effects when removing an unused destructuring declaration containing a function call (#52951) 2023-03-06 15:41:13 -08:00
Oleksandr T
211a60dc79 fix(52444): "... is a type and must be imported using a type-only import ..." should have a quick fix (#52565) 2023-03-01 12:20:56 -08:00
brendaHuang
1b692dec96 convert JSDoc typedef to type, issue 50644 (#51430)
Co-authored-by: Brenda Huang <brehuang@linkedin.com>
2023-03-01 09:43:08 -08:00
Jake Bailey
ca1cf3dd85 Deprecate UnderscoreEscapedMap and remove internal uses (#53032) 2023-02-28 16:55:29 -08:00
Ron Buckton
55eff14353 Fix crash in extract type and generate get/set refactors (#52803) 2023-02-16 16:15:54 -05:00
Oleksandr T
733d7aed97 fix(52749): Assertion failure in derived class completion (#52787) 2023-02-15 14:33:39 -08:00
Andrew Branch
48e812aa07 Prefer top-level type-only imports in verbatimModuleSyntax (#52747) 2023-02-14 10:23:08 -08:00
Andrew Branch
99927cad95 Replace all instances of compilerOptions.isolatedModules with function considering verbatimModuleSyntax (#52746) 2023-02-13 16:03:02 -08:00
Andrew Branch
aa658257c9 Fix completion details auto-imports crashes (#52686) 2023-02-10 15:26:09 -08:00
Oleksandr T
1c822c42a4 feat(52097): "Add missing properties" quick fix for calculated string values ... (#52135) 2023-02-08 17:25:39 -08:00
Jake Bailey
2a8436c529 Use eslint-plugin-simple-import-sort (#52090) 2023-02-02 14:36:21 -08:00
Oleksandr T
43ecac801b fix(52386): JSDoc code fixes for arrow-function initialized const duplicates comment (#52390) 2023-01-24 23:42:57 -08:00
Sheetal Nandi
d76f3612c1 More removals of long deprecated APIs (#52343) 2023-01-20 15:25:06 -08:00
Andrew Branch
cfe1842adf Add verbatimModuleSyntax, deprecate importsNotUsedAsValues and preserveValueImports (#52203) 2023-01-19 16:56:30 -08:00
Oleksandr T
6f338b9936 fix(52274): Suggestion code action adds another JSDoc (#52276) 2023-01-19 16:41:26 -08:00
Ron Buckton
5b18979697 Implement the Stage 3 Decorators Proposal (#50820) 2023-01-19 17:54:12 -05:00
Ron Buckton
20182cf848 Organize imports collation (#52115) 2023-01-19 17:53:51 -05:00
Jake Bailey
22b362ceac Enable strictFunctionTypes (#49929) 2023-01-17 17:20:51 -08:00
Ron Buckton
9cdba994ac Remove some properties from Identifier (#52170) 2023-01-12 17:20:12 -05:00
Jake Bailey
f1ff0de943 Use native generators/iterables, remove helper cruft (#51921) 2023-01-06 14:40:56 -08:00
Oleksandr T
44152bc22e fix(29648): Error message related to JSDoc for non-JSDoc syntax error (#50793)
* fix(29648): improve diagnostics of non-JSDoc syntax errors

* fix lint errors

* update tests

* change diagnostic type suggestion. fix QF for jsdoc nullable type

* move error handling from the parser to the checker

* change diagnostic message. remove speculative parsing

* update baseline
2022-12-29 16:50:57 -08:00
Josh Goldberg
2484390af8 Added override keyword to codefix implemented abstract methods (#51033)
* Added override keyword to codefixed implemented abstract methods

* Only when noImplicitOverrides is true, and always check abstract modifier

* Added test on abstract/override already being there

* Added back a few test cases

* Check declaration modifier, not class modifier
2022-12-16 11:59:21 -08:00
Oleksandr T
193a8a74c8 skip optional parameters in js files (#51924) 2022-12-16 11:51:41 -08:00
Oleksandr T
645b3ddb06 fix(51920): skip TypeScript types in js files (#51922) 2022-12-16 10:35:35 -08:00
Andrew Branch
e0bfac531b Rename module resolution option node to node10 (preserving backward-compatible alias) (#51901)
* Rename `node` to `node10` (preserving alias)

* Revert dogfooding change because of LKG

* Update baselines
2022-12-15 10:07:33 -08:00
Ron Buckton
2993ea8eaa Monomorphic Symbol access (#51880) 2022-12-15 10:44:24 -05:00
Andrew Branch
4076ff8fd6 Add option for organize imports case sensitivity (#51733)
* Add ignore case option to organizeImports

* Adopt in auto-imports, use same case-insensitive comparison as eslint

* Fix build/lint

* Mark functions internal

* Update affected auto import test

* Update API baseline

* Update protocol

* Update API baseline

* Short-circuit comparisons that have already failed
2022-12-13 14:37:29 -08:00
Andrew Branch
a5dde88dce --moduleResolution bundler (formerly known as hybrid) (#51669)
* WIP

* Add extension error back unless noEmit is set

* Add non-relative tests

* Add error for importing from declaration file

* Update unit test

* Add explicit flag for importing from .ts extensions

* Add module specifier resolution changes

* Add auto-import tests

* Disallow relative imports into node_modules

* Ensure auto-imports don’t suggest ./node_modules;

* Test a non-portable declaration emit issue

* Test auto-importing TSX file

* Update path completions

* Fix lint due to merge

* Remove minimal-specific stuff

* Remove minimal tests

* Update unit tests

* Add options

* Add customConditions option

* Add first tests

* CJS constructs are not allowed

* Add another test

* Fix extension adding/replacing priority

* Update test to reflect the choice not to block on unrecognized extensions

* Add auto-imports and string completions tests

* Revamp string completions ending preferences

* Comment test

* Auto-imports of declaration files cannot use .ts extension

* Have declaration file auto imports default to extensionless instead

* Add test for custom conditions

* Fix indentation

* Add baseline showing resolvePackageJsonImports/Exports compatibility

* Fix test and prevent CJS require from resolving

* Update unit test baselines

* Fix bad merge conflict resolution

* Make resolvedUsingTsExtension optional

* Update missed baselines

* Revert now-unnecessary API implementation changes

* Clean up

* Update baselines to es5 emit

* Rename to `bundler`
2022-12-13 13:35:16 -08:00
Ron Buckton
6d41964fd0 Reduce polymorphism resulting from unstable Node shapes (#51682)
* Move .symbol to Declaration

* simplify some factories

* Move localSymbol to Declaration

* Ensure JSDocContainer types are properly initialized

* Move contextualType from Node to NodeLinks

* Move 'locals' and 'nextContainer' out of Node

* Move 'flowNode' out of 'Node'

* Pre-define endFlowNode/returnFlowNode

* Pre-define some SourceFile properties and a more stable cloneNode

* Don't add excess properties to type nodes in typeToTypeNode

* Refactor wrapSymbolTrackerToReportForContext to improve perf
2022-12-13 15:11:10 -05:00
Oleksandr T
790c03d7b0 fix(47954): Auto implementation of interface with a constructor prop causes error (#50709)
* fix(47954): convert constructor property to computed name

* handle more nodes with constructor name
2022-12-12 15:28:03 -08:00
Lyu, Wei-Da
0c09d2f172 quick fix for a nullable missing callback function (#51743) 2022-12-05 12:23:59 -08:00