Definition for rule typescript-eslint no-shadow was not found

0 votes

I am working on migrating from tslint to eslint. The basic migration seems to have gone smoothly (well, "smoothly" -- got some kinds in the rules that need to get worked out apparently), but I've run across this and I have no idea how to get past it:

1:1 error Definition for rule '@typescript-eslint/no-shadow' was not found @typescript-eslint/no-shadow

I've modified the .eslintrc.js file like so (parts snipped for brevity):

module.exports = {
    "env": {
        "browser": true,
        "es6": true,
        "node": true
    },
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "project": "tsconfig.json",
        "sourceType": "module"
    },
    "plugins": [
        "eslint-plugin-import",
        "@angular-eslint/eslint-plugin",
        "@typescript-eslint",
        "@typescript-eslint/tslint"
    ],
    "rules": {
        // Many unrelated plugins, all rules, none mentioning no-shadow

        "no-shadow": "off",
        "@typescript-eslint/no-shadow": ["error", { "hoist": "all" }],

        // Many other unrelated plugins, all rules, none mentioning no-shadow.  But I thought
        // This next one may be helpful.

        "@typescript-eslint/tslint/config": [
            "error",
            {
                "rules": {
                    "import-spacing": true,
                    "whitespace": [
                        true,
                        "check-branch",
                        "check-decl",
                        "check-operator",
                        "check-separator",
                        "check-type"
                    ]
                }
            }
        ]
    }
};

The versions of the plugins I'm working with are (copied from package.json):

"eslint-plugin-import": "^2.19.1",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",

I'm at a loss as to what's going on, and my google searches have turned up nothing aside from "use "no-shadow": "off", which I do.

Jun 13, 2022 in TypeSript by Logan
• 2,140 points
3,483 views

1 answer to this question.

0 votes

v2.34.0 of the typescript-eslint packages is 9 months old.

Upgrade to a more recent version of typescript-eslint.

@typescript-eslint/no-shadow was added in v4.0.0

answered Jun 13, 2022 by Nina
• 3,060 points

Related Questions In TypeSript

0 votes
1 answer

TypeScript: 'tsc command not found'

A few tips in order restart the terminal restart ...READ MORE

answered Jun 7, 2022 in TypeSript by Nina
• 3,060 points
13,710 views
0 votes
0 answers

Karma, Typescript definition file not loading

I am working on setting up development ...READ MORE

Jun 22, 2022 in TypeSript by Logan
• 2,140 points
741 views
0 votes
0 answers

Is there any official Typescript definition for fabric.js?

At the moment, I am able to ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
435 views
0 votes
1 answer

Is there any official Typescript definition for fabric.js?

Typically, packages in Definitely Typed aren't official ...READ MORE

answered Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,068 views
0 votes
1 answer
0 votes
0 answers

Angular & eslint - Definition for rule '@typescript-eslint/space-infix-ops' was not found

I recently removed the tslint from my ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points
881 views
0 votes
1 answer

Cannot access web3 object with typescript and ethereum

You still need to instantiate it first. ...READ MORE

answered Sep 25, 2018 in Blockchain by slayer
• 29,350 points
2,660 views
0 votes
1 answer

How to apply zoom animation for each element of a list in angular?

Hey @Sid, do check if this link ...READ MORE

answered Jul 30, 2019 in Others by Vardhan
• 13,190 points
1,229 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP