From 45598458e648a0e8504444a896226fcf56763549 Mon Sep 17 00:00:00 2001 From: ray Date: Sat, 22 Jan 2022 18:57:25 +0000 Subject: [PATCH] explicitly set phpcs standard --- lua/init-null-ls.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lua/init-null-ls.lua b/lua/init-null-ls.lua index 08ce508..965324c 100644 --- a/lua/init-null-ls.lua +++ b/lua/init-null-ls.lua @@ -1,16 +1,6 @@ local null_ls = require("null-ls") local sources = { - -- -- prettier - using perttierd instead - -- null_ls.builtins.formatting.prettier.with({ - -- extra_filetypes = { "php" }, - -- prefer_local = "node_modules/.bin", - -- }), - -- -- prettierd with php - -- null_ls.builtins.formatting.prettierd.with({ - -- extra_filetypes = { "php" }, - -- }), - -- prettierd without php (use phpcbf instead) null_ls.builtins.formatting.prettierd, -- phpcs - standards wordpress @@ -35,12 +25,14 @@ local sources = { condition = function(utils) return not utils.root_has_file({ "vendor/bin/phpcs" }) end, + args = { "--standard=PSR12", "--report=json", "-s", "-" }, }), -- phpcbf null_ls.builtins.formatting.phpcbf.with({ condition = function(utils) return not utils.root_has_file({ "vendor/bin/phpcbf" }) end, + args = { "--standard=PSR12", "--report=json", "-s", "-" }, }), -- black