Skip to content
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

ava/use-test does not allow anyTest in .cts and .mts files #353

Open
gebsh opened this issue Jun 5, 2023 · 0 comments
Open

ava/use-test does not allow anyTest in .cts and .mts files #353

gebsh opened this issue Jun 5, 2023 · 0 comments

Comments

@gebsh
Copy link

gebsh commented Jun 5, 2023

Currently, the ava/use-test allows naming the default import anyTest instead of test in TypeScript files:

In a TypeScript file (.ts or .tsx) AVA can be assigned to a variable named anyTest in order to define the types of t.context (see Typing t.context).

However, TS 4.7 introduced new file extensions, .cts and .mts, that are not recognized by this rule.

For example, the following import statement does not report any violations when placed in a file foo.ts:

import anyTest from 'ava';

Renaming the file to foo.cts or foo.mts produces the following warning, though:

AVA should be imported as `test`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant