@putout/plugin-convert-const-to-let
Advanced tools
Comparing version
@@ -1,4 +0,3 @@ | ||
'use strict'; | ||
import {types} from 'putout'; | ||
const {types} = require('putout'); | ||
const { | ||
@@ -20,9 +19,9 @@ isBlockStatement, | ||
module.exports.report = () => `Use 'let' when reassign`; | ||
export const report = () => `Use 'let' when reassign`; | ||
module.exports.fix = (path) => { | ||
export const fix = (path) => { | ||
path.node.kind = 'let'; | ||
}; | ||
module.exports.traverse = ({push}) => ({ | ||
export const traverse = ({push}) => ({ | ||
VariableDeclaration: (path) => { | ||
@@ -48,5 +47,2 @@ if (path.parentPath.isTSModuleBlock()) | ||
if (!parentPath.node) | ||
continue; | ||
if (!binding.path.isVariableDeclarator()) | ||
@@ -53,0 +49,0 @@ continue; |
{ | ||
"name": "@putout/plugin-convert-const-to-let", | ||
"version": "4.2.0", | ||
"type": "commonjs", | ||
"version": "5.0.0", | ||
"type": "module", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -39,15 +39,15 @@ "description": "🐊Putout plugin adds ability to convert 'const' to 'let'", | ||
"@putout/plugin-split-variable-declarations": "*", | ||
"@putout/test": "^11.0.0", | ||
"@putout/test": "^13.0.0", | ||
"c8": "^10.0.0", | ||
"eslint": "^9.0.0", | ||
"eslint-plugin-n": "^17.0.0", | ||
"eslint-plugin-putout": "^23.0.0", | ||
"madrun": "^10.0.0" | ||
"eslint-plugin-putout": "^27.0.0", | ||
"madrun": "^11.0.0" | ||
}, | ||
"peerDependencies": { | ||
"putout": ">=37" | ||
"putout": ">=40" | ||
}, | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=18" | ||
"node": ">=20" | ||
}, | ||
@@ -54,0 +54,0 @@ "publishConfig": { |
Yes
NaN5201
-1.89%50
-5.66%