ESLint only allow specified named imports for module

Viewed 118

Is there a rule in ESLint that only allows you to import specified named imports from module? Let's say I have the following import statement:

import { Airline, Airport } from '@prisma/client';

And I want only allow to import specific name from that module:

import { Prisma, PrismaClient } from '@prisma/client'; 

I found the no-restricted-imports but it seems to only have allow all except definition pattern and I need disallow all except.

0 Answers
Related