Skip to content

Commit d3df38b

Browse files
committed
Change a function name
1 parent 2439068 commit d3df38b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/jsx-curly-brace-presence.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
return rawStringValue.includes('\\');
6464
}
6565

66-
function escapeDoubleQuoteInString(rawStringValue) {
66+
function escapeDoubleQuotes(rawStringValue) {
6767
return rawStringValue.replace(/\\"/g, '"').replace(/"/g, '\\"');
6868
}
6969

@@ -85,7 +85,7 @@ module.exports = {
8585
if (parentType === 'JSXAttribute') {
8686
textToReplace = expressionType === 'TemplateLiteral' ?
8787
`"${expression.quasis[0].value.raw}"` :
88-
`"${escapeDoubleQuoteInString(
88+
`"${escapeDoubleQuotes(
8989
expression.raw.substring(1, expression.raw.length - 1)
9090
)}"`;
9191
} else {
@@ -104,7 +104,7 @@ module.exports = {
104104
message: 'Need to wrap this literal in a JSX expression.',
105105
fix: function(fixer) {
106106
const expression = literalNode.parent.type === 'JSXAttribute' ?
107-
`{"${escapeDoubleQuoteInString(
107+
`{"${escapeDoubleQuotes(
108108
literalNode.raw.substring(1, literalNode.raw.length - 1)
109109
)}"}` :
110110
`{${JSON.stringify(literalNode.value)}}`;

0 commit comments

Comments
 (0)