yandex-cloud/eslint-config

couldn't find the plugin "@typescript-eslint/eslint-plugin".

ierehon1905 opened this issue · 1 comments

Hi, I don't know if I need to install @typescript-eslint/eslint-plugin manually, or there is something wrong on the side of this config. When I install it manually everything works. But this package is not in peer dept, it is in regular deps, so I thought it would work out of the box

here is my root config

{
    "extends": [
        "@yandex-cloud/eslint-config",
        "@yandex-cloud/eslint-config/prettier"
    ],
    "root": true,
    "env": {
        "node": true
    },
    "overrides": [
        {
            "files": "*.tsx",
            "rules": {
                "react-hooks/rules-of-hooks": "warn",
                "react/jsx-tag-spacing": "off"
            }
        }
    ],
    "rules": {
        "no-shadow": "off",
        "valid-jsdoc": "off"
        // "@typescript-eslint/naming-convention": "warn"
    },
    "ignorePatterns": ["dist/*", "build/*"],
    "settings": {
        "react": {
            "version": "16.0"
        }
    }
}
➜  monitoring npx eslint src 

Oops! Something went wrong! :(

ESLint: 8.11.0

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/home/leon-minasyan/arcadia/data-ui/monitoring".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install @typescript-eslint/eslint-plugin@latest --save-dev

The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in ".eslintrc » @yandex-cloud/eslint-config#overrides[0]".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

I tried forcing an override in out package.json and cleaned package-lock.json and reinstalled

{
  "overrides": {
    "@typescript-eslint/eslint-plugin": "^5.15.0"
  }
}

after this npm was able to simplify node_modules to be flat so the plugin worked

I think this either should be noted somewhere or maybe fixed :)