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