Skip to content

Bug: schemas of some rules allow extra properties #11396

@andreww2012

Description

@andreww2012

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Playground Link

Repro Code

-

ESLint Config

-

tsconfig

{
  "compilerOptions": {
    // ...
  }
}

Expected Result

Some rules, for example prefer-destructuring allow extra properties to be passed in options object, which should not be allowed.

While not strictly a bug, this makes it easier for typos in rule options to go unnoticed.

Actual Result

Extra properties are allowed.

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions