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

Only enable Node lint rules for Node files #3672

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Oct 23, 2024

  1. Only enable Node lint rules for Node files

    In a previous commit, we mistakenly introduced a Node-specific function
    for testing deep equality, and this ended up crashing the extension.
    This would usually have been caught by our ESLint rules, as they
    prohibit use of Node libraries by default. However, the ESLint
    configuration for this repo imports rules from our
    `@metamask/eslint-config-nodejs` package and applies them to all files,
    marking everything as Node-compatible, thereby allowing such usage. This
    is incorrect: these rules should only apply to test files and scripts.
    
    This commit fix the ESLint configuration to match. Doing so revealed a
    couple of categories of violations, which this commit also fixes:
    
    - Some packages import and make use of EventEmitter from Node's `events`
      module. We add a notice to the README for these packages which advises
      consumers that these packages are designed to be used in a
      Node-compatible environment.
    - Some packages import and make use of Node's `assert` module to check
      values at runtime. It isn't strictly necessary to use this module, and
      so we replace its usage with simpler code.
    - Some packages import and make use of Node's `inspect` utility
      function. We don't strictly need this either, and we replace its
      usage with simpler code as well.
    mcmire committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    5f1f877 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. Configuration menu
    Copy the full SHA
    50bd863 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. Configuration menu
    Copy the full SHA
    275e255 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. Configuration menu
    Copy the full SHA
    557c1a4 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Configuration menu
    Copy the full SHA
    9124fd0 View commit details
    Browse the repository at this point in the history
  2. Ignore another lint violation

    mcmire committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    28db5e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Configuration menu
    Copy the full SHA
    2b7f636 View commit details
    Browse the repository at this point in the history