ESLint rule import/no-extraneous-dependencies when using @simplewebauthn/typescript-types #479
Closed
ptmkenny
started this conversation in
Troubleshooting
Replies: 1 comment 1 reply
-
Hey @ptmkenny, does |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the issue
When using this library in my project, ESLint is identifying an issue:
'@simplewebauthn/typescript-types' should be listed in the project's dependencies, not devDependencies.
I am not sure if this issue is a problem with my use, ESLint, or how the types are imported.
Reproduction Steps
Here's a very simple file to reproduce the error:
Here's the ESLint rule that triggers the error:
Specifically,
devDependencies
being false triggers the error.Expected behavior
I expect ESLint not to flag an error here.
The ESLint docs state:
So I set
devDependencies
tofalse
to get it to raise an error if I import dev dependencies by mistake, but since "Type imports are ignored by default", and@simplewebauthn/typescript-types
is (I think?) a type import, then this shouldn't be triggered. I import types for other modules elsewhere in my project and I don't have this issue.SimpleWebAuthn Libraries
Beta Was this translation helpful? Give feedback.
All reactions