-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prefer-module
: allow module
as TSIndexSignature names or TSTypeAliasDeclaration ids
#2209
prefer-module
: allow module
as TSIndexSignature names or TSTypeAliasDeclaration ids
#2209
Conversation
Take this as example
Put your code in |
Thanks for the help. |
Added more, but feel free to add more. Thanks! |
Tests are failing |
fisker added an additional case where the type name is module. I'm not sure how I can fix that. Is there a way to run only a specific test? Maybe then I can try to debug it. |
I'll take a look. |
prefer-module
: allow module
as TSIndexSignature names or TSTypeAliasDeclaration ids
@fisker It looks like we missed a case: type Data = {
[module in 'foo']: number;
}; e.g. type Data = {
[module in keyof string]: number;
}; I could prepare a PR for that, but for that I need to know how I can run a specific test(case) only. |
Currently we don't support it yet. But it should be possible if we upgrade |
I used a workaround, aka deleting all tests except for the one I wanted and created a PR with the fix: |
Fixes #2208
prefer-module
should not reportmodule
name in types #2208I tried adding a test for that, but was unable to do that (maybe because it requires ts support):
So I used https://github.com/faker-js/faker/pull/2510/files#diff-7170563e0d86e93e8997b4acb856e5e494809a0ef41b9f4386f26e14bc961908R19 to test that.