eslint-plugin-openreachtech

1.0.1 • 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/no-unexpected-multiline: 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

Package Sidebar

Install

npm i eslint-plugin-openreachtech

Weekly Downloads

223

Version

1.0.1

License

MIT

Unpacked Size

33.6 kB

Total Files

15

Last publish

Collaborators

  • steweucen
  • eg-easy