Skip to content

Bug: func-names schema allows extra elements #20134

Description

@mdjermanovic

Environment

Node version: v22.14.0
npm version: 10.9.2
Local ESLint version: v9.35.0
Global ESLint version: no
Operating System: windows

What parser are you using?

Default (Espree)

What did you do?

Configuration
export default [{]];
/*eslint func-names: ["error", "always", { "generators": "never" }, "foo"]*/

What did you expect to happen?

An error saying that the configuration for func-names is invalid due to an extra element "foo".

What actually happened?

No errors.

Link to Minimal Reproducible Example

https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgZnVuYy1uYW1lczogW1wiZXJyb3JcIiwgXCJhbHdheXNcIiwgeyBcImdlbmVyYXRvcnNcIjogXCJuZXZlclwiIH0sIFwiZm9vXCJdKi8iLCJvcHRpb25zIjp7InJ1bGVzIjp7fSwibGFuZ3VhZ2VPcHRpb25zIjp7InBhcnNlck9wdGlvbnMiOnsiZWNtYUZlYXR1cmVzIjp7fX19fX0=

Participation

  • I am willing to submit a pull request for this issue.

There's already a pull request: #20119

Additional comments

Per our policies, this is a breaking change (see #20119 (comment)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionbreakingThis change is backwards-incompatiblebugESLint is working incorrectlyrepro:yesIssues with a reproducible example

    Type

    No type

    Projects

    • Status
      Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions