Chris Kay | fa3a138 | 2021-11-12 15:48:44 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2021, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | /* eslint-env es6 */ |
| 8 | |
| 9 | "use strict"; |
| 10 | |
| 11 | const cz = require("./.cz.json"); |
| 12 | const { "trailer-exists": trailerExists } = require("@commitlint/rules").default; |
| 13 | |
| 14 | module.exports = { |
| 15 | extends: ["@commitlint/config-conventional"], |
| 16 | plugins: [ |
| 17 | { |
| 18 | rules: { |
| 19 | "signed-off-by-exists": trailerExists, |
| 20 | "change-id-exists": trailerExists, |
| 21 | }, |
| 22 | }, |
| 23 | ], |
| 24 | rules: { |
| 25 | "body-max-line-length": [1, "always", cz.maxLineWidth], /* Warning */ |
| 26 | "header-max-length": [1, "always", cz.maxHeaderWidth], /* Warning */ |
| 27 | |
| 28 | "change-id-exists": [1, "always", "Change-Id:"], /* Warning */ |
| 29 | "signed-off-by-exists": [1, "always", "Signed-off-by:"], /* Warning */ |
| 30 | }, |
| 31 | }; |