From 8aca9fcd374e403f7dda1248ec8a1d253fad975d Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 8 Oct 2020 17:06:29 +0100 Subject: [PATCH] import types only --- packages/tailwindcss-language-service/package.json | 2 +- .../src/codeActions/codeActionProvider.ts | 2 +- .../src/codeActions/provideCssConflictCodeActions.ts | 5 ++--- .../src/codeActions/provideInvalidApplyCodeActions.ts | 5 ++--- .../src/codeActions/provideSuggestionCodeActions.ts | 5 ++--- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/tailwindcss-language-service/package.json b/packages/tailwindcss-language-service/package.json index 3ef5ac6..537064b 100644 --- a/packages/tailwindcss-language-service/package.json +++ b/packages/tailwindcss-language-service/package.json @@ -1,6 +1,6 @@ { "name": "tailwindcss-language-service", - "version": "0.0.1", + "version": "0.0.2", "main": "dist/index.js", "typings": "dist/index.d.ts", "files": [ diff --git a/packages/tailwindcss-language-service/src/codeActions/codeActionProvider.ts b/packages/tailwindcss-language-service/src/codeActions/codeActionProvider.ts index 5dd074c..4bca931 100644 --- a/packages/tailwindcss-language-service/src/codeActions/codeActionProvider.ts +++ b/packages/tailwindcss-language-service/src/codeActions/codeActionProvider.ts @@ -1,4 +1,4 @@ -import { CodeAction, CodeActionParams } from 'vscode-languageserver' +import type { CodeAction, CodeActionParams } from 'vscode-languageserver' import { State } from '../util/state' import { doValidate } from '../diagnostics/diagnosticsProvider' import { rangesEqual } from '../util/rangesEqual' diff --git a/packages/tailwindcss-language-service/src/codeActions/provideCssConflictCodeActions.ts b/packages/tailwindcss-language-service/src/codeActions/provideCssConflictCodeActions.ts index b2c3bf8..41f5f7e 100644 --- a/packages/tailwindcss-language-service/src/codeActions/provideCssConflictCodeActions.ts +++ b/packages/tailwindcss-language-service/src/codeActions/provideCssConflictCodeActions.ts @@ -1,8 +1,7 @@ import { State } from '../util/state' -import { +import type { CodeActionParams, CodeAction, - CodeActionKind, } from 'vscode-languageserver' import { CssConflictDiagnostic } from '../diagnostics/types' import { joinWithAnd } from '../util/joinWithAnd' @@ -20,7 +19,7 @@ export async function provideCssConflictCodeActions( (otherClassName) => `'${otherClassName.className}'` ) )}`, - kind: CodeActionKind.QuickFix, + kind: 'quickfix', // CodeActionKind.QuickFix, diagnostics: [diagnostic], edit: { changes: { diff --git a/packages/tailwindcss-language-service/src/codeActions/provideInvalidApplyCodeActions.ts b/packages/tailwindcss-language-service/src/codeActions/provideInvalidApplyCodeActions.ts index ce9839a..226bc41 100644 --- a/packages/tailwindcss-language-service/src/codeActions/provideInvalidApplyCodeActions.ts +++ b/packages/tailwindcss-language-service/src/codeActions/provideInvalidApplyCodeActions.ts @@ -1,7 +1,6 @@ -import { +import type { CodeAction, CodeActionParams, - CodeActionKind, TextEdit, Range, } from 'vscode-languageserver' @@ -146,7 +145,7 @@ export async function provideInvalidApplyCodeActions( return [ { title: 'Extract to new rule', - kind: CodeActionKind.QuickFix, + kind: 'quickfix', // CodeActionKind.QuickFix, diagnostics: [diagnostic], edit: { changes: { diff --git a/packages/tailwindcss-language-service/src/codeActions/provideSuggestionCodeActions.ts b/packages/tailwindcss-language-service/src/codeActions/provideSuggestionCodeActions.ts index bb8040b..2b95b9d 100644 --- a/packages/tailwindcss-language-service/src/codeActions/provideSuggestionCodeActions.ts +++ b/packages/tailwindcss-language-service/src/codeActions/provideSuggestionCodeActions.ts @@ -1,8 +1,7 @@ import { State } from '../util/state' -import { +import type { CodeActionParams, CodeAction, - CodeActionKind, } from 'vscode-languageserver' import { InvalidConfigPathDiagnostic, @@ -22,7 +21,7 @@ export function provideSuggestionCodeActions( ): CodeAction[] { return diagnostic.suggestions.map((suggestion) => ({ title: `Replace with '${suggestion}'`, - kind: CodeActionKind.QuickFix, + kind: 'quickfix', // CodeActionKind.QuickFix, diagnostics: [diagnostic], edit: { changes: {