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
{{ message }}
Repository navigation
Comments array order is incorrect when parsing multiple script blocks #264
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.0, 9.29.0
What version of eslint-plugin-vue and vue-eslint-parser are you using?
vue-eslint-parser@0.0.0
eslint-plugin-vue@9.33.0, @10.2.0
What did you do?
<script lang="ts" setup>
const test = () => {// This comment goes secondconsole.log('hello')}
</script>
<script lang="ts">
/** * This comment goes first.*/exportdefault {}
</script>
<template>
<div@click="test" />
</template>
What did you expect to happen?
The comments array should be ordered according to their position in the original source code.
Otherwise, this could impact the functionality of certain rules, such as @eslint-stylistic/padded-blocks. For example, when using sourceCode.getTokenAfter(node, { includeComments: true }), the incorrect comment order could lead to inaccurate results. See vuejs/eslint-plugin-vue#2764.
Activity