Skip to content

Commit 3ef49f1

Browse files
committed
fix: properly escape regex in .prettierrc.cjs
1 parent e091787 commit 3ef49f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.prettierrc.cjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ const codeImports = [
55
'<BUILTIN_MODULES>',
66
'<THIRD_PARTY_MODULES>',
77
'',
8-
'^(@repo)(\/.*)$', // Workspace imports
8+
'^(@repo)(\\/.*)$', // Workspace imports
99
'',
1010
// aliases
11-
'^~\/', // ~/
12-
'^@\/', // @/
11+
'^~\\/', // ~/
12+
'^@\\/', // @/
1313
'',
1414
// Local (relative) imports
1515
'^[.]{2}$', // ..
16-
'^[.]{2}\/', // ../
17-
'^[.]\/(?!index)', // ./foo (but not ./index)
16+
'^[.]{2}\\/', // ../
17+
'^[.]\\/(?!index)', // ./foo (but not ./index)
1818
'^[.]$', // .
1919
'^[.]/index$', // ./index
2020
'',

0 commit comments

Comments
 (0)