Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ee19dd3 to
7c98394
Compare
Set up ESLint with flat config using the recommended ruleset and Node.js globals. A dedicated lint job is added to the CI workflow so it runs once per PR. Fix an undeclared variable in the library_config WASM test that was caught by the new linter.
Add stylistic rules to enforce consistent code formatting across the codebase. Auto-fix all existing files to comply with the new rules.
Add Node.js-specific linting rules via the eslint-plugin-n recommended config.
Add unicorn recommended rules and fix all violations. Rules incompatible with CommonJS are disabled.
Enforce the unicorn/filename-case rule by renaming files that used underscores to kebab-case and updating all references.
Replace null usages with undefined/implicit returns so the rule can be enforced.
Suppress the rule inline for the one intentional async IIFE in the crashtracker test instead of disabling it globally.
Enforce import ordering, grouping with newlines between sections, no unnecessary extensions, and other import best practices across the codebase.
Overall package sizeSelf size: 37.36 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------|🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Enforce `const` for variables that are never reassigned and fix all existing violations across test files.
The prebuildify Docker images for linuxglibc use Node.js 12 which doesn't support the node: protocol prefix in require calls. This was causing CI failures during the build step.
ESLint devDependencies require Node ^20.19.0 || ^22.13.0 || >=24, which breaks `yarn install` on older Node versions used by the prebuildify test matrix. Add `.yarnrc` with `--ignore-engines true` to skip engine checks. Also move `yarn install` for test subdirectories from `test/crashtracker/index.js` into `scripts/test.sh` so dependencies are installed before Node loads the test file.
gyuheon0h
approved these changes
Mar 3, 2026
tlhunter
pushed a commit
that referenced
this pull request
Mar 19, 2026
Set up ESLint with @eslint/js, @stylistic/eslint-plugin, eslint-plugin-n, eslint-plugin-unicorn, and eslint-plugin-import-x. Add an eslint.config.js with project-specific overrides (CJS mode, Node.js >=18, 1tbs brace style, kebab-case filenames, prefer-const, import ordering, etc.) and a lint CI job in the build workflow. Apply all auto-fixable and manual lint fixes across the codebase: - Use node: protocol for built-in requires - Replace var/let with const where appropriate - Add trailing commas, remove semicolons, fix spacing - Rename files to kebab-case (test_utils.js -> test-utils.js, test_wasm.js -> test-wasm.js, process_discovery.js -> process-discovery.js) - Replace .find() equality checks with .includes() - Remove unused catch bindings - Use top-level await where applicable - Auto-install test subdirectory dependencies in test.sh
tlhunter
pushed a commit
that referenced
this pull request
Mar 20, 2026
Set up ESLint with @eslint/js, @stylistic/eslint-plugin, eslint-plugin-n, eslint-plugin-unicorn, and eslint-plugin-import-x. Add an eslint.config.js with project-specific overrides (CJS mode, Node.js >=18, 1tbs brace style, kebab-case filenames, prefer-const, import ordering, etc.) and a lint CI job in the build workflow. Apply all auto-fixable and manual lint fixes across the codebase: - Use node: protocol for built-in requires - Replace var/let with const where appropriate - Add trailing commas, remove semicolons, fix spacing - Rename files to kebab-case (test_utils.js -> test-utils.js, test_wasm.js -> test-wasm.js, process_discovery.js -> process-discovery.js) - Replace .find() equality checks with .includes() - Remove unused catch bindings - Use top-level await where applicable - Auto-install test subdirectory dependencies in test.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Add ESLint to the project with a comprehensive set of plugins to enforce code quality, consistency, and best practices across all JavaScript files. A dedicated
lintCI job is added as well.Plugins
@eslint/js-- ESLint recommended rules as the baseline@stylistic/eslint-plugin-- Formatting rules (no semicolons, single quotes, trailing commas, 2-space indent, 1tbs brace style)eslint-plugin-n-- Node.js-specific rules (supported features, proper module usage)eslint-plugin-unicorn-- Additional best-practice rules (with CommonJS-incompatible rules likeprefer-moduledisabled)eslint-plugin-import-x-- Import/require ordering and validationCodebase changes
All existing files have been auto-fixed or manually updated to comply with the new rules. Notable changes include:
node:protocol prefix added to all built-in module importssnake_casetokebab-case(test_utils.js,process_discovery.js,test_wasm.js).includes()over.find(),Math.trunc()over| 0,for...ofover.forEach())Review tip
This PR is best reviewed commit-by-commit. Each commit adds one plugin or addresses one concern, making it easier to see what changed and why.