0

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"}]

Monsieur Sam
  • 333
  • 1
  • 6
  • 20

1 Answers1

3

You can now flexibly allow certain identifiers (regexp also) to be non-camelcase:

{
    "rules": {
        "camelcase": ["error", {"allow": ["aa_bb"]}]
    }
}

See: https://eslint.org/docs/rules/camelcase#allow

artegen
  • 131
  • 1
  • 4