Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.02 KB

File metadata and controls

50 lines (31 loc) · 1.02 KB

eslint-plugin-react-printhardcodedtext

Eslint plugin for detecting and printing hardcoded text in React JSX templates. Based on https://github.com/yannickcr/eslint-plugin-react jsx-no-literals rule

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-react-printhardcodedtext:

$ npm install https://github.com/jlgonzalezdev/eslint-plugin-react-printHardcodedText.git --save-dev

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

Usage

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

{
    "plugins": [
        "react-printhardcodedtext"
    ]
}

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

{
    "rules": {
        "react-printhardcodedtext/rule-name": 2
    }
}

Supported Rules

no-hardcoded-text