tailwind-lint 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/linter.d.cts +100 -21
- package/package.json +6 -6
package/dist/linter.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/vscode-languageserver-types@3.
|
|
1
|
+
//#region node_modules/.pnpm/vscode-languageserver-types@3.18.4/node_modules/vscode-languageserver-types/lib/esm/main.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* A tagging type for string properties that are actually document URIs.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
type DocumentUri = string;
|
|
6
6
|
declare namespace DocumentUri {
|
|
7
7
|
function is(value: any): value is DocumentUri;
|
|
8
8
|
}
|
|
@@ -11,14 +11,14 @@ declare namespace DocumentUri {
|
|
|
11
11
|
*
|
|
12
12
|
* @since 3.16.0
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
type URI = string;
|
|
15
15
|
declare namespace URI {
|
|
16
16
|
function is(value: any): value is URI;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Defines an integer in the range of -2^31 to 2^31 - 1.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
type integer = number;
|
|
22
22
|
declare namespace integer {
|
|
23
23
|
const MIN_VALUE = -2147483648;
|
|
24
24
|
const MAX_VALUE = 2147483647;
|
|
@@ -27,7 +27,7 @@ declare namespace integer {
|
|
|
27
27
|
/**
|
|
28
28
|
* Defines an unsigned integer in the range of 0 to 2^31 - 1.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
type uinteger = number;
|
|
31
31
|
declare namespace uinteger {
|
|
32
32
|
const MIN_VALUE = 0;
|
|
33
33
|
const MAX_VALUE = 2147483647;
|
|
@@ -56,7 +56,7 @@ declare namespace uinteger {
|
|
|
56
56
|
*
|
|
57
57
|
* @since 3.17.0
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
type LSPAny = any;
|
|
60
60
|
/**
|
|
61
61
|
* Position in a text document expressed as zero-based line and character
|
|
62
62
|
* offset. Prior to 3.17 the offsets were always based on a UTF-16 string
|
|
@@ -65,14 +65,14 @@ declare type LSPAny = any;
|
|
|
65
65
|
* offset of b is 3 since `𐐀` is represented using two code units in UTF-16.
|
|
66
66
|
* Since 3.17 clients and servers can agree on a different string encoding
|
|
67
67
|
* representation (e.g. UTF-8). The client announces it's supported encoding
|
|
68
|
-
* via the client capability [`general.positionEncodings`](
|
|
68
|
+
* via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).
|
|
69
69
|
* The value is an array of position encodings the client supports, with
|
|
70
70
|
* decreasing preference (e.g. the encoding at index `0` is the most preferred
|
|
71
71
|
* one). To stay backwards compatible the only mandatory encoding is UTF-16
|
|
72
72
|
* represented via the string `utf-16`. The server can pick one of the
|
|
73
73
|
* encodings offered by the client and signals that encoding back to the
|
|
74
74
|
* client via the initialize result's property
|
|
75
|
-
* [`capabilities.positionEncoding`](
|
|
75
|
+
* [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value
|
|
76
76
|
* `utf-16` is missing from the client's capability `general.positionEncodings`
|
|
77
77
|
* servers can safely assume that the client supports UTF-16. If the server
|
|
78
78
|
* omits the position encoding in its initialize result the encoding defaults
|
|
@@ -89,9 +89,6 @@ declare type LSPAny = any;
|
|
|
89
89
|
interface Position {
|
|
90
90
|
/**
|
|
91
91
|
* Line position in a document (zero-based).
|
|
92
|
-
*
|
|
93
|
-
* If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
|
|
94
|
-
* If a line number is negative, it defaults to 0.
|
|
95
92
|
*/
|
|
96
93
|
line: uinteger;
|
|
97
94
|
/**
|
|
@@ -99,9 +96,6 @@ interface Position {
|
|
|
99
96
|
*
|
|
100
97
|
* The meaning of this offset is determined by the negotiated
|
|
101
98
|
* `PositionEncodingKind`.
|
|
102
|
-
*
|
|
103
|
-
* If the character value is greater than the line length it defaults back to the
|
|
104
|
-
* line length.
|
|
105
99
|
*/
|
|
106
100
|
character: uinteger;
|
|
107
101
|
}
|
|
@@ -242,7 +236,7 @@ declare namespace DiagnosticSeverity {
|
|
|
242
236
|
*/
|
|
243
237
|
const Hint: 4;
|
|
244
238
|
}
|
|
245
|
-
|
|
239
|
+
type DiagnosticSeverity = 1 | 2 | 3 | 4;
|
|
246
240
|
/**
|
|
247
241
|
* The diagnostic tags.
|
|
248
242
|
*
|
|
@@ -263,7 +257,7 @@ declare namespace DiagnosticTag {
|
|
|
263
257
|
*/
|
|
264
258
|
const Deprecated: 2;
|
|
265
259
|
}
|
|
266
|
-
|
|
260
|
+
type DiagnosticTag = 1 | 2;
|
|
267
261
|
/**
|
|
268
262
|
* Structure to capture a description for an error code.
|
|
269
263
|
*
|
|
@@ -293,8 +287,9 @@ interface Diagnostic {
|
|
|
293
287
|
*/
|
|
294
288
|
range: Range;
|
|
295
289
|
/**
|
|
296
|
-
* The diagnostic's severity.
|
|
297
|
-
*
|
|
290
|
+
* The diagnostic's severity. To avoid interpretation mismatches when a
|
|
291
|
+
* server is used with different clients it is highly recommended that servers
|
|
292
|
+
* always provide a severity value.
|
|
298
293
|
*/
|
|
299
294
|
severity?: DiagnosticSeverity;
|
|
300
295
|
/**
|
|
@@ -315,9 +310,12 @@ interface Diagnostic {
|
|
|
315
310
|
*/
|
|
316
311
|
source?: string;
|
|
317
312
|
/**
|
|
318
|
-
* The diagnostic's message. It usually appears in the user interface
|
|
313
|
+
* The diagnostic's message. It usually appears in the user interface.
|
|
314
|
+
*
|
|
315
|
+
* @since 3.18.0 - support for MarkupContent. This is guarded by the client
|
|
316
|
+
* capability `textDocument.diagnostic.markupMessageSupport`.
|
|
319
317
|
*/
|
|
320
|
-
message: string;
|
|
318
|
+
message: string | MarkupContent;
|
|
321
319
|
/**
|
|
322
320
|
* Additional metadata about the diagnostic.
|
|
323
321
|
*
|
|
@@ -345,11 +343,92 @@ declare namespace Diagnostic {
|
|
|
345
343
|
/**
|
|
346
344
|
* Creates a new Diagnostic literal.
|
|
347
345
|
*/
|
|
348
|
-
function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic;
|
|
346
|
+
function create(range: Range, message: string | MarkupContent, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic;
|
|
349
347
|
/**
|
|
350
348
|
* Checks whether the given literal conforms to the {@link Diagnostic} interface.
|
|
351
349
|
*/
|
|
352
350
|
function is(value: any): value is Diagnostic;
|
|
351
|
+
/**
|
|
352
|
+
* Checks whether the given diagnostic's message conforms to the 3.17.0
|
|
353
|
+
* version of the protocol where the message is a string.
|
|
354
|
+
*
|
|
355
|
+
* @param value the diagnostic
|
|
356
|
+
* @returns true if the diagnostic's message is a string, false otherwise.
|
|
357
|
+
*/
|
|
358
|
+
function is3_17(value: Diagnostic): value is Omit<Diagnostic, 'message'> & {
|
|
359
|
+
message: string;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Gets the message string of a diagnostic. If the message is already a
|
|
363
|
+
* string, it is returned as is. If the message is a MarkupContent,
|
|
364
|
+
* the value of the MarkupContent is returned. Otherwise an error is thrown.
|
|
365
|
+
*
|
|
366
|
+
* @param diagnostic the diagnostic to get the message string from.
|
|
367
|
+
* @returns the message string of the given diagnostic.
|
|
368
|
+
*/
|
|
369
|
+
function getMessageString(diagnostic: Diagnostic): string;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Describes the content type that a client supports in various
|
|
373
|
+
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
374
|
+
*
|
|
375
|
+
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
376
|
+
* are reserved for internal usage.
|
|
377
|
+
*/
|
|
378
|
+
declare namespace MarkupKind {
|
|
379
|
+
/**
|
|
380
|
+
* Plain text is supported as a content format
|
|
381
|
+
*/
|
|
382
|
+
const PlainText: 'plaintext';
|
|
383
|
+
/**
|
|
384
|
+
* Markdown is supported as a content format
|
|
385
|
+
*/
|
|
386
|
+
const Markdown: 'markdown';
|
|
387
|
+
/**
|
|
388
|
+
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
389
|
+
*/
|
|
390
|
+
function is(value: any): value is MarkupKind;
|
|
391
|
+
}
|
|
392
|
+
type MarkupKind = 'plaintext' | 'markdown';
|
|
393
|
+
/**
|
|
394
|
+
* A `MarkupContent` literal represents a string value which content is interpreted base on its
|
|
395
|
+
* kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
|
|
396
|
+
*
|
|
397
|
+
* If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
|
|
398
|
+
* See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
|
|
399
|
+
*
|
|
400
|
+
* Here is an example how such a string can be constructed using JavaScript / TypeScript:
|
|
401
|
+
* ```ts
|
|
402
|
+
* let markdown: MarkdownContent = {
|
|
403
|
+
* kind: MarkupKind.Markdown,
|
|
404
|
+
* value: [
|
|
405
|
+
* '# Header',
|
|
406
|
+
* 'Some text',
|
|
407
|
+
* '```typescript',
|
|
408
|
+
* 'someCode();',
|
|
409
|
+
* '```'
|
|
410
|
+
* ].join('\n')
|
|
411
|
+
* };
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* *Please Note* that clients might sanitize the return markdown. A client could decide to
|
|
415
|
+
* remove HTML from the markdown to avoid script execution.
|
|
416
|
+
*/
|
|
417
|
+
interface MarkupContent {
|
|
418
|
+
/**
|
|
419
|
+
* The type of the Markup
|
|
420
|
+
*/
|
|
421
|
+
kind: MarkupKind;
|
|
422
|
+
/**
|
|
423
|
+
* The content itself
|
|
424
|
+
*/
|
|
425
|
+
value: string;
|
|
426
|
+
}
|
|
427
|
+
declare namespace MarkupContent {
|
|
428
|
+
/**
|
|
429
|
+
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
430
|
+
*/
|
|
431
|
+
function is(value: any): value is MarkupContent;
|
|
353
432
|
}
|
|
354
433
|
//#endregion
|
|
355
434
|
//#region src/types.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-lint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "A command-line tool that uses the Tailwind CSS IntelliSense plugin to show linting suggestions for your Tailwind CSS classes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -61,22 +61,22 @@
|
|
|
61
61
|
"@tailwindcss/language-service": "^0.16.0",
|
|
62
62
|
"ansis": "^4.4.0",
|
|
63
63
|
"commander": "^15.0.0",
|
|
64
|
-
"postcss": "^8.5.
|
|
64
|
+
"postcss": "^8.5.29",
|
|
65
65
|
"tinyglobby": "^0.2.17",
|
|
66
66
|
"vscode-languageserver-textdocument": "^1.0.15"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^26.6.4",
|
|
70
|
-
"oxfmt": "^0.
|
|
71
|
-
"oxlint": "^1.
|
|
70
|
+
"oxfmt": "^0.72.0",
|
|
71
|
+
"oxlint": "^1.87.0",
|
|
72
72
|
"tsdown": "^0.23.0",
|
|
73
73
|
"typescript": "^7.0.2",
|
|
74
74
|
"vitest": "^5.0.3",
|
|
75
|
-
"vscode-languageserver": "
|
|
75
|
+
"vscode-languageserver": "10.1.2"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=22.0.0",
|
|
79
79
|
"pnpm": ">=10.0.0"
|
|
80
80
|
},
|
|
81
|
-
"packageManager": "pnpm@12.
|
|
81
|
+
"packageManager": "pnpm@12.9.1"
|
|
82
82
|
}
|