How to set up imported multiple times rule for date-fns in eslint?

Viewed 1161

I am using import of date-fns functions like this:

import addHours from 'date-fns/addHours';
import addDays from 'date-fns/addDays';

But also I am getting an error from eslint: node_modules/date-fns/typings.d.ts' imported multiple times.eslintimport/no-duplicates

What is wrong? It is not multiple import, I am importing from different level.

How can I fix it without disable multiple import rule?

1 Answers
Related