-
-
Notifications
You must be signed in to change notification settings - Fork 28
Formatters
Liquan Yang edited this page May 10, 2024
·
19 revisions
"mix_format": {
"command": "mix",
"args": ["format", "-"],
}
"dartfmt": {
"command": "dartfmt",
"args": [ "--fix" ]
}
"standard": {
"command": "./node_modules/.bin/standard",
"args": ["--stdin", "--fix"],
"rootPatterns": [".git"],
"isStderr": false,
"isStdout": true
}
"stylelint": {
"command": "./node_modules/.bin/stylelint",
"args": ["--fix"],
"rootPatterns": [".git"],
"isStderr": false,
"isStdout": true
}
"brittany": {
"command": "brittany",
"args": ["--write-mode=inplace"]
}
Binary download is recommended to install lua-format.
"lua-format": {
"command": "lua-format",
"args": ["-i"]
}
"terraform": {
"command": "terraform",
"args": ["fmt", "-"]
}
If any EditorConfig files are found, they will be used to apply formatting options.
"shfmt": {
"command": "shfmt"
}
"purty": {
"command": "purty",
"args": ["-"]
}
"blade-formatter": {
"command": "blade-formatter",
"args": ["--stdin"]
}
"fish_indent": {
"command": "fish_indent"
}
"prettier": {
"command": "prettier", // installed globally, or "./node_modules/.bin/prettier" for local install
"args": ["--stdin-filepath", "%filepath"],
"rootPatterns": [
".prettierrc",
".prettierrc.json",
".prettierrc.toml",
".prettierrc.json",
".prettierrc.yml",
".prettierrc.yaml",
".prettierrc.json5",
".prettierrc.js",
".prettierrc.cjs",
"prettier.config.js",
"prettier.config.cjs"
]
}
"prettier_standard": {
"command": "prettier-standard", // installed globally, or "./node_modules/.bin/prettier-standard" for local install
"args": ["--stdin"]
}
"prettier_eslint": {
"command": "prettier-eslint", // installed globally, or "./node_modules/.bin/prettier-eslint" for local install
"args": ["--stdin"],
"rootPatterns": [".git"]
}
"xo": {
"command": "xo", // installed globally, or "./node_modules/.bin/xo" for project local install
"args": ["--fix", "--stdin", "--stdin-filename", "%filepath"],
"rootPatterns": ["package.json"]
}
"black": {
"command": "black",
"args": ["--quiet", "-"]
}
"autopep8": {
"command": "autopep8",
"args": ["-"]
}
"yapf": {
"command": "yapf",
"args": ["--quiet"]
}
"isort": {
"command": "isort",
"args": ["--quiet", "-"]
}
Ruff's standard formatter can be used as a drop-in replacement to black.
"ruff_fmt": {
"command": "ruff",
"args": [ "format", "--quiet", "-" ],
"rootPatterns": [ "pyproject.toml", "ruff.toml" ]
}
To fix import sorts, invoke ruff's linter with the --fix
option and the import rule selected.
"ruff_isort": {
"command": "ruff",
"args": [ "check", "--select", "I", "--fix", "--quiet", "-" ],
"rootPatterns": [ "pyproject.toml", "ruff.toml" ]
}