Skip to content

Commit 072a6c9

Browse files
Add a source to all emitted diagnostics (#1491)
Fixes #1490 Screenshots of diagnostics that show the source: <img width="1148" height="255" alt="Screenshot 2025-11-04 at 10 29 05" src="https://github.com/user-attachments/assets/9cb4e1df-2fe9-4bf5-a19f-5b08b15ca2d6" /> <img width="773" height="148" alt="Screenshot 2025-11-04 at 10 29 16" src="https://github.com/user-attachments/assets/49fc8273-a489-4e9b-b620-affceac34452" />
1 parent 6f19018 commit 072a6c9

25 files changed

+61
-1
lines changed

packages/tailwindcss-language-server/tests/code-actions/conflict.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"diagnostics": [
88
{
99
"code": "cssConflict",
10+
"source": "tailwindcss",
1011
"className": {
1112
"className": "lowercase",
1213
"classList": {
@@ -85,6 +86,7 @@
8586
"diagnostics": [
8687
{
8788
"code": "cssConflict",
89+
"source": "tailwindcss",
8890
"className": {
8991
"className": "uppercase",
9092
"classList": {

packages/tailwindcss-language-server/tests/code-actions/invalid-screen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"diagnostics": [
99
{
1010
"code": "invalidScreen",
11+
"source": "tailwindcss",
1112
"range": {
1213
"start": { "line": 0, "character": 8 },
1314
"end": { "line": 0, "character": 13 }

packages/tailwindcss-language-server/tests/code-actions/invalid-theme.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"diagnostics": [
99
{
1010
"code": "invalidConfigPath",
11+
"source": "tailwindcss",
1112
"range": {
1213
"start": { "line": 0, "character": 21 },
1314
"end": { "line": 0, "character": 35 }

packages/tailwindcss-language-server/tests/code-actions/invalid-variant.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"diagnostics": [
99
{
1010
"code": "invalidVariant",
11+
"source": "tailwindcss",
1112
"range": {
1213
"start": { "line": 0, "character": 10 },
1314
"end": { "line": 0, "character": 16 }

packages/tailwindcss-language-server/tests/code-actions/variant-order.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"diagnostics": [
88
{
99
"code": "recommendedVariantOrder",
10+
"source": "tailwindcss",
1011
"suggestions": ["focus:hover:uppercase"],
1112
"range": {
1213
"start": { "line": 0, "character": 12 },

packages/tailwindcss-language-server/tests/diagnostics/css-conflict/css.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"expected": [
55
{
66
"code": "cssConflict",
7+
"source": "tailwindcss",
78
"className": {
89
"className": "uppercase",
910
"classList": {
@@ -59,6 +60,7 @@
5960
},
6061
{
6162
"code": "cssConflict",
63+
"source": "tailwindcss",
6264
"className": {
6365
"className": "lowercase",
6466
"classList": {

packages/tailwindcss-language-server/tests/diagnostics/css-conflict/jsx-concat-positive.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"expected": [
55
{
66
"code": "cssConflict",
7+
"source": "tailwindcss",
78
"className": {
89
"className": "lowercase",
910
"classList": {
@@ -57,6 +58,7 @@
5758
},
5859
{
5960
"code": "cssConflict",
61+
"source": "tailwindcss",
6062
"className": {
6163
"className": "uppercase",
6264
"classList": {

packages/tailwindcss-language-server/tests/diagnostics/css-conflict/simple.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"expected": [
44
{
55
"code": "cssConflict",
6+
"source": "tailwindcss",
67
"className": {
78
"className": "uppercase",
89
"classList": {
@@ -56,6 +57,7 @@
5657
},
5758
{
5859
"code": "cssConflict",
60+
"source": "tailwindcss",
5961
"className": {
6062
"className": "lowercase",
6163
"classList": {

packages/tailwindcss-language-server/tests/diagnostics/css-conflict/variants-positive.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"expected": [
44
{
55
"code": "cssConflict",
6+
"source": "tailwindcss",
67
"className": {
78
"className": "sm:uppercase",
89
"classList": {
@@ -56,6 +57,7 @@
5657
},
5758
{
5859
"code": "cssConflict",
60+
"source": "tailwindcss",
5961
"className": {
6062
"className": "sm:lowercase",
6163
"classList": {

packages/tailwindcss-language-server/tests/diagnostics/css-conflict/vue-style-lang-sass.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"expected": [
55
{
66
"code": "cssConflict",
7+
"source": "tailwindcss",
78
"className": {
89
"className": "uppercase",
910
"classList": {
@@ -59,6 +60,7 @@
5960
},
6061
{
6162
"code": "cssConflict",
63+
"source": "tailwindcss",
6264
"className": {
6365
"className": "lowercase",
6466
"classList": {

0 commit comments

Comments
 (0)