Skip to content

Commit

Permalink
Updated consistent-type-imports
Browse files Browse the repository at this point in the history
Added type assertion for json files
  • Loading branch information
rielAsh24 committed Oct 11, 2023
1 parent e50d1a3 commit fad89c7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ ruleTester.run('consistent-type-imports', rule, {
`,
options: [{ prefer: 'no-type-imports' }],
},
{
code: `
import * as Type from 'foo' assert { type: 'json' };
const a: typeof Type = Type;
`,
options: [{ prefer: 'no-type-imports' }],
dependencyConstraints: {
typescript: '4.5',
},
},
`
import { type A } from 'foo';
type T = A;
Expand Down

0 comments on commit fad89c7

Please sign in to comment.