diff --git a/ale_linters/json/biome.vim b/ale_linters/json/biome.vim new file mode 100644 index 0000000000..086ee44ab4 --- /dev/null +++ b/ale_linters/json/biome.vim @@ -0,0 +1,10 @@ +" Description: biome for json files + +call ale#linter#Define('json', { +\ 'name': 'biome', +\ 'lsp': 'stdio', +\ 'language': function('ale#handlers#biome#GetLanguage'), +\ 'executable': function('ale#handlers#biome#GetExecutable'), +\ 'command': '%e lsp-proxy', +\ 'project_root': function('ale#handlers#biome#GetProjectRoot'), +\}) diff --git a/ale_linters/jsonc/biome.vim b/ale_linters/jsonc/biome.vim new file mode 100644 index 0000000000..5a691093df --- /dev/null +++ b/ale_linters/jsonc/biome.vim @@ -0,0 +1,10 @@ +" Description: biome for jsonc files + +call ale#linter#Define('jsonc', { +\ 'name': 'biome', +\ 'lsp': 'stdio', +\ 'language': function('ale#handlers#biome#GetLanguage'), +\ 'executable': function('ale#handlers#biome#GetExecutable'), +\ 'command': '%e lsp-proxy', +\ 'project_root': function('ale#handlers#biome#GetProjectRoot'), +\}) diff --git a/autoload/ale/fix/registry.vim b/autoload/ale/fix/registry.vim index b8829a5e66..38a87153f5 100644 --- a/autoload/ale/fix/registry.vim +++ b/autoload/ale/fix/registry.vim @@ -39,7 +39,7 @@ let s:default_registry = { \ }, \ 'biome': { \ 'function': 'ale#fixers#biome#Fix', -\ 'suggested_filetypes': ['javascript', 'typescript'], +\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'jsonc'], \ 'description': 'Fix JavaScript and TypeScript using biome.', \ }, \ 'black': { diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim index 3cfd8ead00..fb30fb1120 100644 --- a/autoload/ale/linter.vim +++ b/autoload/ale/linter.vim @@ -47,9 +47,9 @@ let s:default_ale_linters = { \ 'hack': ['hack'], \ 'help': [], \ 'inko': ['inko'], -\ 'json': ['jsonlint', 'spectral', 'vscodejson'], +\ 'json': ['biome', 'jsonlint', 'spectral', 'vscodejson'], \ 'json5': [], -\ 'jsonc': [], +\ 'jsonc': ['biome'], \ 'perl': ['perlcritic'], \ 'perl6': [], \ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], diff --git a/doc/ale-json.txt b/doc/ale-json.txt index 7b240373de..8822a6979f 100644 --- a/doc/ale-json.txt +++ b/doc/ale-json.txt @@ -2,6 +2,12 @@ ALE JSON Integration *ale-json-options* +=============================================================================== +biome *ale-json-biome* + +Check the docs over at |ale-typescript-biome|. + + =============================================================================== clang-format *ale-json-clangformat* diff --git a/doc/ale-jsonc.txt b/doc/ale-jsonc.txt index 92247cd436..b05fa6e61a 100644 --- a/doc/ale-jsonc.txt +++ b/doc/ale-jsonc.txt @@ -2,6 +2,12 @@ ALE JSONC Integration *ale-jsonc-options* +=============================================================================== +biome *ale-jsonc-biome* + +Check the docs over at |ale-typescript-biome|. + + =============================================================================== eslint *ale-jsonc-eslint* diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt index 505cac8672..37cc83352f 100644 --- a/doc/ale-supported-languages-and-tools.txt +++ b/doc/ale-supported-languages-and-tools.txt @@ -314,6 +314,7 @@ Notes: * `xo` * JSON * `VSCode JSON language server` + * `biome` * `clang-format` * `cspell` * `dprint` @@ -326,6 +327,7 @@ Notes: * JSON5 * `eslint` * JSONC + * `biome` * `eslint` * Jsonnet * `jsonnet-lint` diff --git a/doc/ale.txt b/doc/ale.txt index c7ed1a44d7..3050644aa7 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3137,6 +3137,7 @@ documented in additional help files. standard..............................|ale-javascript-standard| xo....................................|ale-javascript-xo| json....................................|ale-json-options| + biome.................................ale-json-biome clang-format..........................|ale-json-clangformat| cspell................................|ale-json-cspell| dprint................................|ale-json-dprint| @@ -3148,6 +3149,7 @@ documented in additional help files. spectral..............................|ale-json-spectral| vscodejson............................|ale-json-vscode| jsonc...................................|ale-jsonc-options| + biome.................................ale-jsonc-biome eslint................................|ale-jsonc-eslint| jsonnet.................................|ale-jsonnet-options| jsonnetfmt............................|ale-jsonnet-jsonnetfmt| diff --git a/supported-tools.md b/supported-tools.md index 3d687614dd..fee80d23b5 100644 --- a/supported-tools.md +++ b/supported-tools.md @@ -323,6 +323,7 @@ formatting. * [xo](https://github.com/sindresorhus/xo) * JSON * [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [biome](https://biomejs.dev/) * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: * [dprint](https://dprint.dev) @@ -335,6 +336,7 @@ formatting. * JSON5 * [eslint](http://eslint.org/) :warning: * JSONC + * [biome](https://biomejs.dev/) * [eslint](http://eslint.org/) :warning: * Jsonnet * [jsonnet-lint](https://jsonnet.org/learning/tools.html)