eslint-plugin-qi-react-intl

React-intl specific linting rules for ESLint

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-qi-react-intl
1.1.06 years ago6 years agoMinified + gzip package size for eslint-plugin-qi-react-intl in KB

Readme

ESLint-plugin-React-intl
React-intl (2.0) specific linting rules for ESLint
Publishing NPM package
  1. Update version in package.json
"version": "1.0.1",

  1. Publish
$ npm publish
+ eslint-plugin-qi-react-intl@1.0.1
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-qi-react-intl
Configuration
Add plugins section and specify ESLint-plugin-React as a plugin.
{
  "plugins": [
    "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.
License
ESLint-plugin-React-intl is licensed under the MIT License.