Skip to content

Commit 7ad5a8b

Browse files
committed
feature: @putout/plugin-convert-quotes-to-backticks: drop support of 🐊 < 38
1 parent b4899f3 commit 7ad5a8b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

β€Žpackages/plugin-convert-quotes-to-backticks/lib/convert-quotes-to-backticks.jsβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const {replaceWith} = operator;
2525

2626
module.exports.traverse = ({push}) => ({
2727
StringLiteral(path) {
28+
if (path.parentPath.isObjectProperty())
29+
return;
30+
2831
const {value} = path.node;
2932

3033
if (value.includes('${'))

β€Žpackages/plugin-convert-quotes-to-backticks/test/convert-quotes-to-backticks.jsβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ test('plugin-convert-quotes-to-backtics: no report: variables', (t) => {
2929
t.end();
3030
});
3131

32+
test('plugin-convert-quotes-to-backtics: no report: object-key', (t) => {
33+
t.noReport('object-key');
34+
t.end();
35+
});
36+
3237
test('plugin-convert-quotes-to-backtics: transform: backslash', (t) => {
3338
t.transform('backslash');
3439
t.end();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const replace = () => ({
2+
'\'\'': '"")',
3+
});
4+

0 commit comments

Comments
Β (0)