@putout/plugin-convert-throw
v2.0.0
Published
šPutout plugin adds ability to convert throw statement into throw expression
Maintainers
Readme
@putout/plugin-convert-throw 
This proposal defines new syntax to throw exceptions from within an expression context.
(c) tc39
šPutout plugin adds ability convert throw statement to expression.
Install
npm i @putout/plugin-convert-throw -DRule
{
"rules": {
"convert-throw": "on"
},
"plugins": [
"convert-throw"
]
}ā Example of incorrect code
const fn = () => {
throw Error('hello');
};ā Example of correct code
const fn = () => throwError('hello');License
MIT
