Skip to content

Docs: correct example of parameter-properties #4878

@miZyind

Description

@miZyind

Suggested Changes

I got this error when I first try this new rule by following the example on the document:

Configuration for rule "@typescript-eslint/parameter-properties" is invalid:
Value "parameter-properties" should be equal to one of the allowed values.

and here is my config:

"@typescript-eslint/parameter-properties": [
  "error",
  {
    "prefer": "parameter-properties"
  }
]

I checked the source code.
And found that the correct values of the prefer option should be: class-property, parameter-property.
However, the document shows class-properties and parameter-properties.

According to the schema of the source code, the allows option should be corrected to allow as well.

I've prepared for the PR: https://github.com/miZyind/typescript-eslint/tree/docs/parameter-properties

Affected URL(s)

https://typescript-eslint.io/rules/parameter-properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions