I have to import from a module and I have an error 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
Edit : I find the solution : the rules is : "camelcase": [1, {"properties": "never"}]
I have to import from a module and I have an error 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
Edit : I find the solution : the rules is : "camelcase": [1, {"properties": "never"}]
-
camelcase
is not a camel case butcamelCase
is. – Bhojendra Rauniyar Commented Sep 10, 2018 at 9:03 - Definition for rule 'camelCase' was not found ... – Monsieur Sam Commented Sep 10, 2018 at 9:05
-
3
Ironic that the
camelcase
rule's name is not in camel case. – T.J. Crowder Commented Sep 10, 2018 at 9:09 - Have you tried aliasing? – user10340130 Commented Sep 10, 2018 at 9:27
- What are you talking about aliasing ? @user10340130 – Monsieur Sam Commented Sep 10, 2018 at 9:28
1 Answer
Reset to default 5You can now flexibly allow
certain identifiers (regexp also) to be non-camelcase:
{
"rules": {
"camelcase": ["error", {"allow": ["aa_bb"]}]
}
}
See: https://eslint/docs/rules/camelcase#allow