Skip to content

Commit 28c7baf

Browse files
devmgnclaude
andauthored
chore: disable overzealous promise lint rules (#2665)
Disable `promise/avoid-new` and `promise/prefer-await-to-callbacks` which produce false positives in frontend codebases where `new Promise()` and callback-style APIs are unavoidable. Remove now-unnecessary suppress comment in error-test page. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 09e9dd4 commit 28c7baf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

oxlint.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ export default defineConfig({
101101
"oxc/no-optional-chaining": "off",
102102
"oxc/no-rest-spread-properties": "off",
103103

104+
// ── eslint-plugin-promise (built-in) ──
105+
"promise/avoid-new": "off",
106+
"promise/prefer-await-to-callbacks": "off",
107+
104108
// ── eslint-plugin-react (built-in) ──
105109
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
106110
"react/jsx-max-depth": "off",

src/app/(sandbox)/error-test/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export default function ErrorTestPage() {
1818

1919
try {
2020
// 実際のAPI呼び出しをシミュレート
21-
// oxlint-disable-next-line promise/avoid-new
2221
await new Promise((resolve) => {
2322
setTimeout(resolve, 1000);
2423
});

0 commit comments

Comments
 (0)