import types only

master
Brad Cornes 2020-10-08 17:06:29 +01:00
parent ccf7cd57a7
commit 8aca9fcd37
5 changed files with 8 additions and 11 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "tailwindcss-language-service", "name": "tailwindcss-language-service",
"version": "0.0.1", "version": "0.0.2",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"files": [ "files": [

View File

@ -1,4 +1,4 @@
import { CodeAction, CodeActionParams } from 'vscode-languageserver' import type { CodeAction, CodeActionParams } from 'vscode-languageserver'
import { State } from '../util/state' import { State } from '../util/state'
import { doValidate } from '../diagnostics/diagnosticsProvider' import { doValidate } from '../diagnostics/diagnosticsProvider'
import { rangesEqual } from '../util/rangesEqual' import { rangesEqual } from '../util/rangesEqual'

View File

@ -1,8 +1,7 @@
import { State } from '../util/state' import { State } from '../util/state'
import { import type {
CodeActionParams, CodeActionParams,
CodeAction, CodeAction,
CodeActionKind,
} from 'vscode-languageserver' } from 'vscode-languageserver'
import { CssConflictDiagnostic } from '../diagnostics/types' import { CssConflictDiagnostic } from '../diagnostics/types'
import { joinWithAnd } from '../util/joinWithAnd' import { joinWithAnd } from '../util/joinWithAnd'
@ -20,7 +19,7 @@ export async function provideCssConflictCodeActions(
(otherClassName) => `'${otherClassName.className}'` (otherClassName) => `'${otherClassName.className}'`
) )
)}`, )}`,
kind: CodeActionKind.QuickFix, kind: 'quickfix', // CodeActionKind.QuickFix,
diagnostics: [diagnostic], diagnostics: [diagnostic],
edit: { edit: {
changes: { changes: {

View File

@ -1,7 +1,6 @@
import { import type {
CodeAction, CodeAction,
CodeActionParams, CodeActionParams,
CodeActionKind,
TextEdit, TextEdit,
Range, Range,
} from 'vscode-languageserver' } from 'vscode-languageserver'
@ -146,7 +145,7 @@ export async function provideInvalidApplyCodeActions(
return [ return [
{ {
title: 'Extract to new rule', title: 'Extract to new rule',
kind: CodeActionKind.QuickFix, kind: 'quickfix', // CodeActionKind.QuickFix,
diagnostics: [diagnostic], diagnostics: [diagnostic],
edit: { edit: {
changes: { changes: {

View File

@ -1,8 +1,7 @@
import { State } from '../util/state' import { State } from '../util/state'
import { import type {
CodeActionParams, CodeActionParams,
CodeAction, CodeAction,
CodeActionKind,
} from 'vscode-languageserver' } from 'vscode-languageserver'
import { import {
InvalidConfigPathDiagnostic, InvalidConfigPathDiagnostic,
@ -22,7 +21,7 @@ export function provideSuggestionCodeActions(
): CodeAction[] { ): CodeAction[] {
return diagnostic.suggestions.map((suggestion) => ({ return diagnostic.suggestions.map((suggestion) => ({
title: `Replace with '${suggestion}'`, title: `Replace with '${suggestion}'`,
kind: CodeActionKind.QuickFix, kind: 'quickfix', // CodeActionKind.QuickFix,
diagnostics: [diagnostic], diagnostics: [diagnostic],
edit: { edit: {
changes: { changes: {