@@ -14,6 +14,7 @@ import createMarkdownParser from '../src/parsers/markdown.mjs';
1414import createNodeReleases from '../src/releases.mjs' ;
1515import createLinter from '../src/linter/index.mjs' ;
1616import reporters from '../src/linter/reporters/index.mjs' ;
17+ import rules from '../src/linter/rules/index.mjs' ;
1718
1819const availableGenerators = Object . keys ( generators ) ;
1920
@@ -52,6 +53,11 @@ program
5253 'Set the processing target modes'
5354 ) . choices ( availableGenerators )
5455 )
56+ . addOption (
57+ new Option ( '--disable-rule [rule...]' , 'Disable a specific linter rule' )
58+ . choices ( Object . keys ( rules ) )
59+ . default ( [ ] )
60+ )
5561 . addOption (
5662 new Option ( '--lint-dry-run' , 'Run linter in dry-run mode' ) . default ( false )
5763 )
@@ -71,6 +77,7 @@ program
7177 * @property {Target[] } target Specifies the generator target mode.
7278 * @property {string } version Specifies the target Node.js version.
7379 * @property {string } changelog Specifies the path to the Node.js CHANGELOG.md file.
80+ * @property {string[] } disableRule Specifies the linter rules to disable.
7481 * @property {boolean } lintDryRun Specifies whether the linter should run in dry-run mode.
7582 * @property {keyof reporters } reporter Specifies the linter reporter.
7683 *
@@ -84,11 +91,12 @@ const {
8491 target = [ ] ,
8592 version,
8693 changelog,
94+ disableRule,
8795 lintDryRun,
8896 reporter,
8997} = program . opts ( ) ;
9098
91- const linter = createLinter ( lintDryRun ) ;
99+ const linter = createLinter ( lintDryRun , disableRule ) ;
92100
93101const { loadFiles } = createMarkdownLoader ( ) ;
94102const { parseApiDocs } = createMarkdownParser ( ) ;
0 commit comments