Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(registry): add commitlint #564

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lua/mason-registry/commitlint/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
local Pkg = require "mason-core.package"
local _ = require "mason-core.functional"
local npm = require "mason-core.managers.npm"

return Pkg.new {
name = "commitlint",
desc = "commitlint checks if your commit messages meet the conventional commit format.",
homepage = "https://commitlint.js.org/",
languages = { Pkg.Lang.GitCommit },
categories = { Pkg.Cat.Linter },
install = npm.packages {
"@commitlint/cli",
"@commitlint/config-conventional",
"commitlint-format-json",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to enable linter integrations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's supported by null-ls:

https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#commitlint

And all 3 of those packages are required for it to work.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, cool!

bin = { "commitlint" },
},
}
1 change: 1 addition & 0 deletions lua/mason-registry/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ return {
codelldb = "mason-registry.codelldb",
codeql = "mason-registry.codeql",
codespell = "mason-registry.codespell",
commitlint = "mason-registry.commitlint",
cpplint = "mason-registry.cpplint",
cpptools = "mason-registry.cpptools",
crystalline = "mason-registry.crystalline",
Expand Down
2 changes: 1 addition & 1 deletion lua/mason/mappings/language.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ return {
flow = { "prettier", "prettierd" },
flux = { "flux-lsp" },
fortran = { "fortls" },
gitcommit = { "gitlint" },
gitcommit = { "commitlint", "gitlint" },
go = { "delve", "djlint", "go-debug-adapter", "gofumpt", "goimports", "goimports-reviser", "golangci-lint", "golangci-lint-langserver", "golines", "gomodifytags", "gopls", "gotests", "gotestsum", "iferr", "impl", "json-to-struct", "revive", "staticcheck" },
gradle = { "gradle-language-server" },
graphql = { "graphql-language-service-cli", "prettier", "prettierd" },
Expand Down