Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"diagnostics": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "lowercase",
"classList": {
Expand Down Expand Up @@ -85,6 +86,7 @@
"diagnostics": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "uppercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"diagnostics": [
{
"code": "invalidScreen",
"source": "tailwindcss",
"range": {
"start": { "line": 0, "character": 8 },
"end": { "line": 0, "character": 13 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"diagnostics": [
{
"code": "invalidConfigPath",
"source": "tailwindcss",
"range": {
"start": { "line": 0, "character": 21 },
"end": { "line": 0, "character": 35 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"diagnostics": [
{
"code": "invalidVariant",
"source": "tailwindcss",
"range": {
"start": { "line": 0, "character": 10 },
"end": { "line": 0, "character": 16 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"diagnostics": [
{
"code": "recommendedVariantOrder",
"source": "tailwindcss",
"suggestions": ["focus:hover:uppercase"],
"range": {
"start": { "line": 0, "character": 12 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"expected": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "uppercase",
"classList": {
Expand Down Expand Up @@ -59,6 +60,7 @@
},
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "lowercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"expected": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "lowercase",
"classList": {
Expand Down Expand Up @@ -57,6 +58,7 @@
},
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "uppercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"expected": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "uppercase",
"classList": {
Expand Down Expand Up @@ -56,6 +57,7 @@
},
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "lowercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"expected": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "sm:uppercase",
"classList": {
Expand Down Expand Up @@ -56,6 +57,7 @@
},
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "sm:lowercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"expected": [
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "uppercase",
"classList": {
Expand Down Expand Up @@ -59,6 +60,7 @@
},
{
"code": "cssConflict",
"source": "tailwindcss",
"className": {
"className": "lowercase",
"classList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 36 } },
severity: 1,
message: "'--color-red-901' does not exist in your theme. Did you mean '--color-red-900'?",
Expand All @@ -109,6 +110,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 37 } },
severity: 1,
message: "'--colors-red-901' does not exist in your theme. Did you mean '--color-red-900'?",
Expand All @@ -123,6 +125,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 42 } },
severity: 1,
message: "'--font-obliqueness-90' does not exist in your theme.",
Expand All @@ -143,6 +146,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 35 } },
severity: 1,
message: "'colors.red.901' does not exist in your theme config.",
Expand Down Expand Up @@ -194,6 +198,7 @@ withFixture('v4/with-prefix', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 36 } },
severity: 1,
message: "'--color-red-901' does not exist in your theme. Did you mean '--color-red-900'?",
Expand All @@ -208,6 +213,7 @@ withFixture('v4/with-prefix', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 37 } },
severity: 1,
message: "'--colors-red-901' does not exist in your theme. Did you mean '--color-red-900'?",
Expand All @@ -222,6 +228,7 @@ withFixture('v4/with-prefix', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 42 } },
severity: 1,
message: "'--font-obliqueness-90' does not exist in your theme.",
Expand All @@ -242,6 +249,7 @@ withFixture('v4/with-prefix', (c) => {
expected: [
{
code: 'invalidConfigPath',
source: 'tailwindcss',
range: { start: { line: 0, character: 21 }, end: { line: 0, character: 35 } },
severity: 1,
message: "'colors.red.901' does not exist in your theme config.",
Expand Down Expand Up @@ -280,6 +288,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'cssConflict',
source: 'tailwindcss',
message: "'max-w-4xl' applies the same CSS properties as 'max-w-6xl'.",
className: {
className: 'max-w-4xl',
Expand All @@ -298,6 +307,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'cssConflict',
source: 'tailwindcss',
message: "'max-w-6xl' applies the same CSS properties as 'max-w-4xl'.",
className: {
className: 'max-w-6xl',
Expand Down Expand Up @@ -329,6 +339,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidTailwindDirective',
source: 'tailwindcss',
message:
"'@tailwind base' is no longer available in v4. Use '@import \"tailwindcss/preflight\"' instead.",
suggestions: [],
Expand All @@ -340,6 +351,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidTailwindDirective',
source: 'tailwindcss',
message:
"'@tailwind preflight' is no longer available in v4. Use '@import \"tailwindcss/preflight\"' instead.",
suggestions: [],
Expand All @@ -351,6 +363,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidTailwindDirective',
source: 'tailwindcss',
message:
"'@tailwind components' is no longer available in v4. Use '@tailwind utilities' instead.",
suggestions: ['utilities'],
Expand All @@ -362,6 +375,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidTailwindDirective',
source: 'tailwindcss',
message:
"'@tailwind screens' is no longer available in v4. Use '@tailwind utilities' instead.",
suggestions: ['utilities'],
Expand All @@ -373,6 +387,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidTailwindDirective',
source: 'tailwindcss',
message:
"'@tailwind variants' is no longer available in v4. Use '@tailwind utilities' instead.",
suggestions: ['utilities'],
Expand Down Expand Up @@ -406,6 +421,7 @@ defineTest({
expect(diagnostics).toEqual([
{
code: 'usedBlocklistedClass',
source: 'tailwindcss',
message: 'The class "flex" will not be generated as it has been blocklisted',
range: {
start: { line: 0, character: 12 },
Expand All @@ -415,6 +431,7 @@ defineTest({
},
{
code: 'usedBlocklistedClass',
source: 'tailwindcss',
message: 'The class "hover:flex" will not be generated as it has been blocklisted',
range: {
start: { line: 0, character: 27 },
Expand Down Expand Up @@ -463,6 +480,7 @@ defineTest({
expect(diagnostics).toEqual([
{
code: 'suggestCanonicalClasses',
source: 'tailwindcss',
message: 'The class `[@media_print]:flex` can be written as `print:flex`',
range: {
start: { line: 0, character: 12 },
Expand All @@ -473,6 +491,7 @@ defineTest({
},
{
code: 'suggestCanonicalClasses',
source: 'tailwindcss',
message: 'The class `[color:red]/50` can be written as `text-[red]/50`',
range: {
start: { line: 0, character: 32 },
Expand All @@ -483,6 +502,7 @@ defineTest({
},
{
code: 'suggestCanonicalClasses',
source: 'tailwindcss',
message: 'The class `mt-[16px]` can be written as `mt-4`',
range: {
start: { line: 0, character: 47 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"expected": [
{
"code": "invalidScreen",
"source": "tailwindcss",
"range": { "start": { "line": 0, "character": 8 }, "end": { "line": 0, "character": 13 } },
"severity": 1,
"message": "The screen 'small' does not exist in your theme config. Did you mean 'sm'?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"expected": [
{
"code": "invalidConfigPath",
"source": "tailwindcss",
"range": { "start": { "line": 0, "character": 21 }, "end": { "line": 0, "character": 35 } },
"severity": 1,
"message": "'colors.red.901' does not exist in your theme config. Did you mean 'colors.red.900'?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 1, character: 35 },
Expand All @@ -40,6 +41,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 2, character: 35 },
Expand All @@ -48,6 +50,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 3, character: 35 },
Expand All @@ -56,6 +59,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 4, character: 33 },
Expand All @@ -64,6 +68,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 5, character: 33 },
Expand All @@ -72,6 +77,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: 'The source directive requires a path to a directory.',
range: {
start: { line: 6, character: 33 },
Expand All @@ -90,6 +96,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: '`source(no)` is invalid. Did you mean `source(none)`?',
range: {
start: { line: 1, character: 35 },
Expand All @@ -98,6 +105,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message: '`source(no)` is invalid. Did you mean `source(none)`?',
range: {
start: { line: 2, character: 33 },
Expand Down Expand Up @@ -127,6 +135,7 @@ withFixture('v4/basic', (c) => {
expected: [
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message:
'POSIX-style paths are required with `source(…)` but `C:\\absolute\\path` is a Windows-style path.',
range: {
Expand All @@ -136,6 +145,7 @@ withFixture('v4/basic', (c) => {
},
{
code: 'invalidSourceDirective',
source: 'tailwindcss',
message:
'POSIX-style paths are required with `source(…)` but `C:relative.txt` is a Windows-style path.',
range: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export async function getSuggestCanonicalClassesDiagnostics(

diagnostics.push({
code: DiagnosticKind.SuggestCanonicalClasses,
source: 'tailwindcss',
range: className.range,
severity:
severity === 'error'
Expand Down
Loading