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

Fix function-calc-no-unspaced-operator performance #7505

Merged
merged 5 commits into from
Jan 30, 2024

Commits on Jan 30, 2024

  1. Fix benchmark script

    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`.
    ybiquitous committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    e664303 View commit details
    Browse the repository at this point in the history
  2. Fix function-calc-no-unspaced-operator performance

    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
    ```
    ybiquitous committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    64c2f17 View commit details
    Browse the repository at this point in the history
  3. Add changelog item

    ybiquitous committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c0d0031 View commit details
    Browse the repository at this point in the history
  4. Build file

    ybiquitous committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    7c0cc19 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cebe29f View commit details
    Browse the repository at this point in the history