Skip to content

Commit

Permalink
fix(linters): lintFormats for jsonlint and markuplint (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativenull authored Apr 2, 2024
1 parent 13905c7 commit 479505a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions lua/efmls-configs/linters/jsonlint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ local sourceText = require('efmls-configs.utils').sourceText
local fs = require('efmls-configs.fs')

local linter = 'jsonlint'
local args = '--sort-keys --compact --validate ${INPUT}'
local args = '--sort-keys --compact'
local command = string.format('%s %s', fs.executable(linter, fs.Scope.NODE), args)

return {
prefix = linter,
lintSource = sourceText(linter),
lintCommand = command,
lintStdin = true,
lintFormats = { '%.%#: line %l, col %c, %trror - %m', '%.%#: line %l, col %c, %tarning - %m' },
rootMarkers = { '.jsonlintrc' },
prefix = linter,
lintSource = sourceText(linter),
lintCommand = command,
lintStdin = true,
lintFormats = { 'line %l, col %c, %m' },
rootMarkers = { '.jsonlintrc' },
}
7 changes: 5 additions & 2 deletions lua/efmls-configs/linters/markuplint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ local sourceText = require('efmls-configs.utils').sourceText
local fs = require('efmls-configs.fs')

local linter = 'markuplint'
local args = '--no-color --format Simple --verbose ${INPUT}'
local args = '--no-color --format Github ${INPUT}'
local command = string.format('%s %s', fs.executable(linter, fs.Scope.NODE), args)

return {
prefix = linter,
lintSource = sourceText(linter),
lintCommand = command,
lintStdin = true,
lintFormats = { '%.%#: line %l, col %c, %trror - %m', '%.%#: line %l, col %c, %tarning - %m' },
lintFormats = {
'::%trror file=%.%#,line=%l,col=%c::%m',
'::%tarning file=%.%#,line=%l,col=%c::%m',
},
rootMarkers = { '.markuplintrc' },
}

0 comments on commit 479505a

Please sign in to comment.