diff --git a/lua/efmls-configs/linters/jsonlint.lua b/lua/efmls-configs/linters/jsonlint.lua new file mode 100644 index 0000000..b64e179 --- /dev/null +++ b/lua/efmls-configs/linters/jsonlint.lua @@ -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' }, +} diff --git a/lua/efmls-configs/linters/markuplint.lua b/lua/efmls-configs/linters/markuplint.lua new file mode 100644 index 0000000..64cf20d --- /dev/null +++ b/lua/efmls-configs/linters/markuplint.lua @@ -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' }, +}