diff --git a/eslint.config.mjs b/eslint.config.mjs index a2aba3b..af65758 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -8,6 +8,15 @@ const urlConstantsOverride = { }, }; +// Disallow stray `console.log`/`console.debug`/etc. so debugging leftovers do +// not ship to production. Intentional diagnostics remain available via +// `console.warn` / `console.error`. +const noConsoleOverride = { + rules: { + "no-console": ["error", { allow: ["warn", "error"] }], + }, +}; + // Forbid non-null assertions (`value!`). The `!` operator silently tells the // type checker a value can't be null/undefined without any runtime guarantee, // so a wrong assumption surfaces as a runtime crash instead of a compile error. @@ -19,4 +28,4 @@ const noNonNullAssertion = { }, }; -export default [...config, urlConstantsOverride, noNonNullAssertion]; +export default [...config, urlConstantsOverride, noConsoleOverride, noNonNullAssertion];