redhat-developer / redhat-developer/vscode-yaml
Format doesn’t respect prettier configuration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Prettier supports configuration files. https://prettier.io/docs/en/configuration.html
However, the formatter or this extension ignores use them.
I have the following prettier.config.js:
module.exports = {
proseWrap: 'always',
singleQuote: true,
trailingComma: 'all',
};
and the following .editorconfig:
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true
[COMMIT_EDITMSG]
max_line_length = 72
However, my yaml code was suddenly being formatted using double quotes. I didn’t check any other options, the quotes just stood out.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the YAML formatting case in VS Code using the supplied prettier.config.js and .editorconfig examples, then trace how the extension selects formatter configuration. Done means YAML formatting honors the configured single quotes and other relevant options instead of falling back to double quotes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100