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 in TypeSript by Logan
• 1,580 points
57 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 by Nina
• 2,900 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 in TypeSript by Nina
• 2,900 points
62 views
0 votes
0 answers

Karma, Typescript definition file not loading

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

Jun 22 in TypeSript by Logan
• 1,580 points
13 views
0 votes
1 answer

TypeScript Object assign gives me an error property assign does not exist on type ObjectConstructor

For TypeScript 2.1 and higher, you can ...READ MORE

answered May 31 in TypeSript by Nina
• 2,900 points
31 views
0 votes
1 answer

What is "not assignable to parameter of type never" error in TypeScript?

All you have to do is define ...READ MORE

answered May 31 in TypeSript by Nina
• 2,900 points
47 views
0 votes
1 answer
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,310 points
1,807 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,200 points
476 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP