am4themes_animated ESlint 导入错误
am4themes_animated ESlint error for import
我在我的 angular 项目中使用 am4themes_animated,并且正在转向 eslint 而不是 tslint。
import am4themes_animated from '@amcharts/amcharts4/themes/animated';
但是,ESlint 给出了以下错误。
Identifier 'am4themes_animated' is not in camel case camelcase
我试过使用像 import am4themes_animated as am4themesAnimated from '@amcharts/amcharts4/themes/animated';
这样的别名,但它不允许这样做。
这可能是一个非常新手的问题,但如果有人能提供帮助,我将不胜感激。谢谢。
(我的第一个问题,边学边学,有错误请见谅)
更新:
import * as am4themesAnimated
不起作用,因为我需要像这样将常量作为参数传递:am4core.useTheme(am4themes_animated);
仅通过参考 am4Charts Themes 文档即可解决问题。
我们基本上可以随意命名导入的主题。
我在我的 angular 项目中使用 am4themes_animated,并且正在转向 eslint 而不是 tslint。
import am4themes_animated from '@amcharts/amcharts4/themes/animated';
但是,ESlint 给出了以下错误。
Identifier 'am4themes_animated' is not in camel case camelcase
我试过使用像 import am4themes_animated as am4themesAnimated from '@amcharts/amcharts4/themes/animated';
这样的别名,但它不允许这样做。
这可能是一个非常新手的问题,但如果有人能提供帮助,我将不胜感激。谢谢。 (我的第一个问题,边学边学,有错误请见谅)
更新:
import * as am4themesAnimated
不起作用,因为我需要像这样将常量作为参数传递:am4core.useTheme(am4themes_animated);
仅通过参考 am4Charts Themes 文档即可解决问题。 我们基本上可以随意命名导入的主题。