Skip to content

Instantly share code, notes, and snippets.

@alexeychikk
Last active May 14, 2023 13:42
Show Gist options
  • Save alexeychikk/27aeb61345cde5ff47e8a1ce5c1abaa9 to your computer and use it in GitHub Desktop.
Save alexeychikk/27aeb61345cde5ff47e8a1ce5c1abaa9 to your computer and use it in GitHub Desktop.
Config for haxe-formatter that resembles default code style of Prettier
{
"indentation": {
"character": " "
},
"wrapping": {
"maxLineLength": 80,
"implementsExtends": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLineAfterFirst",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
},
"methodChain": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLineAfterFirst",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
},
"callParameter": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLine",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
},
"functionSignature": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLine",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
},
"anonFunctionSignature": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLine",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
},
"typeParameter": {
"defaultWrap": "fillLine",
"rules": [
{
"type": "onePerLine",
"conditions": [{ "cond": "exceedsMaxLineLength" }]
}
]
}
},
"sameLine": {
"ifBody": "same",
"elseBody": "same"
},
"whitespace": {
"typeHintColonPolicy": "after",
"bracesConfig": {
"anonTypeBraces": {
"openingPolicy": "around",
"closingPolicy": "before"
},
"objectLiteralBraces": {
"openingPolicy": "around",
"closingPolicy": "before"
},
"typedefBraces": {
"openingPolicy": "around",
"closingPolicy": "before"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment