Skip to content

Commit

Permalink
Merge #109293
Browse files Browse the repository at this point in the history
109293: [CC-24092] cluster-ui: lint for usages of console logging r=fantapop a=fantapop

In order to provide more structured error data in management-console, setLogger and getLogger methods were previously added to cluster-ui. They allow the logger to be overridden when used from the cloud. The benefits rely on using the new methods in console-ui instead of console logging methods.  This change adds a lint rule to ensure console logging methods are not used.

Release note: none
Epic: none

Co-authored-by: Christopher Fitzner <[email protected]>
  • Loading branch information
craig[bot] and fantapop committed Aug 24, 2023
2 parents b24aa96 + d2ecbc6 commit 7084ac6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/ui/workspaces/cluster-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@cockroachlabs/crdb/require-antd-style-import": "error"
"@cockroachlabs/crdb/require-antd-style-import": "error",
// Instead of using console log methods directly, cluster-ui code should
// call the getLogger() method to provide the appropriate logger.
"no-console": "error"
}
}

0 comments on commit 7084ac6

Please sign in to comment.