Note that .editorconfig settings include quote_type.#12780
Note that .editorconfig settings include quote_type.#12780midgleyc wants to merge 1 commit intoprettier:mainfrom
.editorconfig settings include quote_type.#12780Conversation
|
I didn't know this. Not sure if we should support this non-standard property. |
|
If you don't support it, I don't believe there's a way to do what I currently do: single quotes for TypeScript (as Angular recommends), double quotes for HTML / CSS. EditorConfig is a nice way to do file extension-specific configuration. |
|
By the git history, quote_type is one of the proposed domain-specific properties, under the editorconfig project: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties/98f8059ac82af0bea2d5af5f64f0dcc79c015ab1#ideas-for-domain-specific-properties |
{
singleQuote: true,
overrides: {
files: ['**/*.html', '**/*.css'],
options: {
singleQuote: false,
}
}
} |
Prettier picks up quote style from .editorconfig: prettier/prettier#12780
|
Sorry, we are not going to read non-standard keys. |
|
Support for this already exists, no? This is just accompanying documentation. |
|
Ah, you are right, it's supported, since people may already use it, I guess we'll just keep it as undocumented feature. |
Description
Note that
.editorconfigsettings includequote_type.They can include all values mapped in editorconfig-to-prettier. I've been using
quote_typelocally for a while and was surprised to see it not in the docs.Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨