eslint-plugin-openreachtech

    0.1.0 • Public • Published

    ESLint plugin Open Reach Tech inc.

    Overview

    • This is ESLint plugin by Open Reach Tech.

    • As of March 2022, the following ESLint rules are packed.

    empty-line-after-super
    indent-in-infix-expression
    newline-per-parameter
    no-else-if
    no-if-in-oneline
    no-unexpected-multiline
    

    Usage

    1. Install

      npm install --save-dev eslint-plugin-openreachtech
      
    2. Update .eslintrc settings in your application package.

      ...
      
      plugins:
        - openreachtech
      
      ...
      
      rules:
        openreachtech/empty-line-after-super: error
        openreachtech/indent-in-infix-expression: error
        openreachtech/newline-per-parameter: error
        openreachtech/no-else-if: error
        openreachtech/no-if-in-oneline: error
        openreachtech/newline-per-parameter: error
      
      ...
      
    • Error Message.

      % npx eslint .
      
      /your/project/directory/target-file.js
        129:3  18:5   error  Require empty line between super call and other statements  empty-line-after-super
      
      /your/project/directory/target-file.js
        21:20  error  Must add indent before "-"  indent-in-infix-expression
        24:21  error  Must remove indent before "-" indent-in-infix-expression
        31:20  error  Must add indent before right operand of "+" indent-in-infix-expression
        34:21  error  Must remove indent before right operand of "-" indent-in-infix-expression
      
      /your/project/directory/target-file.js
        9:8  error  Never use else-if statement  openreachtech/no-else-if
      

    Rules

    Install

    npm i eslint-plugin-openreachtech

    DownloadsWeekly Downloads

    275

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    32.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • eg-easy