From 0ce62a3c96b0ed3d2b8fabc877f41bd9710d84af Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 4 Aug 2022 10:44:47 +0100 Subject: [PATCH] update --- lua/init-lsp.lua | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lua/init-lsp.lua b/lua/init-lsp.lua index 272a59e..21adf4e 100644 --- a/lua/init-lsp.lua +++ b/lua/init-lsp.lua @@ -194,24 +194,25 @@ 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); +-- print(eslint_command); local sources = { - 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.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({ condition = function(utils)