File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ export default defineAction({
2626 async filter ( { utils } ) {
2727 // Only apply if an eslint config exists
2828 return (
29- ( await utils . existsWithAnyExt ( "eslint.config" ) ) ||
30- ( await utils . existsWithAnyExt ( ".eslintrc" ) )
29+ ( await utils . existsWithAnyExt ( "eslint.config" ) ) || ( await utils . existsWithAnyExt ( ".eslintrc" ) )
3130 ) ;
3231 } ,
3332 async apply ( { utils } ) {
@@ -67,15 +66,9 @@ export default defineAction({
6766 for ( const name of [ "lint" , "lint:fix" , "format" ] ) {
6867 if ( pkg . scripts [ name ] ) {
6968 // Replace eslint --fix with oxlint --fix
70- pkg . scripts [ name ] = pkg . scripts [ name ] . replace (
71- / e s l i n t \s + - - f i x \b / g,
72- "oxlint --fix" ,
73- ) ;
69+ pkg . scripts [ name ] = pkg . scripts [ name ] . replace ( / e s l i n t \s + - - f i x \b / g, "oxlint --fix" ) ;
7470 // Replace eslint with oxlint (for non --fix cases)
75- pkg . scripts [ name ] = pkg . scripts [ name ] . replace (
76- / e s l i n t (? ! \s + - - f i x ) \b / g,
77- "oxlint" ,
78- ) ;
71+ pkg . scripts [ name ] = pkg . scripts [ name ] . replace ( / e s l i n t (? ! \s + - - f i x ) \b / g, "oxlint" ) ;
7972 }
8073 }
8174 } ) ;
You can’t perform that action at this time.
0 commit comments