sxzz/eslint-config

[BUG] vue/html-self-closing eslint rule fix error

Closed this issue · 1 comments

Describe the bug

eslint config as below:

// eslint.config.js
import { sxzz } from "@sxzz/eslint-config";
export default sxzz(
  [
    /* your custom config */
  ],
  { vue: true, prettier: true },
);

App.vue file:

<script setup lang="ts"></script>

<template>
  <div>
    <!-- OK -->
    <img />
    <!-- fix on save -->
    <img>
    <!-- it will become <img //> -->
  </div>
</template>

<style scoped></style>

Reproduction

https://github.com/Alkaidcc/eslint-config-repro

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M2
    Memory: 2.14 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/Library/Caches/fnm_multishells/73841_1703430144978/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/73841_1703430144978/bin/npm
    pnpm: 8.12.0 - ~/Library/pnpm/pnpm
    bun: 1.0.0 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 120.0.6099.129
    Safari: 17.2.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Fixed, and released as @sxzz/eslint-config@3.7.6