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 some more @typescript-eslint rules #7287

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Oct 1, 2024

  1. ESLint: enable @typescript-eslint/ban-types

    This fixes the error:
    
    error  Don't use `{}` as a type. `{}` actually means "any non-nullish value".
    - If you want a type meaning "any object", you probably want `object` instead.
    - If you want a type meaning "any value", you probably want `unknown` instead.
    - If you want a type meaning "empty object", you probably want `Record<string, never>` instead.
    - If you really want a type meaning "any non-nullish value", you probably want `NonNullable<unknown>` instead  @typescript-eslint/ban-types
    pjonsson committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    4b55364 View commit details
    Browse the repository at this point in the history
  2. ESLint: return from onToggle functions

    This makes the return type correspond
    to the boolean that the comment at
    the interface suggests.
    pjonsson committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c8b8bf5 View commit details
    Browse the repository at this point in the history
  3. ESLint: enable @typescript-eslint/unified-signatures

    There is a single type signature
    that does not pass this check in the current
    code base, so update that signature and
    enable the lint rule.
    pjonsson committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    803e50d View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. ESLint: enable @typescript-eslint/no-useless-constructor

    Remove constructors that just call
    super() with their arguments and
    enable @typescript-eslint/no-useless-constructor.
    pjonsson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    09f6994 View commit details
    Browse the repository at this point in the history