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

Enhance Variable Formatting: Convert Double Quotes to Single Quotes #512

Open
Anion11 opened this issue Oct 1, 2024 · 2 comments
Open
Labels
good first issue Good for newcomers help wanted We are looking for community help type: enhancement Functionality that enhances existing features

Comments

@Anion11
Copy link

Anion11 commented Oct 1, 2024

Request / Idea

I would like to be able to correct double quotes to single quotes in variables (specifically in variables, not attributes)

Input

const variable = "test"

or

+mixin-name({ text: "test" })

Expected Output

const variable = 'test'

or

+mixin-name({ text: 'test' })

Maybe there is already such a function and I'm doing something wrong?

My .prettierrc:

{
  "plugins": ["@prettier/plugin-pug"],
  "printWidth": 100,
  "tabWidth": 2,
  "useTabs": false,
  "semi": false,
  "singleQuote": true,
  "quoteProps": "as-needed",
  "trailingComma": "none",
  "bracketSpacing": true,
  "bracketSameLine": false,
  "arrowParens": "avoid",
  "htmlWhitespaceSensitivity": "css",
  "singleAttributePerLine": true,
  "pugIdNotation": "as-is",
  "pugAttributeSeparator": "none",
}

@Shinigami92
Copy link
Member

Shinigami92 commented Oct 2, 2024

Did you tried all combinations with pugSingleQuote?

@Anion11
Copy link
Author

Anion11 commented Oct 2, 2024

yes, pugSingleQuote doesn't help either

@Shinigami92 Shinigami92 added type: enhancement Functionality that enhances existing features help wanted We are looking for community help good first issue Good for newcomers labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted We are looking for community help type: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

2 participants