@elastic/eslint-plugin-react-intl

    1.2.0 • Public • Published

    eslint-plugin-react-intl

    Note: This is a fork from http://npmjs.org/package/eslint-plugin-react-intl.

    react-intl (2.0) specific linting rules for ESLint

    Installation

    Install ESLint either locally or globally.

    $ npm install eslint

    If you installed ESLint globally, you have to install React-intl plugin globally too. Otherwise, install it locally.

    $ npm install eslint-plugin-react-intl

    Configuration

    Add plugins section and specify ESLint-plugin-React as a plugin.

    {
      "plugins": [
        "@elastic/eslint-plugin-react-intl"
      ]
    }

    If it is not already the case you must also configure ESLint to support JSX.

    With ESLint 1.x.x:

    {
      "ecmaFeatures": {
        "jsx": true
      }
    }

    With ESLint 2.x.x:

    {
      "parserOptions": {
        "ecmaFeatures": {
          "jsx": true
        }
      }
    }

    List of supported rules

    • string-is-marked-for-translation: Catch strings that aren't marked for translation, e.g. contained in a component from react-intl 2.0.
    • is-valid-icu-message-syntax: Catch defaultMessage attributes that aren't valid ICU message syntax
    • no-inline-translations-with-formatmessage: Forbid calls to formatMessage() from using literal translations, because there are not picked up by babel-plugin-react-intl.

    Thanks

    License

    ESLint-plugin-React-intl is licensed under the MIT License.

    Keywords

    none

    Install

    npm i @elastic/eslint-plugin-react-intl

    DownloadsWeekly Downloads

    146

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    140 kB

    Total Files

    12

    Last publish

    Collaborators

    • breehall
    • trevorpierce
    • glitteringkatie
    • chandlerprall
    • snide
    • chrisronline
    • cchaos
    • jen-huang
    • spalger
    • delvedor
    • courtewing
    • lukasolson
    • ccowan
    • cjcenizal
    • jbudz
    • tylersmalley
    • thomasneirynck
    • weltenwort
    • timroes
    • pugnascotia
    • zinckiwi
    • brandon.kobel
    • nreese
    • elasticdog
    • mgreau
    • fatmcgav
    • mindbat
    • itsmed
    • tylerjl
    • chris.koehnke.at.elastic
    • jonahbull
    • jarpy
    • leathekd
    • drewr
    • nyurik
    • crazybus
    • lukeelmers
    • ddillinger
    • joshdover
    • jasonstoltz
    • bamieh
    • markov00
    • thompsongl
    • ryan.haywood
    • olksdr
    • fxdgear
    • joshmock
    • jahtalab
    • vignesh.shanmugam
    • watson
    • rhodesjason
    • nik9000
    • jmlrt
    • eliperelman
    • mattkime
    • constancecchen
    • yakhinvadim
    • afoucret
    • nickpeihl
    • axw
    • mistic
    • elasticmachine
    • gtback
    • ygel
    • johannes.reuter.elastic
    • pickypg
    • gmmorris
    • richard.kuzsma
    • alanstorm
    • trentm
    • andrewvc-elastic
    • jorge.sanz
    • stratoula
    • nkammah
    • streamich
    • nickofthyme
    • chloeruka