Skip to content

Commit 3729454

Browse files
authored
fix(render-result-naming-convention): use disjunction to separate allowed names (#529)
1 parent ea85450 commit 3729454

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/render-result-naming-convention.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export type MessageIds = 'renderResultNamingConvention';
1414
type Options = [];
1515

1616
const ALLOWED_VAR_NAMES = ['view', 'utils'];
17-
const ALLOWED_VAR_NAMES_TEXT = ALLOWED_VAR_NAMES.map(
18-
(name) => `\`${name}\``
19-
).join(', ');
17+
const ALLOWED_VAR_NAMES_TEXT = ALLOWED_VAR_NAMES.map((name) => `\`${name}\``)
18+
.join(', ')
19+
.replace(/, ([^,]*)$/, ', or $1');
2020

2121
export default createTestingLibraryRule<Options, MessageIds>({
2222
name: RULE_NAME,

0 commit comments

Comments
 (0)