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
Fix function-calc-no-unspaced-operator
performance
#7505
Fix function-calc-no-unspaced-operator
performance
#7505
Conversation
This fixes the broken benchmark script (`npm run benchmark`) The error reason is that `rules[ruleName]` has returned a `Promise` since 16.0.0. ```sh-session $ npm run benchmark-rule -- value-keyword-case lower ... const rule = ruleFunc(primary, secondary, context); ^ TypeError: ruleFunc is not a function ... ``` Also, this changes `parserOptions.ecmaVersion` in the ESLint config to allow top-level `await`.
How to measure: ```shell npm run -s benchmark-rule -- function-calc-no-unspaced-operator true ``` Before: ``` Warnings: 0 Mean: 125.72145828571429 ms Deviation: 14.960783775263804 ms ``` After: ``` Warnings: 0 Mean: 110.21394642857142 ms Deviation: 10.1318139617483 ms ```
🦋 Changeset detectedLatest commit: cebe29f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you for this 🙇
@romainmenke Thanks for the quick review! Can you take a quick look at #7504, too? It's a blocker for this PR. |
Follow-up to #6923
Wait for #7504 (Note that the base branch is
fix-benchmark-script
)How to measure:
npm run -s benchmark-rule -- function-calc-no-unspaced-operator true
Before:
After: