Skip to content

Commit

Permalink
feat(linters): jsonlint and markuplint config (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantasimay authored Apr 2, 2024
1 parent a61c52d commit 13905c7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lua/efmls-configs/linters/jsonlint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Metadata
-- languages: JSON
-- url: https://github.com/zaach/jsonlint

local sourceText = require('efmls-configs.utils').sourceText
local fs = require('efmls-configs.fs')

local linter = 'jsonlint'
local args = '--sort-keys --compact --validate ${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' },
rootMarkers = { '.jsonlintrc' },
}
19 changes: 19 additions & 0 deletions lua/efmls-configs/linters/markuplint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Metadata
-- languages: HTML
-- url: https://markuplint.dev/

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 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 = { '.markuplintrc' },
}

0 comments on commit 13905c7

Please sign in to comment.