Skip to content

Commit

Permalink
docs: update readme with rule screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Akronae committed Jun 2, 2024
1 parent f13547e commit 81bd8ab
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# eslint-plugin-exception-handling

10kB possibly unhandled exceptions linter.
<p align="center">
<img width="350" src="https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/43524856-1de6-4dac-982f-47323ea82ee4">
</p>
<h1 align="center">
<sup>eslint-plugin-exception-handling</sup>
<br>
<a href="https://npm.im/eslint-plugin-exception-handling"><img src="https://badgen.net/npm/v/eslint-plugin-exception-handling"></a> <a href="https://npm.im/eslint-plugin-exception-handling"><img src="https://badgen.net/npm/dm/eslint-plugin-exception-handling"></a>
</h1>

![image](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/f77dd81a-09c5-4f41-a3f1-d017df1bb1b9)

| no-unhandled | might-throw | use-error-cause |
| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| ![no-unhandled](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/a5a1e70a-15f6-4e2b-b585-54846e9dc3ef) | ![might-throw](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/26ee8fb8-bd0e-4b72-bb3f-624635db9b0d) | ![cause](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/f813c112-2f6a-49e7-954c-cace2819d5e8) |

# Installation

```bash
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/might-throw.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Warns about function calls that might throw exceptions (`exception-handling/might-throw`)

<!-- end auto-generated rule header -->

![might-throw](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/26ee8fb8-bd0e-4b72-bb3f-624635db9b0d)
2 changes: 2 additions & 0 deletions docs/rules/no-unhandled.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Warns about function calls that might throw exceptions and are not handled at all further up the stack (`exception-handling/no-unhandled`)

<!-- end auto-generated rule header -->

![no-unhandled](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/a5a1e70a-15f6-4e2b-b585-54846e9dc3ef)
4 changes: 3 additions & 1 deletion docs/rules/use-error-cause.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# On `Error` re-thrown, forces the use of `cause` property in order to preserve stack traces.
# On `Error` re-thrown, forces the use of `cause` property in order to preserve stack traces (`exception-handling/use-error-cause`)

<!-- end auto-generated rule header -->

![cause](https://github.com/Akronae/eslint-plugin-exception-handling/assets/17302866/f813c112-2f6a-49e7-954c-cace2819d5e8)

[See `ErrorOptions.cause` on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause)

0 comments on commit 81bd8ab

Please sign in to comment.