Skip to content

Rule suggestion: require-meta-default-options #499

Closed
@FloEdelmann

Description

@FloEdelmann

eslint/eslint#17656 added support for meta.defaultOptions in rules. See also https://github.com/eslint/rfcs/blob/main/designs/2023-rule-options-defaults/README.md.

A new lint rule should report:

  • if meta.schema is defined and not just [] and meta.defaultOptions is not defined
  • if meta.schema === [] but meta.defaultOptions is defined
  • if meta.defaultOptions is not an array
  • if meta.defaultOptions is an empty array (Only exception in the core ESLint repo is the id-denylist rule, so maybe we should add an option to disable this check for certain rules? Or just be okay with having to add an ESLint disable comment for such cases.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions