blob: 648246c4a10614178d2e3294f88eb08aed0791d9 [file] [log] [blame]
Chris Kayfa3a1382021-11-12 15:48:44 +00001/*
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
11const cz = require("./.cz.json");
12const { "trailer-exists": trailerExists } = require("@commitlint/rules").default;
13
14module.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};