explicitly set phpcs standard
This commit is contained in:
parent
8beb68162f
commit
45598458e6
|
@ -1,16 +1,6 @@
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
local sources = {
|
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,
|
null_ls.builtins.formatting.prettierd,
|
||||||
|
|
||||||
-- phpcs - standards wordpress
|
-- phpcs - standards wordpress
|
||||||
|
@ -35,12 +25,14 @@ local sources = {
|
||||||
condition = function(utils)
|
condition = function(utils)
|
||||||
return not utils.root_has_file({ "vendor/bin/phpcs" })
|
return not utils.root_has_file({ "vendor/bin/phpcs" })
|
||||||
end,
|
end,
|
||||||
|
args = { "--standard=PSR12", "--report=json", "-s", "-" },
|
||||||
}),
|
}),
|
||||||
-- phpcbf
|
-- phpcbf
|
||||||
null_ls.builtins.formatting.phpcbf.with({
|
null_ls.builtins.formatting.phpcbf.with({
|
||||||
condition = function(utils)
|
condition = function(utils)
|
||||||
return not utils.root_has_file({ "vendor/bin/phpcbf" })
|
return not utils.root_has_file({ "vendor/bin/phpcbf" })
|
||||||
end,
|
end,
|
||||||
|
args = { "--standard=PSR12", "--report=json", "-s", "-" },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- black
|
-- black
|
||||||
|
|
Loading…
Reference in New Issue