Skip to content

Commit 25248f5

Browse files
committed
fix: disable Babel transform for eslint-rules jest project
The eslint-rules project inherits Babel config resolution which loads babel-plugin-istanbul, conflicting with Jest's own coverage instrumentation. Setting transform: {} avoids this since the rule files are plain CommonJS.
1 parent f7413c9 commit 25248f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jest.test.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ module.exports = {
5353
testEnvironment: 'jsdom',
5454
},
5555
// Custom ESLint rule tests — node environment, no preset/setup files.
56+
// `transform: {}` disables Babel so the MC app preset's babel-plugin-istanbul
57+
// doesn't conflict with Jest's own coverage instrumentation.
5658
{
5759
displayName: 'eslint-rules',
5860
testEnvironment: 'node',
5961
testMatch: ['<rootDir>/packages/eslint-config-mc-app/rules/**/*.spec.js'],
62+
transform: {},
6063
},
6164
],
6265
};

0 commit comments

Comments
 (0)