2.0.0 β’ Published 1 year ago
@putout/plugin-montag v2.0.0
@putout/plugin-apply-montag
Format multiline strings using tagged templates, instead of putting all lines into an array and joining to a string.
(c) Montag
πPutout plugin adds ability to apply Montag. Renamed to @putout/plugin-montag.
Install
npm i @putout/plugin-apply-montag
Rule
{
"rules": {
"montag/apply": "on",
"montag/declare": "on"
}
}
apply
β Example of incorrect code
const a = [
'hello',
'world',
].join('\n');
β Example of correct code
const a = montag`
hello
world
`;
declare
β Example of incorrect code
const a = montag`
hello
world
`;
β Example of correct code
import montag from 'montag';
const a = montag`
hello
world
`;
License
MIT