[英]Identifier is not a camel case
我必須從模塊導入,但出現錯誤 Identifier 'locale_en' is not in camel case。 我該怎么做才能解決這個問題。
import locale_en from 'react-intl/locale-data/en'
我使用模塊'react-intl'並嘗試在我的規則中添加: camelcase: ["error", {properties: "never"}]
,但它仍然無法正常工作
編輯:我找到了解決方案:規則是: "camelcase": [1, {"properties": "never"}]
您現在可以靈活地allow
某些標識符(也包括正則表達式)為非駝峰式:
{
"rules": {
"camelcase": ["error", {"allow": ["aa_bb"]}]
}
}
見: https ://eslint.org/docs/rules/camelcase#allow
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.