ESlint doesn't see yarn workspace package

Viewed 129

I have a yarn workspace project(monorepo) that has a shared library.

Eslint fails to detect the common library even though it is listed in the package.json in dependencies.

If I disable the eslint completely the project works.

I am using vitejs on a react project with the vite-plugin-eslint eslint plugin.

error  '@****/common' should be listed in the project's dependencies. Run 'npm i -S @****/common' to add it 

ESlint packs

    "eslint": "^7.2.0",
    "eslint-config-airbnb": "18.2.1",
    "eslint-config-airbnb-typescript": "^12.3.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jest": "^24.3.7",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.4.0",
    "eslint-plugin-react": "^7.21.5",
    "eslint-plugin-react-hooks": "^4.2.0",
0 Answers
Related