update
This commit is contained in:
parent
3bf55a67c3
commit
71c5af4b85
|
@ -191,8 +191,28 @@ require('rust-tools.inlay_hints').toggle_inlay_hints()
|
||||||
-- null-ls
|
-- null-ls
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
local null_ls_utils = require("null-ls.utils")
|
||||||
|
local root = null_ls_utils.get_root()
|
||||||
|
local eslint_command = root .. "/node_modules/eslint/bin/eslint.js"
|
||||||
|
print(eslint_command);
|
||||||
|
|
||||||
local sources = {
|
local sources = {
|
||||||
null_ls.builtins.formatting.prettierd,
|
null_ls.builtins.formatting.prettierd,
|
||||||
|
null_ls.builtins.diagnostics.eslint.with({
|
||||||
|
condition = function(utils)
|
||||||
|
local has_file = utils.root_has_file({"node_modules/@wordpress/scripts/config/.eslintrc.js"})
|
||||||
|
print("condition")
|
||||||
|
print(has_file)
|
||||||
|
return has_file
|
||||||
|
end,
|
||||||
|
extra_args = {
|
||||||
|
"--no-eslintrc",
|
||||||
|
"--config ",
|
||||||
|
root .. "/node_modules/@wordpress/scripts/config/.eslintrc.js",
|
||||||
|
"--ignore-path ",
|
||||||
|
root .. "/node_modules/@wordpress/scripts/config/.eslintignore"
|
||||||
|
}
|
||||||
|
}), --
|
||||||
null_ls.builtins.diagnostics.phpcs.with({
|
null_ls.builtins.diagnostics.phpcs.with({
|
||||||
condition = function(utils)
|
condition = function(utils)
|
||||||
return not utils.root_has_file({"vendor/bin/phpcs"})
|
return not utils.root_has_file({"vendor/bin/phpcs"})
|
||||||
|
|
|
@ -260,3 +260,4 @@ pothos
|
||||||
monstera
|
monstera
|
||||||
Heartleaf
|
Heartleaf
|
||||||
i32
|
i32
|
||||||
|
PSU
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue