@zohodesk/eslint-plugin-no-hardcoding

1.0.3 • Public • Published

eslint-plugin-no-hardcoding

To prevent hardcoding content and to enforce usage of appropriate i18n keys

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-no-hardcoding:

$ npm install eslint-plugin-no-hardcoding --save-dev

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

Usage

Add @zohodesk/no-hardcoding to the plugins section of your .eslintrc configuration file.

{
  "plugins": ["@zohodesk/no-hardcoding"]
}

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

{
  "rules": {
    "@zohodesk/no-hardcoding/no-hardcoding": 2,
    "@zohodesk/no-hardcoding/use-getI18NValue-method-appropriately": 2
  }
}

Note: For the working of no-hardcoding rule of this plugin a properties file of name noHardcodingRuleExcludes.properties should be present in the location build/eslint in the root dirctory of the project.

Note: For the working of use-getI18NValue-method-appropriately rule of this plugin a properties file of name getI18NValueEslintRuleExcludes.properties should be present in the location build/eslint in the root dirctory of the project.

List of supported rules

  • @zohodesk/no-hardcoding/no-hardcoding,
  • @zohodesk/no-hardcoding/use-getI18NValue-method-appropriately

/@zohodesk/eslint-plugin-no-hardcoding/

    Package Sidebar

    Install

    npm i @zohodesk/eslint-plugin-no-hardcoding

    Weekly Downloads

    153

    Version

    1.0.3

    License

    none

    Unpacked Size

    33.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • deekay.zoho
    • aravindh.ts
    • arunkumar.ps
    • hariharan_vs
    • eldhose_saji
    • sankara.subramanian
    • madhubalan
    • deekay.npm
    • sheikbasheeth
    • jos33
    • rajsekar.haribalan
    • selvakumar.pl
    • muthumari
    • prakash.m
    • maheshmdr
    • _dev_johnson
    • karuppiah.r
    • navas-0968
    • vallinayagam.t
    • iambk
    • lakshmi_ts
    • mariappan.r
    • antro.j
    • ganeshkumar.m
    • vimalesan
    • skumaresan
    • kathiresan.r
    • jesinth
    • sriramamoorthy
    • lingam
    • ponkumar.s
    • sudalaimuthu
    • iniankarthick
    • johnson_raavanan
    • ksamy2020
    • kumaresanm
    • villuvicky