问题描述
我正在使用date-fns
这样的函数导入:
import addHours from 'date-fns/addHours';
import addDays from 'date-fns/addDays';
但是我也从eslint那里得到一个错误:
node_modules/date-fns/typings.d.ts' imported multiple times.eslintimport/no-duplicates
怎么了?这不是多次导入,我是从不同级别导入的。
如何在不禁用多个导入规则的情况下进行修复?
解决方法