The editorconfig spec does not contain quote_type, but some editors & formatters implement support for it, like VSCode and IntelliJ.
It is listed as a domain-specific property: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#ideas-for-domain-specific-properties
Prettier also supports this property within .editorconfig as an "undocumented feature" -> prettier/prettier#12780
Implemented here: https://github.com/prettier/prettier/blob/af5a7c074d54fd91015f6cdc05d1bb0f5dcfaa18/src/config/editorconfig/editorconfig-to-prettier.js#L38-L43
I think this can be easily converted to the oxfmt singleQuote property.
quote_type = single -> "singleQuote": true
quote_type = double -> "singleQuote": false
quote_type = auto -> Ignore
This also causes a formatting difference with Prettier.
.editorconfig
[*.ts]
quote_type = single
Input
import { StatusCodes } from 'http-status-codes';
Output
import { StatusCodes } from "http-status-codes";
The editorconfig spec does not contain
quote_type, but some editors & formatters implement support for it, like VSCode and IntelliJ.It is listed as a domain-specific property: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#ideas-for-domain-specific-properties
Prettier also supports this property within
.editorconfigas an "undocumented feature" -> prettier/prettier#12780Implemented here: https://github.com/prettier/prettier/blob/af5a7c074d54fd91015f6cdc05d1bb0f5dcfaa18/src/config/editorconfig/editorconfig-to-prettier.js#L38-L43
I think this can be easily converted to the oxfmt
singleQuoteproperty.quote_type = single->"singleQuote": truequote_type = double->"singleQuote": falsequote_type = auto-> IgnoreThis also causes a formatting difference with Prettier.
.editorconfigInput
Output