Move TS/JS to use organize imports codeAction instead of command (#47850)

* Move TS/JS to use organize imports code action

Fixes #47845
Fixes #46647

- Defines a new standard `SourceOrganizeImports` `CodeActionKind` to be used to implement organize imports in a consistent way.
- Add a new `Organize imports` command and keybinding that executes these actions.
- Move over the existing js/ts organize imports command to use the new code action kind

* Use supportedCodeActions context key

* Document code action kind values

* Fix regular expression

Make sure we only match whole scopes and not `unicorn.source.organizeImports`
This commit is contained in:
Matt Bierner
2018-04-18 10:51:33 -07:00
committed by GitHub
parent 6c76080362
commit 2fadb90198
11 changed files with 95 additions and 137 deletions

View File

@@ -904,6 +904,7 @@ export class CodeActionKind {
public static readonly RefactorInline = CodeActionKind.Refactor.append('inline');
public static readonly RefactorRewrite = CodeActionKind.Refactor.append('rewrite');
public static readonly Source = CodeActionKind.Empty.append('source');
public static readonly SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
constructor(
public readonly value: string