Skip to content

connectedcars/eslint-plugin-react-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"],
    }
  }
]

About

eslint plugin for @connectedcars/react-i18n

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published