Skip to content

Releases: Nodge/eslint-plugin-handle-errors

v0.3.1

02 Aug 21:33
70b7013
Compare
Choose a tag to compare

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.

Patch Changes

v0.2.1

15 Apr 19:31
Compare
Choose a tag to compare

Fix typo in the docs

v0.2.0

15 Apr 19:27
Compare
Choose a tag to compare

Support for the loggerFunctions option

v0.1.1

15 Apr 01:35
Compare
Choose a tag to compare

initial release