Skip to content

Commit b4396bd

Browse files
0x80Kent C. Dodds
authored andcommitted
fix(singleQuote): interpret eslint quote backtick as singleQuote false (#76)
1 parent b703776 commit b4396bd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ function getSingleQuote(eslintValue, fallbacks) {
189189
prettierValue = true
190190
} else if (eslintValue === 'double') {
191191
prettierValue = false
192+
} else if (eslintValue === 'backtick') {
193+
prettierValue = false
192194
} else {
193195
prettierValue = eslintValue
194196
}

src/utils.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const getPrettierOptionsFromESLintRulesTests = [
168168
},
169169
{rules: {'max-len': ['error', {code: 120}]}, options: {printWidth: 120}},
170170
{rules: {quotes: [2, 'double']}, options: {singleQuote: false}},
171+
{rules: {quotes: [2, 'backtick']}, options: {singleQuote: false}},
171172
{
172173
rules: {
173174
'comma-dangle': [

0 commit comments

Comments
 (0)