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

feat(cli/linter): support .eslintrc.js #2214

Closed
wants to merge 2 commits into from
Closed

Conversation

DonIsaac
Copy link
Collaborator

@DonIsaac DonIsaac commented Jan 29, 2024

Adds support for JavaScript eslint configs. Configs are loaded by running node in a subprocess. This is significantly slower than simply parsing a JSON file, but increases compatibility with existing configs and should make migrating to oxc easier.

Security

Since loading JS configs requires running node, this opens the door to RCE attacks. To mitigate threats, node's experimental Permissions API is used when available.

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-linter Area - Linter A-cli Area - CLI labels Jan 29, 2024
Copy link

codspeed-hq bot commented Jan 30, 2024

CodSpeed Performance Report

Merging #2214 will not alter performance

⚠️ No base runs were found

Falling back to comparing don/cli/feat/js-config (98b057d) with main (5ac61f0)

Summary

✅ 17 untouched benchmarks

@Boshen
Copy link
Member

Boshen commented Jan 30, 2024

I'll need to test this locally.

@Boshen
Copy link
Member

Boshen commented Feb 1, 2024

I'm going to reject this feature request for a couple of reasons after sitting on this for a while:

  • This is a maintenance burden for me. It is a feature creep where we are making ourselves available to support more node specific features. To be dramatic, people may ask us to support this: https://github.com/elastic/kibana/blob/main/.eslintrc.js
  • If you look at the eslint help questions on stackoverflow, its github issues, its discord - you'll find 90% of the issues are configuration issues
  • I'm currently in the camp of static configs https://twitter.com/buildsghost/status/1742290248628146224
  • oxlint don't require node.js nor node_modules, and I want to keep it this way for a long time.

Thank you for the PR. You made me aware that this is possible, and also inspired me to experiment with this #2218

@Boshen Boshen closed this Feb 1, 2024
@Boshen Boshen deleted the don/cli/feat/js-config branch March 25, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area - CLI A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants