logaretm / vee-validate

✅ Painless Vue forms
https://vee-validate.logaretm.com/v4
MIT License
10.8k stars 1.26k forks source link

Form and Field trigger eslint's vue/no-reserved-component-names rule #4077

Closed simevo closed 1 year ago

simevo commented 1 year ago

What happened?

using vee-validate in Declarative Components mode with the approach outlined in the README conflicts with https://github.com/vuejs/eslint-plugin-vue

Reproduction steps

I enabled the default eslint config for vite:

"eslint": "^8.31.0",
"eslint-plugin-vue": "^9.8.0",

running eslint --ext .js,.vue --ignore-path .gitignore --fix src on this code:

import { Form } from 'vee-validate'

triggers the rule vue/no-reserved-component-names.

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

Relevant log output

477:5  error  Name "Form" is reserved in HTML  vue/no-reserved-component-names

Demo link

none

Code of Conduct

simevo commented 1 year ago

this is a valid fix:

import { Form as VeeForm } from 'vee-validate';
logaretm commented 1 year ago

Yep, nothing I can do about that at the moment. The chosen component names are done for simplicity. You will have to rename them to follow that eslint rule like you noted.