Skip to content

Commit 52069a3

Browse files
committed
fix: disbale e18e/prefer-static-regex in non-lib mode
1 parent 8d36546 commit 52069a3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/configs/e18e.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ export async function e18e(options: OptionsE18e & OptionsProjectType & OptionsIs
2727
...moduleReplacements ? { ...configs.moduleReplacements!.rules } : {},
2828
...performanceImprovements ? { ...configs.performanceImprovements!.rules } : {},
2929

30+
// e18e/prefer-static-regex is too strict for non-lib projects, and most of the time the performance improvement is negligible, so we'll disable it by default for app projects
31+
...(type === 'lib'
32+
? {}
33+
: {
34+
'e18e/prefer-static-regex': 'off',
35+
}),
36+
3037
// these are a bit opinionated and dangerous (introducing behavioral changes), so we'll disable them by default for now
3138
'e18e/prefer-array-at': 'off',
3239
'e18e/prefer-array-from-map': 'off',

0 commit comments

Comments
 (0)