Skip to content

Commit 05664f3

Browse files
Rel1cxCopilot
andauthored
Update packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts
Co-authored-by: Copilot <[email protected]> Signed-off-by: REL1CX <[email protected]>
1 parent 3080de7 commit 05664f3

File tree

1 file changed

+1
-1
lines changed
  • packages/plugins/eslint-plugin-react-naming-convention/src/rules

1 file changed

+1
-1
lines changed

packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function create(context: RuleContext<MessageID, Options>): RuleListener {
103103
function validate(name: string, casing: Case = rule, ignores = excepts) {
104104
if (ignores.some((pattern) => pattern.test(name))) return true;
105105
const filteredName = name.match(/[\w-]/gu)?.join("") ?? "";
106-
if (filteredName.length === 0) return false;
106+
if (filteredName.length === 0) return true;
107107
return match(casing)
108108
.with("PascalCase", () => RE.PASCAL_CASE.test(filteredName))
109109
.with("camelCase", () => RE.CAMEL_CASE.test(filteredName))

0 commit comments

Comments
 (0)