Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tizmagik/eslint-plugin-no-catch-destructuring


https://github.com/tizmagik/eslint-plugin-no-catch-destructuring

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# eslint-plugin-no-catch-destructuring

Avoid Safari <=13 ES6 bug by not destructuring in catch blocks

If you're curious, here's the specific bug: https://bugs.webkit.org/show_bug.cgi?id=189914

Best to pair this with the [no-shadow](https://eslint.org/docs/rules/no-shadow) eslint rule.

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `eslint-plugin-no-catch-destructuring`:

```sh
npm install eslint-plugin-no-catch-destructuring --save-dev
```

## Usage

Add `no-catch-destructuring` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
"plugins": ["no-catch-destructuring"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
"rules": {
"no-catch-destructuring/no-catch-destructuring": 2
}
}
```