We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint-disable
<template>
Checklist
Tell us about your environment
Please show your full configuration:
// parser import parserTypescript from "@typescript-eslint/parser" import parserVue from "vue-eslint-parser" // plugins import globals from "globals" import pluginUnicorn from "eslint-plugin-unicorn" import pluginTypescript from "@typescript-eslint/eslint-plugin" import pluginVue from "eslint-plugin-vue" // shared rules const sharedRules = { "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/no-unused-vars": "off", "unicorn/filename-case": [ "error", { cases: { pascalCase: true, camelCase: true, kebabCase: false }, ignore: [ "globals.d.ts", "vite-env.d.ts", "vite.config.ts", "vite-environment.d.ts", String.raw`\.spec.ts(x)?`, String.raw`\.types.ts(x)?`, String.raw`\.stories.ts(x)?`, String.raw`\.styled.ts(x)?`, String.raw`\.styles.ts(x)?` ] } ], "unicorn/no-abusive-eslint-disable": "off", "unicorn/no-useless-undefined": "off", "unicorn/numeric-separators-style": "off", "unicorn/prefer-global-this": "off", "unicorn/prevent-abbreviations": "off" } // config object export default [ { ignores: ["public", "build", "dist", "node_modules", "coverage", ".nuxt", ".output"] }, { files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.cjs", "**/*.mjs"], languageOptions: { parser: parserTypescript, globals: globals.builtin }, plugins: { "unicorn": pluginUnicorn, "@typescript-eslint": pluginTypescript }, rules: { ...pluginUnicorn.configs.recommended.rules, ...pluginTypescript.configs.recommended.rules, ...sharedRules } }, { files: ["**/*.vue"], languageOptions: { parser: parserVue, parserOptions: { parser: parserTypescript } }, plugins: { "unicorn": pluginUnicorn, "vue": pluginVue, "@typescript-eslint": pluginTypescript }, rules: { ...pluginUnicorn.configs.recommended.rules, ...pluginVue.configs.recommended.rules, ...pluginTypescript.configs.recommended.rules, ...sharedRules, "vue/script-setup-uses-vars": "error", "vue/no-v-html": "error" } } ]
What did you do?
<template> <!-- eslint-disable vue/no-v-html --> <div> <h1>Test Heading</h1> <div v-if="testHtml" v-html="testHtml"></div> </div> </template> <script setup lang="ts"> const testHtml = '<h2>HTML</h2>'; </script>
What did you expect to happen? The rule vue/no-v-html should be disabled.
vue/no-v-html
What actually happened? The rule still applies to the file, ignoring any eslint-disable comments within or outside the <template> tags.
Repository to reproduce this issue https://stackblitz.com/edit/vitejs-vite-7gdlmv?file=src%2FApp.vue You can either download the repro case or just open a new terminal within StackBlitz and execute npm run lint.
npm run lint
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
The rule
vue/no-v-html
should be disabled.What actually happened?
The rule still applies to the file, ignoring any eslint-disable comments within or outside the
<template>
tags.Repository to reproduce this issue
https://stackblitz.com/edit/vitejs-vite-7gdlmv?file=src%2FApp.vue
You can either download the repro case or just open a new terminal within StackBlitz and execute
npm run lint
.The text was updated successfully, but these errors were encountered: