const { readdir } = require('fs').promises; module.exports = { extends: ['@commitlint/config-conventional'], ignores: [ (commit) => /^Merge commit '[a-f0-9]{40}'$/m.test(commit), (commit) => /^chore\(root\): publish modules/m.test(commit), (commit) => commit.includes('Signed-off-by: dependabot[bot] '), ], rules: { 'scope-enum': async () => [ 2, 'always', (await readdir('modules')).concat('root', 'deps', 'scripts', 'examples', 'webpack'), ], 'footer-max-line-length': [0, 'always', Infinity], 'references-empty': [2, 'never'], }, parserPreset: { parserOpts: { issuePrefixes: [ 'BG-', 'BMF-', 'BOS-', 'BT-', 'BTC-', 'CAAS-', 'CE-', 'CEN-', 'CLEX-', 'COPS-', 'CP-', 'CR-', 'CS-', 'CSI-', 'DE-', 'DES-', 'DOS-', 'DX-', 'EA-', 'ECO-', 'ERC20-', 'FAC-', 'GNA-', 'GO-', 'GOA-', 'GRC-', 'HSM-', 'INC-', 'INF-', 'INFOSEC-', 'IR-', 'IS-', 'ITHD-', 'ITOPS-', 'MD-', 'PB-', 'POL-', 'PX-', 'QA-', 'RA-', 'SI-', 'SO-', 'SC-', 'ST-', 'STLX-', 'STONKS-', 'TMS-', 'TRUST-', 'T1-', 'USDS-', 'VL-', 'WIN-', 'WP-', 'WAL-', 'WCN-', 'WCI-', 'WEB-', 'COIN-', 'COINS-', 'COINFLP-', 'FIAT-', 'ME-', 'ANT-', 'CGARD-', 'CGD-', 'CHALO-', 'CECHO-', 'CSHLD-', 'DEFI-', '#', // Prefix used by GitHub issues ], }, }, };