@@ -9,7 +9,7 @@ import headerPlugin from 'eslint-plugin-header';
99import path from 'node:path' ;
1010import { fileURLToPath } from 'node:url' ;
1111
12- import { copyrightHeader , sharedRules , oclifRules , prettierPlugin } from '../../eslint.config.mjs' ;
12+ import { copyrightHeader , sharedRules , oclifRules , chaiTestRules , prettierPlugin } from '../../eslint.config.mjs' ;
1313
1414const gitignorePath = path . resolve ( path . dirname ( fileURLToPath ( import . meta. url ) ) , '.gitignore' ) ;
1515headerPlugin . rules . header . meta . schema = false ;
@@ -19,7 +19,7 @@ export default [
1919 // node_modules must be explicitly ignored because the .gitignore pattern only covers
2020 // packages/b2c-cli/node_modules, not the monorepo root node_modules
2121 {
22- ignores : [ '**/node_modules/**' , 'test/functional/fixtures/**/*.js' ] ,
22+ ignores : [ '**/node_modules/**' , 'test/functional/fixtures/**/*.js' , '**/node_modules/marked-terminal/**' ] ,
2323 } ,
2424 includeIgnoreFile ( gitignorePath ) ,
2525 ...oclif ,
@@ -39,4 +39,29 @@ export default [
3939 ...oclifRules ,
4040 } ,
4141 } ,
42+ {
43+ files : [ 'test/**/*.ts' ] ,
44+ rules : {
45+ ...chaiTestRules ,
46+ // Tests use stubbing patterns that intentionally return undefined
47+ 'unicorn/no-useless-undefined' : 'off' ,
48+ // Some tests use void 0 to satisfy TS stub typings; allow it in tests
49+ 'no-void' : 'off' ,
50+ // Command tests frequently use `any` to avoid over-typing oclif command internals
51+ '@typescript-eslint/no-explicit-any' : 'off' ,
52+ // Helper functions in tests are commonly declared within suites for clarity
53+ 'unicorn/consistent-function-scoping' : 'off' ,
54+ // Sinon default import is intentional and idiomatic in tests
55+ 'import/no-named-as-default-member' : 'off' ,
56+ // import/namespace behaves inconsistently across environments when parsing CJS modules like marked-terminal
57+ 'import/namespace' : 'off' ,
58+ } ,
59+ } ,
60+ {
61+ files : [ 'src/commands/docs/**/*.ts' ] ,
62+ rules : {
63+ // marked-terminal is CJS and breaks import/namespace static analysis
64+ 'import/namespace' : 'off' ,
65+ } ,
66+ } ,
4267] ;
0 commit comments