Skip to content

Commit a234dac

Browse files
[ci] add match-component-import-name eslint rule (#5971)
## Summary Added ESLint rule to enforce imported Vue component names match their file names. Inspired by this PR which would have never been necessary in the first place had this rule been in place: - #5919 ## Changes - **What**: Enabled [`vue/match-component-import-name`](https://eslint.vuejs.org/rules/match-component-import-name.html) rule in ESLint configuration ## Review Focus Impact on existing imports that use aliases (e.g., importing `MyComponent.vue` as `MyComp`). The rule enforces that import aliases match the component's name definition. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5971-ci-add-match-component-import-name-eslint-rule-2866d73d3650811bba97c1ddcc75df5d) by [Unito](https://www.unito.io)
1 parent 1461e37 commit a234dac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default defineConfig([
119119
'vue/no-restricted-class': ['error', '/^dark:/'],
120120
'vue/multi-word-component-names': 'off', // TODO: fix
121121
'vue/no-template-shadow': 'off', // TODO: fix
122+
'vue/match-component-import-name': 'error',
122123
/* Toggle on to do additional until we can clean up existing violations.
123124
'vue/no-unused-emit-declarations': 'error',
124125
'vue/no-unused-properties': 'error',

0 commit comments

Comments
 (0)