Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eslint: For
no-empty
, set allowEmptyCatch
false (#38486)
The "no-empty" can be satisfied with anything, even a comment saying why we're ignoring the exception. Since that's probably a useful comment to have, let's do that. For a few files, do something different: * `projects/plugins/jetpack/extensions/shared/block-editor-asset-loader.js` can return directly from the `catch`, the following check would only fail if the catch caught. * `projects/plugins/jetpack/modules/shortcodes/js/jmpress.js` is a copy-pasted external library. We should `.eslintignore` it as well as two others in that directory. * `projects/plugins/jetpack/tools/webpack.config.extensions.js` would error on the next line after the catch anyway, so skip catching at all. This brings us more in line with the ruleset imported from `@wordpress/eslint-plugin`. Also, have tools/cleanup-excludelists.sh clean up ignored files. The "File ignored because of a matching ignore pattern" warning shouldn't keep files in the list. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10162158508 Upstream-Ref: Automattic/jetpack@d1c2b52
- Loading branch information