-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
mcmire
wants to merge
7
commits into
main
Choose a base branch
from
enable-nodejs-lint-rules-for-node-files
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Oct 23, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 5f1f877 - Browse repository at this point
Copy the full SHA 5f1f877View commit details
Commits on Nov 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 50bd863 - Browse repository at this point
Copy the full SHA 50bd863View commit details
Commits on Nov 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 275e255 - Browse repository at this point
Copy the full SHA 275e255View commit details
Commits on Nov 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 557c1a4 - Browse repository at this point
Copy the full SHA 557c1a4View commit details
Commits on Nov 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9124fd0 - Browse repository at this point
Copy the full SHA 9124fd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28db5e9 - Browse repository at this point
Copy the full SHA 28db5e9View commit details
Commits on Nov 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2b7f636 - Browse repository at this point
Copy the full SHA 2b7f636View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.