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
Description
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