Skip to content

[no-magic-numbers] False positive for readonly properties #934

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
mrlika opened this issue Sep 2, 2019 · 0 comments · Fixed by #938
Closed

[no-magic-numbers] False positive for readonly properties #934

mrlika opened this issue Sep 2, 2019 · 0 comments · Fixed by #938
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@mrlika
Copy link

mrlika commented Sep 2, 2019

{
  "rules": {
    "@typescript-eslint/no-magic-numbers": ["error"]
  }
}
class IdbDatabase {
    public static readonly DATABASE_VERSION = 1;
}

Expected Result

No error

Actual Result

error No magic number: 1 @typescript-eslint/no-magic-numbers

Versions

package version
@typescript-eslint/eslint-plugin 2.0.0
@typescript-eslint/parser 2.0.0
TypeScript 3.5.3
ESLint 6.2.0
node 11.14.0
npm 6.7.0
@mrlika mrlika added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Sep 2, 2019
@bradzacher bradzacher added enhancement: plugin rule option New rule option for an existing eslint-plugin rule and removed triage Waiting for team members to take a look labels Sep 2, 2019
@bradzacher bradzacher added the has pr there is a PR raised to close this label Sep 3, 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
enhancement: plugin rule option New rule option for an existing eslint-plugin rule has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants