Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable no-console for Playwright ruleset #124

Open
jattasNI opened this issue Jun 26, 2023 · 1 comment
Open

Disable no-console for Playwright ruleset #124

jattasNI opened this issue Jun 26, 2023 · 1 comment
Assignees

Comments

@jattasNI
Copy link
Collaborator

Currently, the Playwright ruleset inherits the TS/JS ruleset configuration for no-console which disallows using console.log.

It is suppressed in many places, including:

  1. acceptance-tests which want to log their state or an error
  2. custom reporters that want to log errors
  3. loggers in Performance and End2End tests

What is our recommendation for using console within Playwright code? Can we disable this rule or come up with an alternate suggestion?

@jattasNI
Copy link
Collaborator Author

In discussion today we realized:

  1. this isn't a playwright issue, it's a Node server-side code issue
  2. we shouldn't change our ruleset generally
  3. it is ok (encouraged!) to do logging in server code (and maybe also in some situations in test code, though most instances we found seemed suspicious) but that should be done via a centralized logging service, not console

The action item for this issue is to update our docs for this rule.

@jattasNI jattasNI removed the triage label Jun 29, 2023
@jattasNI jattasNI self-assigned this Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant