Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tizmagik/eslint-plugin-no-catch-destructuring
- Owner: tizmagik
- Created: 2021-11-04T16:30:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-04T18:22:04.000Z (about 3 years ago)
- Last Synced: 2024-08-08T23:45:02.273Z (3 months ago)
- Language: JavaScript
- Size: 75.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
}
}
```