Skip to content

feat: require PascalCase Vue component filenames - #212

Merged
sinemacula-ben merged 1 commit into
masterfrom
feature/pascal-case-vue-components
Nov 17, 2026
Merged

sinemacula-ben merged 1 commit into
masterfrom
feature/pascal-case-vue-components

Conversation

@sinemacula-ben

@sinemacula-ben sinemacula-ben commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Vue component filenames move from kebab-case to PascalCase, the more common Vue convention.

  • js/eslint/vue.js: check-file/filename-naming-convention holds **/*.vue to PASCAL_CASE (UserCard.vue).
  • js/biome.shared.json: an override for **/components/** accepts PascalCase as well as kebab-case, so a component's tests and stories share its name (UserCard/UserCard.test.ts, UserCard.stories.ts). Everywhere else stays kebab-case only, and camelCase is still rejected inside components/.
  • README: the Vue layer section says what it now requires.

Choices worth flagging

  • strictCase: false in the override. Biome's default rejects consecutive capitals, so names like UIButton would fail. It only affects the camelCase and PascalCase checks, so kebab-case is unchanged.
  • The override is scoped by directory. Biome can't tie a companion file to the .vue beside it, so components/ is the boundary. React consumers get the same allowance there, which matches that ecosystem too.
  • @biomejs/biome 2.5.6 as an exact devDependency, the version the README has consumers pin, so the new test runs the Biome they run. It isn't installed for consumers, and the tests stay out of the published package.
  • Released as feat, as feat: enforce filename casing and import grouping, add a vue preset #96 introduced the kebab-case rule. Consumers with kebab-case .vue files fail lint when they upgrade, until they rename.

Known gap, not changed here

Qlty drops Biome's useFilenamingConvention diagnostics: the rdjson output carries no location for a filename rule, and Qlty discards location-less results. So the shared kebab-case rule for .ts files has never failed a consumer's qlty check. Only editors and direct Biome runs see it. The Vue rule runs through ESLint, which Qlty reports, so it is enforced. Moving the TS filename rule to ESLint's check-file would close the gap, as its own change.

Verification

  • js/eslint/__tests__/vue.test.js: PascalCase passes, including consecutive capitals; kebab, camel and snake case are reported. Both tests fail on master.
  • js/__tests__/biome.test.js runs Biome 2.5.6 against a consumer extending the real shared config. It fails if the override is removed or strictCase goes back to true.
  • End to end through Qlty: a consumer on the fix: make Biome load the project config under qlty #204 layout (.qlty/configs/biome.json extending ./biome.shared.json) with its source pointed at this branch loads the config without error. Biome's raw output reports a PascalCase file outside components/ and a camelCase one inside it, and passes a PascalCase test file inside it.
  • A consumer config with its own overrides keeps the shared one (checked against 2.5.6).
  • npm run test:js: 592/592. npm run lint:js: clean. qlty check --all, qlty fmt --all, qlty smells --all: clean. npm pack --dry-run ships no tests.

The Vue layer now holds .vue files to PascalCase, and the shared Biome
config accepts PascalCase as well as kebab-case under any components/
directory, so a component's tests and stories can share its name.
strictCase is off there so that names with consecutive capitals, such
as UIButton, pass.
@sinemacula-ben
sinemacula-ben force-pushed the feature/pascal-case-vue-components branch from fab16ab to 68c435d Compare November 17, 2026 20:03
@sinemacula-ben
sinemacula-ben merged commit e356844 into master Nov 17, 2026
21 checks passed
@sinemacula-ben
sinemacula-ben deleted the feature/pascal-case-vue-components branch November 17, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant