File tree Expand file tree Collapse file tree 5 files changed +11
-16
lines changed
packages/plugin-apply-overrides Expand file tree Collapse file tree 5 files changed +11
-16
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
3- const {
1+ import {
42 types ,
53 operator ,
64 template ,
7- } = require ( 'putout' ) ;
5+ } from 'putout' ;
86
97const {
108 returnStatement,
@@ -20,8 +18,8 @@ const {replaceWith} = operator;
2018
2119const createOverrides = template ( 'const %%overrides%% = overrides' ) ;
2220
23- module . exports . report = ( ) => `Use variable 'overrides' instead of destructuring function argument` ;
24- module . exports . fix = ( path ) => {
21+ export const report = ( ) => `Use variable 'overrides' instead of destructuring function argument` ;
22+ export const fix = ( path ) => {
2523 const { node, parentPath} = path ;
2624 const { right} = node ;
2725
@@ -37,7 +35,7 @@ module.exports.fix = (path) => {
3735 } ) ) ;
3836} ;
3937
40- module . exports . traverse = ( { push} ) => ( {
38+ export const traverse = ( { push} ) => ( {
4139 Function ( path ) {
4240 const params = path . get ( 'params' ) ;
4341 const { length} = params ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @putout/plugin-apply-overrides" ,
33 "version" : " 2.1.0" ,
4- "type" : " commonjs " ,
4+ "type" : " module " ,
55 "author" :
" coderaiser <[email protected] > (https://github.com/coderaiser)" ,
66 "description" : " 🐊Putout plugin adds ability apply 'overrides'" ,
77 "homepage" : " https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-overrides#readme" ,
3131 " overrides"
3232 ],
3333 "devDependencies" : {
34- "@putout/eslint-flat" : " ^3.0.0" ,
3534 "@putout/test" : " ^13.0.0" ,
3635 "c8" : " ^10.0.0" ,
3736 "eslint" : " ^9.0.0" ,
4140 "nodemon" : " ^3.0.1"
4241 },
4342 "peerDependencies" : {
44- "putout" : " >=36 "
43+ "putout" : " >=40 "
4544 },
4645 "license" : " MIT" ,
4746 "engines" : {
48- "node" : " >=18 "
47+ "node" : " >=20 "
4948 },
5049 "publishConfig" : {
5150 "access" : " public"
Original file line number Diff line number Diff line change 1- 'use strict' ;
1+ import { createTest } from '@putout/test' ;
2+ import * as plugin from '../lib/apply-overrides.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 [ 'apply-overrides' , plugin ] ,
97 ] ,
You can’t perform that action at this time.
0 commit comments