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
ruleTesterWithTypeScriptImports.run(`${parser}: (with TS resolver) extensions are enforced for type imports/export when checkTypeImports is set`,rule,{
673
+
valid: [
674
+
test({
675
+
code: 'import type { MyType } from "./typescript-declare.ts";',
676
+
options: [
677
+
'always',
678
+
{checkTypeImports: true},
679
+
],
680
+
parser,
681
+
}),
682
+
test({
683
+
code: 'export type { MyType } from "./typescript-declare.ts";',
684
+
options: [
685
+
'always',
686
+
{checkTypeImports: true},
687
+
],
688
+
parser,
689
+
}),
690
+
],
691
+
invalid: [
692
+
test({
693
+
code: 'import type { MyType } from "./typescript-declare";',
694
+
errors: ['Missing file extension "ts" for "./typescript-declare"'],
695
+
options: [
696
+
'always',
697
+
{checkTypeImports: true},
698
+
],
699
+
parser,
700
+
}),
701
+
test({
702
+
code: 'export type { MyType } from "./typescript-declare";',
703
+
errors: ['Missing file extension "ts" for "./typescript-declare"'],
0 commit comments