UNPKG

@putout/plugin-remove-console

Version:

🐊Putout plugin adds ability to find and remove console.log calls

18 lines (12 loc) 350 B
'use strict'; const {operator} = require('putout'); const {remove} = operator; module.exports.report = () => `Avoid 'console' call`; module.exports.fix = (path) => { remove(path); }; module.exports.filter = ({scope}) => !scope.hasBinding('console'); module.exports.include = () => [ `console.__a(__args)`, `console[__a](__args)`, ];