Skip to content

Commit a02d1ce

Browse files
committed
fix: @putout/plugin-convert-quotes-to-backtics: esm
1 parent bcc141e commit a02d1ce

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

packages/plugin-convert-quotes-to-backticks/.madrun.mjs renamed to packages/plugin-convert-quotes-to-backticks/.madrun.js

File renamed without changes.

packages/plugin-convert-quotes-to-backticks/eslint.config.mjs renamed to packages/plugin-convert-quotes-to-backticks/eslint.config.js

File renamed without changes.

packages/plugin-convert-quotes-to-backticks/lib/convert-quotes-to-backticks.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
'use strict';
1+
import {types, operator} from 'putout';
22

3-
const {types, operator} = require(`putout`);
43
const {
54
templateElement,
65
templateLiteral,
76
} = types;
87

9-
module.exports.report = () => `Use backticks instead of quotes`;
8+
export const report = () => `Use backticks instead of quotes`;
109

11-
module.exports.fix = (path) => {
10+
export const fix = (path) => {
1211
const value = path
1312
.node
1413
.value
@@ -27,7 +26,7 @@ module.exports.fix = (path) => {
2726

2827
const {replaceWith} = operator;
2928

30-
module.exports.traverse = ({push}) => ({
29+
export const traverse = ({push}) => ({
3130
StringLiteral(path) {
3231
const {value} = path.node;
3332

packages/plugin-convert-quotes-to-backticks/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"backticks"
3535
],
3636
"devDependencies": {
37-
"@putout/eslint-flat": "^3.0.0",
3837
"@putout/test": "^13.0.0",
3938
"c8": "^10.0.0",
4039
"eslint": "^9.0.0",

packages/plugin-convert-quotes-to-backticks/test/convert-quotes-to-backticks.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
'use strict';
1+
import {createTest} from '@putout/test';
2+
import * as convertQuotesToBacktics from '../lib/convert-quotes-to-backticks.js';
23

3-
const {createTest} = require('@putout/test');
4-
const convertQuotesToBacktics = require('..');
5-
6-
const test = createTest(__dirname, {
4+
const test = createTest(import.meta.url, {
75
plugins: [
86
['convert-quotes-to-backtics', convertQuotesToBacktics],
97
],

0 commit comments

Comments
 (0)