@putout/plugin-remove-process-exit
v3.0.2
Published
putout plugin adds ability to find and remove process.exit
Downloads
31,036
Maintainers
Readme
@putout/plugin-remove-process-exit
🐊Putout
plugin adds ability to find and remove process.exit
calls. Moved to @putout/plugin-nodejs
.
Install
npm i @putout/plugin-remove-process-exit
Rule
Rule remove-process-exit
is disabled by default, to enable add to .putout.json
:
{
"rules": {
"remove-process-exit": "on"
}
}
Code Example
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
'';
License
MIT