eslint-plugin-putout
Version:
ESLint plugin for 🐊Putout
20 lines (14 loc) • 388 B
JavaScript
;
module.exports.category = 'import';
module.exports.report = () => 'Remove newline after last specifier';
const regExp = /\n\n(\s+)?}/;
module.exports.filter = ({text}) => {
return regExp.test(text);
};
module.exports.fix = ({text}) => {
return text.replace(regExp, '\n}');
};
module.exports.include = () => [
'ImportDeclaration',
'ObjectExpression',
];