Releases: Nodge/eslint-plugin-handle-errors
Releases · Nodge/eslint-plugin-handle-errors
v0.3.1
Minor Changes
-
#5
8920b2c
Thanks @Nodge! - [BREAKING] Use flat eslint config by default. The configs should be updates as follows:-
For flat eslint config:
-
Before:
import eslint from '@eslint/js'; import handleErrors from 'eslint-plugin-handle-errors'; export default [ eslint.configs.recommended, // optional handleErrors.configs['flat/recommended'], ];
-
After:
import eslint from '@eslint/js'; import handleErrors from 'eslint-plugin-handle-errors'; export default [ eslint.configs.recommended, // optional handleErrors.configs.recommended, ];
-
-
For legacy esling config:
-
Before:
{ "extends": ["plugin:handle-errors/recommended"] }
-
After:
{ "extends": ["plugin:handle-errors/legacy-recommended"] }
-
-
-
#5
8920b2c
Thanks @Nodge! - feat: Support passing an error to a promise reject function like this:new Promise((resolve, reject) => { try { // do something } catch (err) { reject(err); } });
Calling the reject function here is valid error handling.