Socket
Book a DemoInstallSign in
Socket

eslint-plugin-richlab

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-richlab

An ESLint plugin created by RichLab

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
5
Weekly downloads
 
Created
Source

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

Keywords

eslint

FAQs

Package last updated on 25 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.