checkdigit/eslint-config

Allow magic numbers when all you are doing is defining a constant.

Opened this issue · 0 comments

It seems odd that I get an error if I do something like:

const LATEST_ALLOWED_VALIDITY = 90 * 24 * 60 * 60 * 1000; // 90 days in the future in milliseconds

The error is on 90 being a magic number but I'm really just defining a constant and I shouldn't need a separate constant just for the number 90.