Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elastic/eslint-plugin-react-intl

Package Overview
Dependencies
Maintainers
25
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/eslint-plugin-react-intl

react-intl specific linting rules for ESLint

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
790
increased by23.24%
Maintainers
25
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 14 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc