Skip to content

Commit d76119c

Browse files
committed
update diagnostic messages
1 parent 329a50d commit d76119c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/lsp/providers/diagnosticsProvider.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,24 @@ function getInvalidApplyDiagnostics(
4343
let message: string
4444

4545
if (Array.isArray(meta)) {
46-
message = `\`@apply\` cannot be used with \`.${className}\` because it is included in multiple rulesets.`
46+
message = `'@apply' cannot be used with '${className}' because it is included in multiple rulesets.`
4747
} else if (meta.source !== 'utilities') {
48-
message = `\`@apply\` cannot be used with \`.${className}\` because it is not a utility.`
48+
message = `'@apply' cannot be used with '${className}' because it is not a utility.`
4949
} else if (meta.context && meta.context.length > 0) {
5050
if (meta.context.length === 1) {
51-
message = `\`@apply\` cannot be used with \`.${className}\` because it is nested inside of an at-rule (${meta.context[0]}).`
51+
message = `'@apply' cannot be used with '${className}' because it is nested inside of an at-rule ('${meta.context[0]}').`
5252
} else {
53-
message = `\`@apply\` cannot be used with \`.${className}\` because it is nested inside of at-rules (${meta.context.join(
54-
', '
55-
)}).`
53+
message = `'@apply' cannot be used with '${className}' because it is nested inside of at-rules (${meta.context
54+
.map((c) => `'${c}'`)
55+
.join(', ')}).`
5656
}
5757
} else if (meta.pseudo && meta.pseudo.length > 0) {
5858
if (meta.pseudo.length === 1) {
59-
message = `\`@apply\` cannot be used with \`.${className}\` because its definition includes a pseudo-selector (${meta.pseudo[0]})`
59+
message = `'@apply' cannot be used with '${className}' because its definition includes a pseudo-selector ('${meta.pseudo[0]}')`
6060
} else {
61-
message = `\`@apply\` cannot be used with \`.${className}\` because its definition includes pseudo-selectors (${meta.pseudo.join(
62-
', '
63-
)})`
61+
message = `'@apply' cannot be used with '${className}' because its definition includes pseudo-selectors (${meta.pseudo
62+
.map((p) => `'${p}'`)
63+
.join(', ')}).`
6464
}
6565
}
6666

@@ -119,7 +119,7 @@ function getUtilityConflictDiagnostics(
119119
severity === 'error'
120120
? DiagnosticSeverity.Error
121121
: DiagnosticSeverity.Warning,
122-
message: `You can’t use \`${className.className}\` and \`${otherClassName.className}\` together`,
122+
message: `'${className.className}' and '${otherClassName.className}' apply the same CSS properties.`,
123123
relatedInformation: [
124124
{
125125
message: otherClassName.className,

0 commit comments

Comments
 (0)