Skip to content

Commit

Permalink
chore: удалено правило commitlint, которое заставляло писать коммиты …
Browse files Browse the repository at this point in the history
…на русском языке
  • Loading branch information
mxseev committed Nov 22, 2022
1 parent 4220fb4 commit bec2f46
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
// https://stackoverflow.com/a/40503617
const isCyrillic = input => /[\u0400-\u04FF]+/.test(input)

const cyrillicRule = commit => {
if (!commit.subject) {
return [false, "Нет заголовка коммита"]
}

if (!isCyrillic(commit.subject)) {
return [false, "Заголовок коммита должен быть на русском языке"]
}

return [true]
}

module.exports = {
extends: ["@commitlint/config-conventional"],
plugins: ["commitlint-plugin-function-rules"],
rules: {
"subject-empty": [0],
"function-rules/subject-empty": [2, "always", cyrillicRule],
"type-enum": [2, "always", ["feat", "fix", "docs", "style", "refactor", "test", "revert", "chore", "WIP"]]
}
}

0 comments on commit bec2f46

Please sign in to comment.