Skip to content

Commit 4b2c37d

Browse files
committed
feature: @putout/plugin-split-call-with-destructuring: migrate to ESM
1 parent a45a47e commit 4b2c37d

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

packages/plugin-split-call-with-destructuring/.madrun.mjs renamed to packages/plugin-split-call-with-destructuring/.madrun.js

File renamed without changes.

packages/plugin-split-call-with-destructuring/.putout.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"match": {
33
"*.md": {
4-
"remove-debugger": "off"
5-
},
6-
"*.md*": {
74
"split-call-with-destructuring": "off"
85
}
96
}

packages/plugin-split-call-with-destructuring/eslint.config.mjs renamed to packages/plugin-split-call-with-destructuring/eslint.config.js

File renamed without changes.

packages/plugin-split-call-with-destructuring/lib/split-call-with-destructuring.js

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

3-
const {types} = require('putout');
43
const {isIdentifier} = types;
54

6-
module.exports.report = () => `Split call with destructuring`;
5+
export const report = () => `Split call with destructuring`;
76

8-
module.exports.replace = () => ({
7+
export const replace = () => ({
98
'__a(__args)({__c} = __d)': `{
109
__a(__args);
1110
({__c} = __d);

packages/plugin-split-call-with-destructuring/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@putout/plugin-split-call-with-destructuring",
33
"version": "1.0.0",
4-
"type": "commonjs",
4+
"type": "module",
55
"author": "coderaiser <[email protected]> (https://github.com/coderaiser)",
66
"description": "🐊Putout plugin adds ability to find and 'split-call-with-destructuring' statement",
77
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-split-call-with-destructuring#readme",
@@ -43,11 +43,11 @@
4343
"nodemon": "^3.0.1"
4444
},
4545
"peerDependencies": {
46-
"putout": ">=38"
46+
"putout": ">=40"
4747
},
4848
"license": "MIT",
4949
"engines": {
50-
"node": ">=18"
50+
"node": ">=20"
5151
},
5252
"publishConfig": {
5353
"access": "public"

packages/plugin-split-call-with-destructuring/test/split-call-with-destructuring.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 plugin from '../lib/split-call-with-destructuring.js';
23

3-
const {createTest} = require('@putout/test');
4-
const plugin = require('..');
5-
6-
const test = createTest(__dirname, {
4+
const test = createTest(import.meta.url, {
75
plugins: [
86
['split-call-with-destructuring', plugin],
97
],

0 commit comments

Comments
 (0)