Eslint says all enums in Typescript app are “already declared in the upper scope”

If you are a user of TSLint-to-ESLint this was a bug that has since been fixed so rerunning the script with a newer version would also fix the issue, or just disable the no-shadow and enable @typescript-eslint/no-shadow

If you are using some public config that is misusing the rule then be sure to let them know, the number of people still running into this is somewhat staggering.


see @typescript-eslint/no-shadow how to use
also this section of FAQ

How to use

{
  // note you must disable the base rule as it can report incorrect errors
  "no-shadow": "off",
  "@typescript-eslint/no-shadow": ["error"]
}

Searching typescript-eslint GitHub issues shows a number of people asking the same thing.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)