2.0.0 • Published 9 years ago

eslint-plugin-richlab v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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
2.0.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago