Skip to content

Commit ab60e24

Browse files
authored
Merge branch 'main' into fix-release-yml
2 parents 0b47b8a + bae0284 commit ab60e24

File tree

4 files changed

+73
-3
lines changed

4 files changed

+73
-3
lines changed

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
dist/
22
node_modules/
33
package-lock.json
4-
*.md

CHANGELOG.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# eslint-plugin-handle-errors
2+
3+
## 0.3.0
4+
5+
### Minor Changes
6+
7+
- [#5](https://github.com/Nodge/eslint-plugin-handle-errors/pull/5) [`8920b2c`](https://github.com/Nodge/eslint-plugin-handle-errors/commit/8920b2c6e0fa0576a3d61b4bdb00ee784c0e2fd3) Thanks [@Nodge](https://github.com/Nodge)! - [BREAKING] Use flat eslint config by default. The configs should be updates as follows:
8+
9+
- For flat eslint config:
10+
11+
- Before:
12+
13+
```javascript
14+
import eslint from '@eslint/js';
15+
import handleErrors from 'eslint-plugin-handle-errors';
16+
17+
export default [
18+
eslint.configs.recommended, // optional
19+
handleErrors.configs['flat/recommended'],
20+
];
21+
```
22+
23+
- After:
24+
25+
```javascript
26+
import eslint from '@eslint/js';
27+
import handleErrors from 'eslint-plugin-handle-errors';
28+
29+
export default [
30+
eslint.configs.recommended, // optional
31+
handleErrors.configs.recommended,
32+
];
33+
```
34+
35+
- For legacy esling config:
36+
37+
- Before:
38+
39+
```json
40+
{
41+
"extends": ["plugin:handle-errors/recommended"]
42+
}
43+
```
44+
45+
- After:
46+
47+
```json
48+
{
49+
"extends": ["plugin:handle-errors/legacy-recommended"]
50+
}
51+
```
52+
53+
- [#5](https://github.com/Nodge/eslint-plugin-handle-errors/pull/5) [`8920b2c`](https://github.com/Nodge/eslint-plugin-handle-errors/commit/8920b2c6e0fa0576a3d61b4bdb00ee784c0e2fd3) Thanks [@Nodge](https://github.com/Nodge)! - feat: Support passing an error to a promise reject function like this:
54+
55+
```ts
56+
new Promise((resolve, reject) => {
57+
try {
58+
// do something
59+
} catch (err) {
60+
reject(err);
61+
}
62+
});
63+
```
64+
65+
Calling the reject function here is valid error handling.
66+
67+
### Patch Changes
68+
69+
- [#5](https://github.com/Nodge/eslint-plugin-handle-errors/pull/5) [`8920b2c`](https://github.com/Nodge/eslint-plugin-handle-errors/commit/8920b2c6e0fa0576a3d61b4bdb00ee784c0e2fd3) Thanks [@Nodge](https://github.com/Nodge)! - chore: Upgrade eslint to v9 and pin dependencies
70+
71+
- [#5](https://github.com/Nodge/eslint-plugin-handle-errors/pull/5) [`8920b2c`](https://github.com/Nodge/eslint-plugin-handle-errors/commit/8920b2c6e0fa0576a3d61b4bdb00ee784c0e2fd3) Thanks [@Nodge](https://github.com/Nodge)! - test: Add integration tests againt node 18/20/22 and eslint 7/8/9

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default [
4444

4545
```json
4646
{
47-
"extends": ["plugin:handle-errors/legacy-recommended"],
47+
"extends": ["plugin:handle-errors/legacy-recommended"]
4848
}
4949
```
5050

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-handle-errors",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"description": "ESLint rules for handling errors",
55
"keywords": [
66
"eslint",

0 commit comments

Comments
 (0)