Skip to content

[member-naming] Should match constructor args #765

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

Closed
antoine-pous opened this issue Jul 27, 2019 · 0 comments · Fixed by #771
Closed

[member-naming] Should match constructor args #765

antoine-pous opened this issue Jul 27, 2019 · 0 comments · Fixed by #771
Labels
bug Something isn't working good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@antoine-pous
Copy link

antoine-pous commented Jul 27, 2019

Repro

{
  "rules": {
    "@typescript-eslint/no-parameter-properties": ["error", {
      "allows": [
        "private"
      ]
    }],
    "@typescript-eslint/member-naming": ["error", {
      "private": "^__"
    }]
  }
}
class Test {
  constructor(private myArg: string) {
  
  }
}

Expected Result
It should emit an error, due to the configuration myArg must be __myArg

Actual Result
No error

Versions

package version
@typescript-eslint/eslint-plugin 1.13.0
@typescript-eslint/parser 1.13.0
TypeScript 3.4.5
ESLint 6.1.0
node 12.6.0
npm 6.10.2
@antoine-pous antoine-pous added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Jul 27, 2019
@antoine-pous antoine-pous changed the title [member-naming] Should ma [member-naming] Should match constructor args Jul 27, 2019
@bradzacher bradzacher added bug Something isn't working good first issue Good for newcomers and removed triage Waiting for team members to take a look labels Jul 27, 2019
@bradzacher bradzacher added the has pr there is a PR raised to close this label Jul 29, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants