Skip to content
New issue

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

when '&&' appears at the end, it can cause CSS formatting errors #607

Open
5 of 7 tasks
pany-ang opened this issue Sep 10, 2024 · 2 comments
Open
5 of 7 tasks

when '&&' appears at the end, it can cause CSS formatting errors #607

pany-ang opened this issue Sep 10, 2024 · 2 comments

Comments

@pany-ang
Copy link

pany-ang commented Sep 10, 2024

Describe the bug

  1. The 'template' section contains the '&&' operator at the end of the line
  2. The 'style' section contains content that needs to be formatted

If both of the above conditions are met simultaneously, the formatting will be interrupted or an "incorrect formatting" will occur


  1. 'template' 板块存在 '&&' 运算符在行末尾
  2. 'style' 板块存在待格式化的内容
    
    如果同时满足上面两个条件,那么格式化将被中断或者出现 "错误的格式化"

Screenshot of when interrupted

被中断时的截图

12211f15-1ae8-4ae8-ad2c-d907fea8cdae


Reproduction

https://github.com/pany-ang/issue-eslint-config

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 47.82 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.15.1 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.5.0 - ~/.npm-global/bin/pnpm
  Browsers:
    Chrome: 128.0.6613.120
    Edge: 128.0.2739.67
    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.

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!)
@pany-ang
Copy link
Author

如果将 eslint.config.js 中的 formatters 设置为 false,将不会出现该问题

If you set 'formatters' in 'eslint.config.js' to 'false', the issue will not occur

@pany-ang
Copy link
Author

演示「中断」和「错误的格式化」

Demo of 'Interrupt' and 'Incorrect Format'

20240910152638_rec_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant