Skip to content

Commit

Permalink
fix unnecessary quotes style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagofelix committed Jun 16, 2023
1 parent 5b4fe3f commit 3275ae4
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions tests/lib/rules/jsx-no-literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ ruleTester.run('jsx-no-literals', rule, {
},
{
messageId: 'noStringsInJSX',
data: { text: "'Test'" },
data: { text: '\'Test\'' },
},
],
},
Expand All @@ -492,7 +492,7 @@ ruleTester.run('jsx-no-literals', rule, {
},
{
messageId: 'noStringsInJSX',
data: { text: "'Test'" },
data: { text: '\'Test\'' },
},
],
},
Expand Down Expand Up @@ -559,7 +559,7 @@ ruleTester.run('jsx-no-literals', rule, {
],
},
{
code: "<Foo bar={`foo` + 'bar'} />",
code: '<Foo bar={`foo` + \'bar\'} />',
options: [{ noStrings: true, ignoreProps: false }],
errors: [
{
Expand All @@ -568,7 +568,7 @@ ruleTester.run('jsx-no-literals', rule, {
},
{
messageId: 'noStringsInJSX',
data: { text: "'bar'" },
data: { text: '\'bar\'' },
},
],
},
Expand All @@ -587,12 +587,12 @@ ruleTester.run('jsx-no-literals', rule, {
],
},
{
code: "<Foo bar={'foo' + `bar`} />",
code: '<Foo bar={\'foo\' + `bar`} />',
options: [{ noStrings: true, ignoreProps: false }],
errors: [
{
messageId: 'noStringsInJSX',
data: { text: "'foo'" },
data: { text: '\'foo\'' },
},
{
messageId: 'noStringsInJSX',
Expand All @@ -608,13 +608,11 @@ ruleTester.run('jsx-no-literals', rule, {
}
}
`,
options: [
{ noStrings: true, allowedStrings: ['asd'], ignoreProps: false },
],
options: [{ noStrings: true, allowedStrings: ['asd'], ignoreProps: false }],
errors: [
{
messageId: 'noStringsInJSX',
data: { text: "'foo'" },
data: { text: '\'foo\'' },
},
{
messageId: 'noStringsInJSX',
Expand All @@ -623,12 +621,12 @@ ruleTester.run('jsx-no-literals', rule, {
],
},
{
code: "<Foo bar={'bar'} />",
code: '<Foo bar={\'bar\'} />',
options: [{ noStrings: true, ignoreProps: false }],
errors: [
{
messageId: 'noStringsInJSX',
data: { text: "'bar'" },
data: { text: '\'bar\'' },
},
],
},
Expand All @@ -640,7 +638,7 @@ ruleTester.run('jsx-no-literals', rule, {
errors: [
{
messageId: 'noStringsInAttributes',
data: { text: "'blank image'" },
data: { text: '\'blank image\'' },
},
],
},
Expand Down

0 comments on commit 3275ae4

Please sign in to comment.