Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release notes #5

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-vans-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-handle-errors': patch
---

chore: Upgrade eslint to v9 and pin dependencies
5 changes: 5 additions & 0 deletions .changeset/great-brooms-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-handle-errors': patch
---

test: Add integration tests againt node 18/20/22 and eslint 7/8/9
49 changes: 49 additions & 0 deletions .changeset/healthy-donuts-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
'eslint-plugin-handle-errors': minor
---

[BREAKING] Use flat eslint config by default. The configs should be updates as follows:

- For flat eslint config:

- Before:

```javascript
import eslint from '@eslint/js';
import handleErrors from 'eslint-plugin-handle-errors';

export default [
eslint.configs.recommended, // optional
handleErrors.configs['flat/recommended'],
];
```

- After:

```javascript
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:

```json
{
"extends": ["plugin:handle-errors/recommended"]
}
```

- After:

```json
{
"extends": ["plugin:handle-errors/legacy-recommended"]
}
```
17 changes: 17 additions & 0 deletions .changeset/mean-cats-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'eslint-plugin-handle-errors': minor
---

feat: Support passing an error to a promise reject function like this:

```ts
new Promise((resolve, reject) => {
try {
// do something
} catch (err) {
reject(err);
}
});
```

Calling the reject function here is valid error handling.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist/
node_modules/
package-lock.json
*.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default [

```json
{
"extends": ["plugin:handle-errors/legacy-recommended"],
"extends": ["plugin:handle-errors/legacy-recommended"]
}
```

Expand Down