cletusw / eslint-plugin-local-rules

A plugin for ESLint that allows you to use project-specific rules
MIT License
158 stars 9 forks source link

Plugin fails when `eslint-local-rules` is in a yarn workspace #17

Closed pm0u closed 1 year ago

pm0u commented 1 year ago

Having a setup like:

.
└── src/
    ├── app/
    │   └── eslint-local-rules.js
    └── app2

Running eslint from src/app fails. The issue is that the node_modules folder (and ESLint install) is in src so it only starts looking there for the eslint-local-rules file.

I would expect that this plugin would look under src/app for the eslint-local-rules file.

Error: Failed to load plugin 'eslint-plugin-local-rules' declared in '.eslintrc.js': eslint-plugin-local-rules: Cannot find "eslint-local-rules{.js,.cjs} or eslint-local-rules/index.js (checked all ancestors of "/src/node_modules/eslint-plugin-local-rules"