svelte-intellij
svelte-intellij copied to clipboard
EditorConfig options specific to IntelliJ are not applied in svelte components
I tried to overwrite IntelliJ's default formatting options with a .editorconfig
file. It works for the default options (like indent_size
) but not for IntelliJ specific one (prefixed with ij_
).
A little example:
# .editorconfig
root = true
[*]
indent_size = 2
indent_style = space
[{*.js, *.svelte}]
indent_size = 4
ij_javascript_force_semicolon_style = true
ij_javascript_use_semicolon_after_statement = true
ij_javascript_force_quote_style = true
ij_javascript_use_double_quotes = false
ij_javascript_spaces_within_imports = true
// util.js
export const utilityFunction = () => 34;
<!-- Component.js -->
<script>
import {utilityFunction} from "util";
const abc = utilityFunction()
</script>
<span>
{abc}
</span>
I would expect the following changes after formatting the component file:
--- a/JsComponent.svelte
+++ b/JsComponent.svelte
@@ -1,7 +1,7 @@
<script>
- import {utilityFunction} from "util";
+ import { utilityFunction } from 'util';
- const abc = utilityFunction()
+ const abc = utilityFunction();
</script>
<span>
These changes happen after configuring the code style in IntelliJ for JavaScript. So it seems that these additional options are ignored in the custom svelte HTML language.