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

Enable the unicorn/{prefer-includes,throw-new-error} linting rules #18571

Merged
merged 2 commits into from
Aug 8, 2024

Commits on Aug 8, 2024

  1. Enable the unicorn/prefer-includes linting rule

    For more information refer to
    https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md.
    
    Fortunately this only required one change because we already use
    `.includes()` everywhere else. Note that that is mostly due to the
    `mozilla/use-includes-instead-of-indexOf` rule which we replace with
    this new rule now because it's more complete.
    timvandermeij committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    ad95df2 View commit details
    Browse the repository at this point in the history
  2. Enable the unicorn/throw-new-error linting rule

    For more information refer to
    https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md.
    
    This didn't require any changes because we already do this correctly,
    but it ensures that new code remains consistent and explicit.
    timvandermeij committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    318433b View commit details
    Browse the repository at this point in the history