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

fix: default prettier printWidth: 120 not work as expected #573

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

HADB
Copy link
Contributor

@HADB HADB commented Aug 4, 2024

Description

Default prettier printWidth: 120 not work for css as pointed here:

export interface VendoredPrettierOptionsRequired {
/**
* Specify the line length that the printer will wrap on.
* @default 120
*/
printWidth: number

printWidth: 120 is only set for markdown / slidev, others will fallback to use prettier's default 80.

In the following reproduction project:

stackblitz.com/~/github.com/HADB/eslint-config-prettier-printWidth-bug-reproduction?file=assets/styles.css

body {
  font-family: 'LXGW WenKai GB', 'LXGW WenKai', '仿宋', 'FangSong', 'STFangsong', 'serif';
}

will be formatted to:

body {
  font-family: 'LXGW WenKai GB', 'LXGW WenKai', '仿宋', 'FangSong', 'STFangsong',
    'serif';
}

Linked Issues

Fix #572

Additional context

Copy link

netlify bot commented Aug 4, 2024

Deploy Preview for melodious-froyo-4871f8 ready!

Name Link
🔨 Latest commit 8dda464
🔍 Latest deploy log https://app.netlify.com/sites/melodious-froyo-4871f8/deploys/66af753704a36a0008a2e0b1
😎 Deploy Preview https://deploy-preview-573--melodious-froyo-4871f8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu merged commit 8942cc0 into antfu:main Aug 4, 2024
4 checks passed
pnodet added a commit to nivalis-studio/eslint-config that referenced this pull request Aug 13, 2024
* antfu/main: (128 commits)
  chore: update deps
  fix: migrate plugin eslint-comments (antfu#577)
  chore: release v2.25.1
  fix: migrate to new vitest plugin, close antfu#576
  chore: release v2.25.0
  chore: update deps
  chore: typo (antfu#574)
  fix: default prettier `printWidth: 120` not work as expected (antfu#573)
  chore: release v2.24.1
  docs: update readme for neovim setup (antfu#559)
  feat: upgrade `@typescript-eslint` to v8 stable
  chore: update snap
  chore: release v2.24.0
  feat: upgrade `@types/eslint`
  chore: release v2.23.2
  chore: update deps
  chore: release v2.23.1
  chore: update deps
  chore: extract isInEditorEnv function (antfu#556)
  chore: update eslint-plugin-svelte (antfu#553)
  ...
in5net pushed a commit to in5net/eslint-config that referenced this pull request Mar 13, 2025
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

Successfully merging this pull request may close these issues.

default prettier printWidth: 120 not work as expected
2 participants