Skip to content

[bug] purity is too strict flagging console.logs #1616

@controversial

Description

@controversial

Describe the bug

purity should have an option to ignore console calls within react component bodies, since this “side effect” is unobservable and broadly harmless, even if technically impure.

Reproduction

export function MyComponent() {
  console.log('hi');
  return;
}

Expected behavior

possible to disable purity from flagging console statements

Platform and versions

3.0.0-rc.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReleasedThe issue has been releasedType: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions