Skip to content

Commit 92d75cf

Browse files
committed
Make sure we require correct names for pages
1 parent f5cf8d4 commit 92d75cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/environment/eslint-plugin-local/ruleComponentNames.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getExpectedName(filepath) {
2727

2828
if (isPageComponent.match(filepath)) {
2929
return `Page${filepath
30-
.replace(/^.+\/src\/pages\/([\w.]+)(\/index\.js|\.js)/, '$1')
30+
.replace(/^.+\/src\/pages((?:\/[A-Z][A-z]*)+).+$/, '$1')
3131
.replace(/\//g, '')}`
3232
}
3333

0 commit comments

Comments
 (0)