You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sure the problem is a parser problem. (If you are not sure, search for the issue in eslint-plugin-vue repo and open the issue in eslint-plugin-vue repo if there is no solution.
I have tried restarting my IDE and the issue persists.
I have updated to the latest version of the packages.
What version of ESLint are you using?
8.57.1
What version of eslint-plugin-vue and vue-eslint-parser are you using?
<!-- 1_PascalCase in template works fine -->
<!-- eslint-disable-next-line vue/component-name-in-template-casing -->
<EditModal :data="editModal" />
<!-- 2_kebab-case in template works bad -->
<create-modal :data="createModal" />
</t-space>
</t-config-provider>
</template>
<script setup lang="ts">
import { AddIcon, CloudDownloadIcon, CloudUploadIcon, DiscountIcon, JumpIcon } from 'tdesign-icons-vue-next';
import { ref } from 'vue';
import TDesignLogo from '../public/tdesign-logo.svg';
import ViteLogo from './assets/svg/vite-logo.svg';
// problem there
import CreateModal from './components/create-modal/index.vue';
import EditModal from './components/edit-modal/index.vue';
// same variable name but different case
const editModal = ref({});
const createModal = ref({});
The problem maybe a matter of unhealthy variable style: Same variable name but different case.
In runtime, code works without confusing problem but eslint. Lint thinks 'create-modal /' in template is using createModal not CreateModal in script.
I read vue's style guide, it doesn't mention style in this case. Not sure if this is a parser issus or a code style issue that should be avoided. If this is a style issue, please close it and I will seek to documention.
The text was updated successfully, but these errors were encountered:
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.57.1
What version of
eslint-plugin-vue
andvue-eslint-parser
are you using?What did you do?
Configuration
<!-- 1_PascalCase in template works fine --> <!-- eslint-disable-next-line vue/component-name-in-template-casing --> <EditModal :data="editModal" /> <!-- 2_kebab-case in template works bad --> <create-modal :data="createModal" /> </t-space> </t-config-provider> </template> <script setup lang="ts"> import { AddIcon, CloudDownloadIcon, CloudUploadIcon, DiscountIcon, JumpIcon } from 'tdesign-icons-vue-next'; import { ref } from 'vue'; import TDesignLogo from '../public/tdesign-logo.svg'; import ViteLogo from './assets/svg/vite-logo.svg'; // problem there import CreateModal from './components/create-modal/index.vue'; import EditModal from './components/edit-modal/index.vue'; // same variable name but different case const editModal = ref({}); const createModal = ref({});
What did you expect to happen?
What actually happened?
Link to Minimal Reproducible Example
https://github.com/ngyyuusora/vue-compname-bug-report-/blob/main/src/App.vue
Additional comments
The problem maybe a matter of unhealthy variable style: Same variable name but different case.
In runtime, code works without confusing problem but eslint. Lint thinks 'create-modal /' in template is using createModal not CreateModal in script.
I read vue's style guide, it doesn't mention style in this case. Not sure if this is a parser issus or a code style issue that should be avoided. If this is a style issue, please close it and I will seek to documention.
The text was updated successfully, but these errors were encountered: