$ npm install @putout/plugin-remove-process-exit
🐊Putout
plugin adds ability to find and remove process.exit
calls. Moved to @putout/plugin-nodejs
.
npm i @putout/plugin-remove-process-exit
Rule remove-process-exit
is disabled by default, to enable add to .putout.json
:
{
"rules": {
"remove-process-exit": "on"
}
}
const {readFileSync} = require('fs');
const source = readFileSync('./1.js', 'utf8');
const putout = require('putout');
console.log(source);
// outputs
`
process.exit();
`;
const result = putout(source, {
plugins: [
'remove-process-exit',
],
});
// returns
'';
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE