-
-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I'm using eslint-plugin-vue.
- 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?
9.34.0
What version of eslint-plugin-vue
and vue-eslint-parser
are you using?
What did you do?
Configuration
import { defineConfig } from "eslint/config";
import globals from 'globals'
import js from "@eslint/js";
import vue from 'eslint-plugin-vue'
export default defineConfig([{
files: ["**/*.js", "**/*.vue"],
plugins: { js, vue },
extends: [
js.configs.recommended,
...vue.configs['flat/recommended'],
],
languageOptions: {
sourceType: 'module',
globals: {
...globals.browser,
...globals.jest,
}
},
rules: {
indent: ["error", 2],
"vue/no-v-html": "off",
"keyword-spacing": "warn",
"object-curly-spacing": ["warn", "always", { objectsInObjects: true }],
"comma-spacing": ["warn", { before: false, after: true }],
"key-spacing": ["warn", { afterColon: true }],
"no-unused-vars": ["error", { argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }],
"vue/valid-v-model": "off",
"vue/no-deprecated-v-on-native-modifier": "warn", // TODO: Fix the issues
"vue/multi-word-component-names": "warn", // TODO: Fix the issues
"vue/no-deprecated-destroyed-lifecycle": "warn", // TODO: Fix the issues
"vue/no-deprecated-v-bind-sync": "warn", // TODO: Fix the issues
"vue/no-mutating-props": "warn", // TODO: Fix the issues
"vue/no-deprecated-slot-attribute": "warn", // TODO: Fix the issues
"vue/no-useless-template-attributes": "warn", // TODO: Fix the issues
"vue/no-deprecated-filter": "warn", // TODO: Fix the issues
},
}])
<template v-slot:head(foo.bar)>
For example in the following context:
// App.vue
<script setup>
import Foobar from './Foobar.vue'
</script>
<template>
<Foobar>
<template v-slot:head(foo.bar)>
foo bar
</template>
</Foobar>
</template>
// Foobar.vue
<template>
<div>
<slot name="head(foo.bar)" />
</div>
</template>
What did you expect to happen?
This should report no error
What actually happened?
It reports vue/no-parsing-error
and vue/valid-v-slot
errors
Link to Minimal Reproducible Example
Additional comments
I originally reported this in vuejs/eslint-plugin-vue#1229 (comment) and was suggested to report it here in vuejs/eslint-plugin-vue#1229 (comment) because of the vue/no-parsing-error
lint.
Metadata
Metadata
Assignees
Labels
No labels