Skip to content

First line of Vue style block not being formatted #766

@jfitzsimmons2

Description

@jfitzsimmons2

Describe the bug

Not sure if this belongs here or in @antfu/eslint-plugin-format but I provided a repo to demonstrate the issue I'm seeing. I have a project with the eslint-config setup and formatting enabled for css.

When enabling the css formatter, the first line of the style block is not affected by the format.

In App.vue I have the following CSS:

Image

When running the "lint" task in the project, it only fixes lines that are not first.

Image

I'm not sure what could be causing this behavior. It appears to be a bug but I'm not sure where.

Reproduction

https://github.com/jfitzsimmons2/eslint-format-issue

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    Memory: 8.03 GB / 31.73 GB
  Binaries:
    Node: 22.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.4.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.15.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Chrome: 140.0.7339.81
    Edge: Chromium (140.0.3485.54)
    Firefox: 143.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.22621.3527

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.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions