You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
someoftherules import directly from @typescript-eslint/types, but the dependency is listed under devDependencies in the package.json. this means that running eslint with this plugin and any of those rules enabled (no-re-export, sort-react-dependencies, no-reassign-imports, no-restricted-imports) when using Yarn PnP causes the following error:
Error: eslint-plugin-canonical tried to access @typescript-eslint/types, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
moving the dependency in package.json from devDependencies → dependencies will fix the issue.
note that i worked around it by adding the following to my .yarnrc.yml:
some of the rules import directly from
@typescript-eslint/types
, but the dependency is listed underdevDependencies
in thepackage.json
. this means that running eslint with this plugin and any of those rules enabled (no-re-export
,sort-react-dependencies
,no-reassign-imports
,no-restricted-imports
) when using Yarn PnP causes the following error:moving the dependency in
package.json
fromdevDependencies
→dependencies
will fix the issue.note that i worked around it by adding the following to my
.yarnrc.yml
:The text was updated successfully, but these errors were encountered: