New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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 - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

20

lib/rules/avoid-ios9-viewport-bug.js

@@ -7,4 +7,4 @@ 'use strict';

var message = {
width: "Use document.documentElement.clientWidth instead of window.innerHeight",
height: "Use document.documentElement.clientHeight instead of window.innerHeight"
width: 'Use document.documentElement.clientWidth instead of window.innerHeight',
height: 'Use document.documentElement.clientHeight instead of window.innerHeight'
};

@@ -18,5 +18,19 @@

if (object.name === 'window' && property.name.match(/^inner(Width|Height)$/)) {
if (object.name === 'window' && /^inner(Width|Height)$/.test(property.name)) {
context.report(node, message[RegExp.$1.toLowerCase()]);
}
},
VariableDeclarator: function VariableDeclarator(node) {
var id = node.id;
var init = node.init;
if (!(init.type === 'Identifier' && init.name === 'window' && id.type === 'ObjectPattern')) {
return;
}
id.properties.forEach(function (property) {
if (/^inner(Width|Height)$/.test(property.key.name)) {
context.report(property, message[RegExp.$1.toLowerCase()]);
}
});
}

@@ -23,0 +37,0 @@ };

12

package.json
{
"name": "eslint-plugin-richlab",
"description": "An ESLint plugin created by RichLab",
"version": "1.0.1",
"version": "1.0.2",
"author": "Hiroyuki ANAI<pirosikick@gmail.com>",

@@ -14,2 +14,7 @@ "bugs": {

"url": "https://github.com/bonegollira"
},
{
"name": "Kojiro Ozaki",
"email": "koujirou0111@gmail.com",
"url": "https://github.com/koozaki"
}

@@ -49,6 +54,7 @@ ],

"prepublish": "npm build && npm test && npm run build",
"test": "mocha --compilers js:babel-core/register tests/**/*.js",
"test": "npm run build && mocha tests --recursive --compilers js:babel-core/register",
"watch": "npm run watch-build & npm run watch-test",
"watch-build": "babel -w src -d lib",
"watch-test": "mocha -w --compilers js:babel-core/register tests/**/*.js"
"watch-test": "mocha -w tests --recursive --compilers js:babel-core/register"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc