fix(vim): reformat the linters and add extra eslint flags
Removes the complete override to the linters and add extra flags to the existing args. This will now automatically get any updates made to the plugin linters. This also add the `unstable_ts_config` to the eslint command so we can use typescript configs with eslint 9. I don't really know how this will affect BC with version 8, I will have to cross that bridge when we come to it. ATM this is good for daily use of version 9.
This commit is contained in:
parent
bed0f97bd7
commit
63edfe28ce
1 changed files with 9 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
local lint = require "lint"
|
local lint = require "lint"
|
||||||
local cspell_linter = require "lint.linters.cspell"
|
local cspell_linter = require "lint.linters.cspell"
|
||||||
|
local eslint_linter = require "lint.linters.eslint"
|
||||||
|
|
||||||
local severities = {
|
local severities = {
|
||||||
error = vim.diagnostic.severity.ERROR,
|
error = vim.diagnostic.severity.ERROR,
|
||||||
|
|
@ -44,16 +45,14 @@ local get_language_id = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
lint.linters.cspell = cspell_linter
|
lint.linters.cspell = cspell_linter
|
||||||
lint.linters.cspell.args = {
|
table.insert(lint.linters.cspell.args, "--config=" .. os.getenv "HOME" .. "/.cspell.json")
|
||||||
"lint",
|
table.insert(lint.linters.cspell.args, get_language_id)
|
||||||
"--no-color",
|
table.insert(lint.linters.cspell.args, "--")
|
||||||
"--no-progress",
|
table.insert(lint.linters.cspell.args, "stdin")
|
||||||
"--no-summary",
|
|
||||||
"--config=" .. os.getenv "HOME" .. "/.cspell.json",
|
lint.linters.eslint = eslint_linter
|
||||||
get_language_id,
|
table.insert(lint.linters.eslint.args, 1, "--flag")
|
||||||
"--",
|
table.insert(lint.linters.eslint.args, 2, "unstable_ts_config")
|
||||||
"stdin",
|
|
||||||
}
|
|
||||||
|
|
||||||
lint.linters_by_ft = {}
|
lint.linters_by_ft = {}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue