@putout/plugin-convert-throw
v1.0.1
Published
putout plugin adds ability to convert throw statement into throw expression
Downloads
26,061
Maintainers
Readme
putout-plugin-convert-throw
putout
plugin adds ability convert throw statement into throw expression.
Install
npm i @putout/plugin-convert-throw -D
Rule
{
"rules": {
"convert-throw": true
}
}
❌ Incorrect code example
const fn = () => {throw Error('hello')};
✅ Correct code Example
const fn = () => throw Error('hello');
License
MIT