-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
refactor(linter): replace MIME guessing with extension check #8832
refactor(linter): replace MIME guessing with extension check #8832
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #8832 will not alter performanceComparing Summary
|
12ac972
to
684c783
Compare
b2c2cfc
to
e956297
Compare
Merge activity
|
I noticed that we were using this `mime_guess` crate, when it all it really does internally is check the extension of the file and map that to known MIME types: https://github.com/abonander/mime_guess/blob/805964fb54871f0154ee155bf21729b77ffd4a1c/src/lib.rs#L87-L90 Since we only expect JSON configuration files, I've replaced the MIME guessing with a simple extension check.
e956297
to
4fcf719
Compare
## [0.15.10] - 2025-02-06 ### Features - d6d80f7 linter: Add suggestion fixer for `eslint/no-iterator` (#8894) (dalaoshu) - 7e8568b linter: Junit reporter (#8756) (Tapan Prakash) - f4662a9 oxc_language_server: Implement `oxc.fixAll` workspace command (#8858) (Marek Vospel) ### Bug Fixes - baf3e4e linter: Correctly replace rule severity with duplicate rule name configurations (#8840) (dalaoshu) ### Performance - 8a4988d linter: Use parallel iterator directly instead of iter and parallel bridge (#8831) (Cam McHenry) ### Refactor - bb9d763 linter: Remove usage of `url` crate (#8833) (camchenry) - 4fcf719 linter: Replace MIME guessing with extension check (#8832) (camchenry) Co-authored-by: Boshen <[email protected]>
I noticed that we were using this
mime_guess
crate, when it all it really does internally is check the extension of the file and map that to known MIME types: https://github.com/abonander/mime_guess/blob/805964fb54871f0154ee155bf21729b77ffd4a1c/src/lib.rs#L87-L90Since we only expect JSON configuration files, I've replaced the MIME guessing with a simple extension check.