Skip to content

Commit 64f4337

Browse files
docs(throw-error): add strict defaults to rule meta
1 parent f67c464 commit 64f4337

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/rules/throw-error.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export const throwErrorRule = ruleCreator({
1515
docs: {
1616
description:
1717
'Enforce passing only `Error` values to `throwError`.',
18-
recommended: 'strict',
18+
recommended: {
19+
strict: [{ allowThrowingAny: false, allowThrowingUnknown: false }],
20+
},
1921
requiresTypeChecking: true,
2022
},
2123
messages: {

tests/package.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ describe('package', () => {
6969
expect(recommendedRules).toHaveProperty(fullRuleName);
7070
} else if (ruleRec === 'strict') {
7171
expect(strictRules).toHaveProperty(fullRuleName);
72+
expect(strictRules[fullRuleName as keyof typeof strictRules]).toBe('error');
7273
} else {
7374
expect.fail(`Invalid recommended value for rule ${fullRuleName}: ${ruleRec}`);
7475
}

0 commit comments

Comments
 (0)