[英]Identifier is not a camel case
I have to import from a module and I have an error Identifier 'locale_en' is not in camel case.我必须从模块导入,但出现错误 Identifier 'locale_en' is not in camel case。 How can I do to resolve this.
我该怎么做才能解决这个问题。
import locale_en from 'react-intl/locale-data/en'
I use the module 'react-intl' and I try to add this : camelcase: ["error", {properties: "never"}]
in my rules and it's still not working我使用模块'react-intl'并尝试在我的规则中添加:
camelcase: ["error", {properties: "never"}]
,但它仍然无法正常工作
Edit : I find the solution : the rules is : "camelcase": [1, {"properties": "never"}]
编辑:我找到了解决方案:规则是:
"camelcase": [1, {"properties": "never"}]
You can now flexibly allow
certain identifiers (regexp also) to be non-camelcase:您现在可以灵活地
allow
某些标识符(也包括正则表达式)为非驼峰式:
{
"rules": {
"camelcase": ["error", {"allow": ["aa_bb"]}]
}
}
See: https://eslint.org/docs/rules/camelcase#allow见: https ://eslint.org/docs/rules/camelcase#allow
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.