eslint-plugin-react-intl-universal
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

eslint-plugin-react-intl-universal

react-intl-universal linting rules for Alibaba React Intl Universal internationalization library.

Installation

$ npm install eslint-plugin-react-intl-universal --save-dev
$ yarn add -D eslint-plugin-react-intl-universal

Usage

Add react-intl-universal to the plugins section of your .eslintrc configuration file.

{
  "plugins": ["react-intl-universal"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "react-intl-universal/no-literal-string": "error",
    "react-intl-universal/id-missing": ["error", { "locales": ["src/locales/en-US.json"] }]
  }
}

or

{
  "extends": ["plugin:react-intl-universal/recommended"]
}
  • By default id-missing rule, list of locale files, defaults to ['locales/en-US.json']

Supported Rules

  • id-missing - This rule was based on the rule in this repository.
  • no-literal-string - This rule aims to avoid developers to display literal string directly to users without translating them.

Thanks

License

eslint-plugin-react-intl-universal is licensed under the MIT License.

Package Sidebar

Install

npm i eslint-plugin-react-intl-universal

Weekly Downloads

153

Version

1.0.4

License

MIT

Unpacked Size

37.7 kB

Total Files

37

Last publish

Collaborators

  • vitu.soares