Skip to content

Commit 2b2bba0

Browse files
chore: apply automated updates
1 parent 8849227 commit 2b2bba0

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

actions/unjs/oxlint.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff 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-
/eslint\s+--fix\b/g,
72-
"oxlint --fix",
73-
);
69+
pkg.scripts[name] = pkg.scripts[name].replace(/eslint\s+--fix\b/g, "oxlint --fix");
7470
// Replace eslint with oxlint (for non --fix cases)
75-
pkg.scripts[name] = pkg.scripts[name].replace(
76-
/eslint(?!\s+--fix)\b/g,
77-
"oxlint",
78-
);
71+
pkg.scripts[name] = pkg.scripts[name].replace(/eslint(?!\s+--fix)\b/g, "oxlint");
7972
}
8073
}
8174
});

0 commit comments

Comments
 (0)