fix(nvim): eslint errors on first lines of buffers

Only run eslint when an .eslintrc.js file is present in the project
root.
This commit is contained in:
Oliver Davies 2023-04-30 23:12:20 +01:00
parent 52e323be81
commit 491b6bcc3f

View file

@ -29,7 +29,11 @@ null_ls.setup {
formatting.rustywind,
formatting.stylua,
diagnostics.eslint,
diagnostics.eslint.with({
condition = function(utils)
return utils.root_has_file({ '.eslintrc.js' })
end,
}),
diagnostics.markdownlint,
diagnostics.php,
diagnostics.phpcs,