0.0.9 • Published 7 months ago

eslint-plugin-react-native-i18n v0.0.9

Weekly downloads
78
License
ISC
Repository
-
Last release
7 months ago

eslint-plugin-react-native-i18n

ESLint plugin for React Native and i18n

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-react-native-i18n:

$ npm install eslint-plugin-react-native-i18n --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-react-native-i18n globally.

Usage

Add react-native-i18n to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "react-native-i18n"
    ]
}

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

{
    "rules": {
        "react-native-i18n/no-unknown-key": "error"
    }
}

Then add the required settings under the sessions section.

{
    "settings": {
        "i18n": {
            "allowEmpty": true,
            "languages": {
                "en": "i18n/en.js",
                "nl": "i18n/nl.json",
            }
        }
    }
}

Note that using .js language files is supported but you can't use ES6's export default { .. }. Use module.export = { .. } instead.

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

8 months ago

0.0.6

5 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago