Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

RegExp triggers false positive no-magic-numbers #287

Closed
@mdebruijne

Description

@mdebruijne

What version of TypeScript are you using?
2.3.3

What version of typescript-eslint-parser are you using?
3.0.0

What code were you trying to parse?
echo "console.log(typeof /[a-z]/)" | eslint --stdin --no-eslintrc --parser typescript-eslint-parser --rule '"no-magic-numbers": ["error"]'

What did you expect to happen?
Same result as with default parser; echo "console.log(typeof /[a-z]/)" | eslint --stdin --no-eslintrc --rule '"no-magic-numbers": ["error"]'

no errors, exitcode 0

What happened?
1:20 error No magic number: /[a-z]/ no-magic-numbers
1 problem (1 error, 0 warnings)

exitcode 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions