eslint-plugin-no-catch-destructuring

v1.0.2
Avoid Safari10 ES6 bug by not destructuring in catch blocks
eslint eslintplugin eslint-plugin

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

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

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

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:

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

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

{
  "rules": {
    "no-catch-destructuring/no-catch-destructuring": 2
  }
}
npm i eslint-plugin-no-catch-destructuring

Metadata

  • ISC
  • 12.x || 14.x || >= 16
  • Jeremy Gayed
  • released 11/4/2021

Downloads

Maintainers