This package has been deprecated

Author message:

RichLab close

eslint-plugin-richlab

2.0.0 • Public • Published

eslint-plugin-richlab

An ESLint plugin created by RichLab.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-richlab:

$ npm install eslint-plugin-richlab --save-dev

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

Usage

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

{
    "plugins": [
        "richlab"
    ]
}

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

{
    "rules": {
        "richlab/rule-name": 2
    }
}

Supported Rules

avoid-ios9-viewport-bug

window.innerWidth and window.innerHeight may have unexpected value in iOS9 Mobile Saferi because the bug. This rule resticts to use window.innerWidth and window.innerHeight and recommends to use document.documentElement.clientWidth or document.Element.clientHeight instead of that properties.

var innerWidth = window.innerWidth; // error
var innerHeight = window.innerHeight; // error
 
var innerWidth = document.documentElement.clientWidth; // not error
var innerHeight = document.documentElement.clientHeight; // not error

Package Sidebar

Install

npm i eslint-plugin-richlab

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • bonegollira
  • keiskimu
  • koozaki
  • pirosikick
  • richlab