Add support for astro (#4780)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-06-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled

* feat: prettier for astro
* feat: eslint for astro
* feat: doc for astro
This commit is contained in:
ghsang
2024-08-14 16:24:22 +09:00
committed by GitHub
parent 48d73c87c3
commit 954682108d
16 changed files with 114 additions and 2 deletions

View File

@@ -137,7 +137,7 @@ let s:default_registry = {
\ },
\ 'eslint': {
\ 'function': 'ale#fixers#eslint#Fix',
\ 'suggested_filetypes': ['javascript', 'typescript'],
\ 'suggested_filetypes': ['javascript', 'typescript', 'astro'],
\ 'description': 'Apply eslint --fix to a file.',
\ },
\ 'mix_format': {
@@ -152,7 +152,7 @@ let s:default_registry = {
\ },
\ 'prettier': {
\ 'function': 'ale#fixers#prettier#Fix',
\ 'suggested_filetypes': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'json5', 'graphql', 'markdown', 'vue', 'svelte', 'html', 'yaml', 'openapi', 'ruby'],
\ 'suggested_filetypes': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'json5', 'graphql', 'markdown', 'vue', 'svelte', 'html', 'yaml', 'openapi', 'ruby', 'astro'],
\ 'description': 'Apply prettier to a file.',
\ },
\ 'prettier_eslint': {

View File

@@ -79,6 +79,7 @@ function! ale#fixers#prettier#ApplyFixForVersion(buffer, version) abort
\ 'openapi': 'yaml',
\ 'html': 'html',
\ 'ruby': 'ruby',
\ 'astro': 'astro',
\}
for l:filetype in l:filetypes

View File

@@ -40,6 +40,7 @@ let s:default_ale_linter_aliases = {
" NOTE: Update the g:ale_linters documentation when modifying this.
let s:default_ale_linters = {
\ 'apkbuild': ['apkbuild_lint', 'secfixes_check'],
\ 'astro': ['eslint'],
\ 'csh': ['shell'],
\ 'elixir': ['credo', 'dialyxir', 'dogma'],
\ 'go': ['gofmt', 'golangci-lint', 'gopls', 'govet'],