@connectedcars/eslint-plugin-react-i18n

1.0.0 • Public • Published

Getting started

Installation

npm install @connectedcars/eslint-plugin-react-i18n

ESlint config

Open your eslint config file and add the following under rules:

"@connectedcars/react-i18n/checks": "error"

Options

It's also possible to change some of the default options such as:

"@connectedcars/react-i18n/checks": [
  "error",
  {
    "globalData": [
      "p",
      "div",
      "strong"
    ],
    "replaceStringRegex": {
      "pattern": "{__KEY__}"
    },
    "expressions": {
      "t": ["singular", "data", "context"],
      "tx": ["singular", "data", "context"],
      "tn": ["count", "singular", "plural", "data", "context"],
      "tnx": ["count", "singular", "plural", "data", "context"],
    }
  }
]

Readme

Keywords

none

Package Sidebar

Install

npm i @connectedcars/eslint-plugin-react-i18n

Weekly Downloads

281

Version

1.0.0

License

MIT

Unpacked Size

8.43 kB

Total Files

6

Last publish

Collaborators

  • jagdos
  • jt_connectedcars
  • mex
  • fg-cc
  • torbenkikkert
  • connectedcars-cloudbuild
  • mtjcc
  • urcra
  • viter
  • chribsen
  • madspelt
  • sta-cc
  • hakimeg
  • mwa-cc
  • yannlyng
  • aabnpm
  • lmfros
  • tjansson
  • lbrcc
  • thormortensen
  • gbullock
  • bismlb
  • rljconnected
  • miafoo
  • emillykkeg
  • aakjaer
  • nikokaae