.editorconfig file. Enable this with the --editorconfig CLI flag or the editorconfig: true option in your config.
Supported properties
When EditorConfig integration is active, JS Beautify reads the following.editorconfig properties and maps them to its own options:
| EditorConfig property | JS Beautify option | Notes |
|---|---|---|
indent_style | indent_with_tabs / indent_char | tab sets indent_with_tabs: true; space sets indent_with_tabs: false |
indent_size | indent_size | |
max_line_length | wrap_line_length | off maps to 0 (disabled) |
end_of_line | eol | lf → "\n", crlf → "\r\n", cr → "\r" |
insert_final_newline | end_with_newline | true / false |
Any option you pass explicitly alongside
--editorconfig takes precedence over what EditorConfig specifies. EditorConfig values fill in where you have not provided an explicit override.Example .editorconfig
CLI usage
Pass the--editorconfig flag to activate EditorConfig lookup:
Library usage
Seteditorconfig: true in the options object:
Python note
The Pythonjsbeautifier package exposes an editorconfig option on its options object, but .editorconfig file lookup and the --editorconfig CLI flag are supported in the JavaScript implementation. Verify against the installed Python package version if you need this feature there.