diff --git a/packages/calcite-components/.eslintrc.cjs b/packages/calcite-components/.eslintrc.cjs index 7da92a9b971..aa23adea6ff 100644 --- a/packages/calcite-components/.eslintrc.cjs +++ b/packages/calcite-components/.eslintrc.cjs @@ -180,6 +180,12 @@ module.exports = { "@esri/calcite-components/no-dynamic-createelement": "off", }, }, + { + files: ["src/**/*"], + rules: { + "no-console": ["error"], + }, + }, { extends: ["plugin:@typescript-eslint/disable-type-checked"], files: ["*.cjs"], diff --git a/packages/calcite-components/src/utils/logger.ts b/packages/calcite-components/src/utils/logger.ts index 2fd7fba401f..01300389315 100644 --- a/packages/calcite-components/src/utils/logger.ts +++ b/packages/calcite-components/src/utils/logger.ts @@ -45,6 +45,7 @@ function forwardToConsole(level: LogLevel, ...data: any[]): void { const badgeTemplate = "%ccalcite"; const badgeStyle = "background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;"; + // eslint-disable-next-line no-console -- official messaging is managed through this module console[level].call(this, badgeTemplate, badgeStyle, ...data); }