putout-plugin-remove-console
putout
plugin adds ability to find and add/remove use strict
directive.
Install
npm i @putout/plugin-remove-console
Rule
Rule strict-mode
is enabled by default, to disable add to .putout.json
:
{
"rules": {
"strict-mode/add": false,
"strict-mode/remove": false,
}
}
Code Example
const {readFileSync} = require('fs');
const source = readFileSync('./1.js', 'utf8');
const putout = require('putout');
console.log(source);
`
console.log('hello');
`
const result = putout(source, {
plugins: [
'remove-console'
]
});
`
'use strict';
console.log('hello');
`
License
MIT