diff --git a/eslint.config.mjs b/eslint.config.mjs index 9cc33711b..4bb64a5ee 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -144,10 +144,16 @@ export default [ }, }, { - // Test files commonly define several small mock/fake classes. + // Test files commonly define several small mock/fake classes and named + // function expressions used as constructor mocks (e.g. + // `setGlobal('AudioWorkletNode', function AudioWorkletNode(){})`), which must + // NOT be rewritten to arrows (arrows aren't constructable). Relax the + // stylistic class/callback rules here. files: ['**/*.test.ts', '**/*.test.tsx'], rules: { 'max-classes-per-file': 'off', + 'lines-between-class-members': 'off', + 'prefer-arrow-callback': 'off', }, }, ];