1.0.1 • Published 4 years ago
@putout/plugin-convert-throw v1.0.1
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