File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,16 @@ throwError(() => new Error("Kaboom!"));
3838| ` allowThrowingUnknown ` | Whether to always allow throwing values typed as ` unknown ` . | Boolean | ` true ` |
3939
4040<!-- end auto-generated rule options list -->
41+
42+ ## When Not To Use It
43+
44+ If you don't care about throwing values that are not ` Error ` objects, then you don't need this rule.
45+ However, keep in mind that, while JavaScript _ allows_ throwing any value,
46+ most developer may find this behavior surprising or inconvenient to handle.
47+
48+ Type checked lint rules are more powerful than traditional lint rules, but also require configuring type checked linting.
49+
50+ ## Resources
51+
52+ - [ Rule source] ( https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/src/rules/throw-error.ts )
53+ - [ Test source] ( https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/tests/rules/throw-error.test.ts )
You can’t perform that action at this time.
0 commit comments