Skip to content

update-eslint-rules#604

Merged
yaacov merged 1 commit intomasterfrom
update-eslint-rules
Mar 20, 2026
Merged

update-eslint-rules#604
yaacov merged 1 commit intomasterfrom
update-eslint-rules

Conversation

@yaacov
Copy link
Copy Markdown
Owner

@yaacov yaacov commented Mar 20, 2026

Summary by CodeRabbit

  • Chores
    • Modernized ESLint config: upgraded ECMAScript target and simplified rules with a small set of explicit overrides.
    • Added file-type and test-specific linting overrides and an explicit ignores list for generated/artifact folders.
    • Removed a deprecated linting dependency and cleaned up inline ESLint suppression comments across the codebase.
    • Expanded npm lint scripts to run linting across the entire project.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f1845017-e228-4cfd-aecc-ab280fa71b06

📥 Commits

Reviewing files that changed from the base of the PR and between ac6b891 and 54e9b91.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (24)
  • eslint.config.mjs
  • package.json
  • ports/asciiport.js
  • ports/c701port.js
  • ports/testport.js
  • ports/udpport.js
  • servers/servertcp_handler.js
  • test/apis/promise.js
  • test/ports/asciiport.test.js
  • test/ports/bleport.test.js
  • test/ports/c701port.test.js
  • test/ports/rtubufferedport.test.js
  • test/ports/tcpport.test.js
  • test/ports/tcpportrtubuffered.test.js
  • test/ports/telnetport.test.js
  • test/ports/udpport.test.js
  • test/servers/serverserial.test.js
  • test/servers/servertcp.enron.test.js
  • test/servers/servertcp.test.js
  • test/servers/servertcpCallback.test.js
  • test/servers/servertcpPromise.test.js
  • test/test.js
  • test/utils/crc16.test.js
  • test/utils/lrc.test.js
💤 Files with no reviewable changes (22)
  • test/servers/servertcp.test.js
  • test/ports/bleport.test.js
  • test/ports/rtubufferedport.test.js
  • test/servers/servertcp.enron.test.js
  • test/apis/promise.js
  • test/ports/telnetport.test.js
  • test/utils/lrc.test.js
  • test/ports/c701port.test.js
  • test/test.js
  • test/utils/crc16.test.js
  • test/ports/tcpport.test.js
  • test/servers/servertcpCallback.test.js
  • test/ports/tcpportrtubuffered.test.js
  • ports/udpport.js
  • test/ports/asciiport.test.js
  • test/servers/serverserial.test.js
  • ports/c701port.js
  • test/ports/udpport.test.js
  • servers/servertcp_handler.js
  • test/servers/servertcpPromise.test.js
  • ports/testport.js
  • ports/asciiport.js
✅ Files skipped from review due to trivial changes (2)
  • package.json
  • eslint.config.mjs

📝 Walkthrough

Walkthrough

Replaced legacy stylistic ESLint wiring with @eslint/js recommended rules, raised ECMA version to 2022, added file-type and test-specific languageOptions, introduced ignores, simplified explicit rule overrides, updated lint scripts and removed the @stylistic plugin; removed several file-level ESLint-disable comments across source and tests.

Changes

Cohort / File(s) Summary
ESLint Configuration
eslint.config.mjs, package.json
Removed legacy @stylistic plugin and hand-mapped rules; switched to @eslint/js recommended config, updated ECMA version to 2022, added languageOptions overrides for **/*.js (CommonJS) and **/*.mjs (module), test Mocha globals, explicit ignores, and updated lint/lint:fix scripts.
Ports — lint comment removals
ports/asciiport.js, ports/c701port.js, ports/testport.js, ports/udpport.js
Deleted file- or line-level ESLint disable comments (e.g., no-ternary, class-methods-use-this) with no code/behavior changes.
Server — lint comment removals
servers/servertcp_handler.js
Removed file-level /* eslint-disable no-var */ directive only.
Tests — lint comment removals
test/apis/promise.js, test/ports/asciiport.test.js, test/ports/bleport.test.js, test/ports/c701port.test.js, test/ports/rtubufferedport.test.js, test/ports/tcpport.test.js, test/ports/tcpportrtubuffered.test.js, test/ports/telnetport.test.js, test/ports/udpport.test.js, test/servers/serverserial.test.js, test/servers/servertcp.enron.test.js, test/servers/servertcp.test.js, test/servers/servertcpCallback.test.js, test/servers/servertcpPromise.test.js, test/test.js, test/utils/crc16.test.js, test/utils/lrc.test.js
Removed top-of-file/inline /* eslint-disable no-undef */ directives across many test files; tests and assertions unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • fix-lint #603: Also modifies eslint.config.mjs and lint scripts; likely directly related/conflicting with these ESLint changes.

Poem

🐰 I hopped through files with ear held high,

Nibbled old disables, let new rules fly,
ECMA glows up to twenty-two,
Tests keep running — neat and true,
A tidy repo, munching lint goodbye. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'update-eslint-rules' directly describes the main focus of the PR—updating ESLint configuration and removing ESLint suppressions across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-eslint-rules
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@eslint.config.mjs`:
- Around line 27-34: Replace the CommonJS globals used for ESM files: in the
ESLint override that targets files ["**/*.mjs"] (the object containing
languageOptions with ecmaVersion, globals, sourceType), change the globals value
from globals.node to globals.nodeBuiltin so `.mjs` files get the Node ESM
built-ins instead of CommonJS-only globals.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b4710e4-b895-4d0d-a127-341d5d353062

📥 Commits

Reviewing files that changed from the base of the PR and between f408cd5 and ac6b891.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (24)
  • eslint.config.mjs
  • package.json
  • ports/asciiport.js
  • ports/c701port.js
  • ports/testport.js
  • ports/udpport.js
  • servers/servertcp_handler.js
  • test/apis/promise.js
  • test/ports/asciiport.test.js
  • test/ports/bleport.test.js
  • test/ports/c701port.test.js
  • test/ports/rtubufferedport.test.js
  • test/ports/tcpport.test.js
  • test/ports/tcpportrtubuffered.test.js
  • test/ports/telnetport.test.js
  • test/ports/udpport.test.js
  • test/servers/serverserial.test.js
  • test/servers/servertcp.enron.test.js
  • test/servers/servertcp.test.js
  • test/servers/servertcpCallback.test.js
  • test/servers/servertcpPromise.test.js
  • test/test.js
  • test/utils/crc16.test.js
  • test/utils/lrc.test.js
💤 Files with no reviewable changes (22)
  • test/test.js
  • test/ports/tcpportrtubuffered.test.js
  • test/apis/promise.js
  • test/ports/udpport.test.js
  • test/ports/telnetport.test.js
  • test/servers/servertcp.enron.test.js
  • test/servers/servertcp.test.js
  • test/ports/tcpport.test.js
  • test/ports/asciiport.test.js
  • test/ports/rtubufferedport.test.js
  • ports/udpport.js
  • servers/servertcp_handler.js
  • test/ports/bleport.test.js
  • test/utils/lrc.test.js
  • test/servers/serverserial.test.js
  • ports/testport.js
  • test/ports/c701port.test.js
  • ports/c701port.js
  • test/servers/servertcpCallback.test.js
  • test/servers/servertcpPromise.test.js
  • ports/asciiport.js
  • test/utils/crc16.test.js

Comment thread eslint.config.mjs
Signed-off-by: yaacov <kobi.zamir@gmail.com>
@yaacov yaacov force-pushed the update-eslint-rules branch from ac6b891 to 54e9b91 Compare March 20, 2026 08:30
@yaacov yaacov merged commit 7840f48 into master Mar 20, 2026
4 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Mar 20, 2026
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

Successfully merging this pull request may close these issues.

1 participant