@@ -13,6 +13,7 @@ import {
1313 GENERATED_FILE_PATTERNS ,
1414 JS_TS_JSON_FILE_PATTERNS ,
1515 JSON_FILE_PATTERNS ,
16+ MOCKS_FILE_PATTERNS ,
1617 SVELTE_FILE_PATTERN ,
1718 TEST_FILE_PATTERNS ,
1819} from '../lib/patterns.js' ;
@@ -210,14 +211,25 @@ export default tseslint.config(
210211 'max-nested-callbacks' : [ 'warn' , { max : 10 } ] ,
211212 } ,
212213 } ,
214+ {
215+ name : 'code-pushup/javascript/mocks/disabled' ,
216+ files : MOCKS_FILE_PATTERNS ,
217+ rules : {
218+ 'import/no-commonjs' : 'off' ,
219+ 'unicorn/prefer-module' : 'off' ,
220+ '@typescript-eslint/no-require-imports' : 'off' ,
221+ } ,
222+ } ,
213223 {
214224 name : 'code-pushup/javascript/configs/disabled' ,
215225 files : CONFIG_FILE_PATTERNS ,
216226 rules : {
217227 'import/no-anonymous-default-export' : 'off' ,
218228 'import/no-unassigned-import' : 'off' ,
229+ 'import/no-commonjs' : 'off' ,
219230 'unicorn/no-abusive-eslint-disable' : 'off' ,
220231 'unicorn/prefer-module' : 'off' ,
232+ '@typescript-eslint/no-require-imports' : 'off' ,
221233 } ,
222234 } ,
223235 {
@@ -246,9 +258,9 @@ export default tseslint.config(
246258 name : 'code-pushup/javascript/cjs/disabled' ,
247259 files : COMMONJS_FILE_PATTERNS ,
248260 rules : {
249- '@typescript-eslint/no-require-imports' : 'off' ,
250- '@typescript-eslint/no-var-requires' : 'off' ,
251261 'import/no-commonjs' : 'off' ,
262+ 'unicorn/prefer-module' : 'off' ,
263+ '@typescript-eslint/no-require-imports' : 'off' ,
252264 } ,
253265 } ,
254266 {
0 commit comments