Configuration
.oxfmtrc.json(c)
We support .json or .jsonc config file.
Almost all formatting options are compatible with Prettier's options.
We also recommend adding the $schema to the config file:
{
"$schema": "./node_modules/oxfmt/configuration_schema.json"
}For full reference, see also Configuration file reference.
By default, oxfmt automatically tries to find the nearest .oxfmtrc.json or .oxfmtrc.jsonc file from the current working directory. If not found, the default configuration options are used.
You can also specify your config file with the -c yourconfig.jsonc flag.
.editorconfig
.editorconfig file is also supported by Oxfmt.
And these fields will override default Oxfmt options.
end_of_line:endOfLineindent_style:useTabsindent_size:tabWidthmax_line_length:printWidthinsert_final_newline:insertFinalNewline
If both .editorconfig and .oxfmtrc.json has the same field, .oxfmtrc will win.
For those properties, glob path overrides also work.
By default, oxfmt automatically tries to find the nearest .editorconfig file from the current working directory.
Unlike Prettier, Oxfmt does not respect root = true and does not merge nested .editorconfig files.