Skip to content

Commit 144345c

Browse files
authored
fix(eslint-plugin): fix placeholder in ban-ts-comment (typescript-eslint#1703)
1 parent 85e1b19 commit 144345c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/eslint-plugin/src/rules/ban-ts-comment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default util.createRule<[Options], MessageIds>({
2828
},
2929
messages: {
3030
tsDirectiveComment:
31-
'Do not use "// @ts-{directive}" because it alters compilation errors.',
31+
'Do not use "// @ts-{{directive}}" because it alters compilation errors.',
3232
},
3333
schema: [
3434
{

packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ruleTester.run('ts-nocheck', rule, {
113113
code: '// @ts-nocheck',
114114
errors: [
115115
{
116-
data: { directive: 'check' },
116+
data: { directive: 'nocheck' },
117117
messageId: 'tsDirectiveComment',
118118
line: 1,
119119
column: 1,
@@ -124,7 +124,7 @@ ruleTester.run('ts-nocheck', rule, {
124124
code: '// @ts-nocheck: Suppress next line',
125125
errors: [
126126
{
127-
data: { directive: 'check' },
127+
data: { directive: 'nocheck' },
128128
messageId: 'tsDirectiveComment',
129129
line: 1,
130130
column: 1,
@@ -135,7 +135,7 @@ ruleTester.run('ts-nocheck', rule, {
135135
code: '/////@ts-nocheck: Suppress next line',
136136
errors: [
137137
{
138-
data: { directive: 'check' },
138+
data: { directive: 'nocheck' },
139139
messageId: 'tsDirectiveComment',
140140
line: 1,
141141
column: 1,
@@ -151,7 +151,7 @@ if (false) {
151151
`,
152152
errors: [
153153
{
154-
data: { directive: 'check' },
154+
data: { directive: 'nocheck' },
155155
messageId: 'tsDirectiveComment',
156156
line: 3,
157157
column: 3,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy