1.0.1 • Published 4 years ago

@putout/plugin-convert-throw v1.0.1

Weekly downloads
2,759
License
MIT
Repository
github
Last release
4 years ago

putout-plugin-convert-throw NPM version Dependency Status

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