@putout/plugin-putout-config
Version:
🐊Putout plugin helps to maintain putout config
22 lines (16 loc) • 449 B
JavaScript
import {operator} from 'putout';
const {
readFileContent,
removeFile,
} = operator;
export const report = () => `Remove empty '.putout.json'`;
export const fix = (filePath) => {
removeFile(filePath);
};
export const scan = (path, {push, trackFile}) => {
for (const file of trackFile(path, '.putout.json')) {
const data = readFileContent(file);
if (data.startsWith('{}'))
push(file);
}
};