[no-magic-number] fails on numeric literal types #99
Labels
bug
Something isn't working
has pr
there is a PR raised to close this
package: parser
Issues related to @typescript-eslint/parser
Note: this issue was originally filed here eslint/typescript-eslint-parser#588.
The original issue (now archived) was marked as closed, and suggested as being fixed by eslint/typescript-eslint-parser#596, however it does still appear to be an issue when using the latest
1.0.0
versions of the parser & plugin from the@typescirpt-eslint
monorepo (unless I'm holding it wrong).What code were you trying to parse?
What did you expect to happen?
No errors
What actually happened?
The magic numbers that the rule is complaining about are the allowed values of the Typescript numeric literal type type Amount = 10 | -10.
I'm not aware of any way to define a numeric literal type that doesn't violate the magic numbers rule?
Versions
@typescript-eslint/parser
1.0.0
TypeScript
3.2.1
ESLint
5.11.1
node
11.5.0
npm
6.5.0
The text was updated successfully, but these errors were encountered: