Skip to content

fix: update linting commands to use npx for better compatibility#6840

Merged
sid-bruno merged 3 commits intousebruno:mainfrom
kanakkholwal:fix/lint-script-powershell-compatibility
Jan 21, 2026
Merged

fix: update linting commands to use npx for better compatibility#6840
sid-bruno merged 3 commits intousebruno:mainfrom
kanakkholwal:fix/lint-script-powershell-compatibility

Conversation

@kanakkholwal
Copy link
Contributor

@kanakkholwal kanakkholwal commented Jan 16, 2026

Description

fix for #6839

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • Chores
    • Added a new development dependency to enable setting environment-based Node options for tooling.
    • Updated linting scripts to apply Node memory limits via environment variables and invoke ESLint through the package runner, improving consistency and reliability of lint executions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

Walkthrough

Replaced the node wrapper and command-substitution in package.json lint scripts with cross-env NODE_OPTIONS="--max_old_space_size=4096" npx eslint (and --fix), and added cross-env@10.1.0 to devDependencies.

Changes

Cohort / File(s) Change Summary
npm scripts & deps
package.json
Added devDependency cross-env@10.1.0. Updated scripts.lint and scripts["lint:fix"] to use cross-env NODE_OPTIONS="--max_old_space_size=4096" npx eslint (and --fix) instead of node --max_old_space_size=4096 $(npx which eslint).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • helloanoop
  • lohit-bruno

Poem

cross-env whispers to Node's heap,
npx wakes eslint from its sleep.
Shell tricks gone, the command is clean,
small change, smoother linting scene. ✨

🚥 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 accurately describes the main change: updating linting commands to use npx for cross-platform compatibility, which aligns with the PR's purpose of fixing PowerShell compatibility issues.
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.


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.

@kanakkholwal
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kanakkholwal kanakkholwal marked this pull request as ready for review January 16, 2026 17:30
Copilot AI review requested due to automatic review settings January 16, 2026 17:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the ESLint invocation commands in package.json to use npx's built-in --node-options flag instead of shell command substitution, improving cross-platform compatibility while maintaining the same memory allocation configuration.

Changes:

  • Replaced shell command substitution syntax with npx native option passing for both lint and lint:fix commands
  • Maintained the same memory allocation setting (4096MB) for ESLint execution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sid-bruno
Copy link
Collaborator

I've made changes, can you verify it's working for you on Windows?

Copy link
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

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 86-87: Update the package.json npm scripts "lint" and "lint:fix"
to use JSON-escaped double quotes for NODE_OPTIONS instead of single quotes so
Windows cmd.exe parses the option correctly; locate the "lint" and "lint:fix"
script entries and replace NODE_OPTIONS='--max_old_space_size=4096' with the
JSON-escaped form NODE_OPTIONS=\"--max_old_space_size=4096\" in both scripts.

@kanakkholwal
Copy link
Contributor Author

kanakkholwal commented Jan 21, 2026

I've made changes, can you verify it's working for you on Windows?

Yes they are working! @sid-bruno

@sid-bruno sid-bruno merged commit 0fb605a into usebruno:main Jan 21, 2026
4 of 5 checks passed
FraCata00 pushed a commit to FraCata00/bruno that referenced this pull request Feb 9, 2026
…bruno#6840)

* fix: update linting commands to use npx for better compatibility

* chore: update cross-env version and adjust lint scripts

* Fix lint command syntax in package.json

---------

Co-authored-by: Sid <siddharth@usebruno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants