Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-ideal

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-ideal - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

22

lib/rules/vars-with-default.js

@@ -9,4 +9,26 @@ /**

module.exports = function(context){
var EXCEPTION_PARENT_TYPE = [
"ForInStatement",
"ForOfStatement"
];
/**
* True if the parent of node is
* - ForInStatement
* - ForOfStatement
* @param {ASTNode} node - node to examine
* @returns {Boolean} True if its an exception
* @private
*/
function isException(node){
var parentType = node.parent.type;
return EXCEPTION_PARENT_TYPE.indexOf(parentType) > -1;
}
return {
VariableDeclaration: function(node){
if(isException(node)){
return;
}
node.declarations.forEach(function(elem){

@@ -13,0 +35,0 @@ if(!elem.init){

12

package.json
{
"name": "eslint-plugin-ideal",
"version": "0.1.2",
"version": "0.1.3",
"description": "ESLint rules",

@@ -15,11 +15,9 @@ "license": "MIT",

},
"dependencies": {
"eslint": "^1.0.0"
},
"devDependencies": {
"shelljs-nodecli": "^0.1.1",
"shelljs": "^0.5.3",
"shelljs": "^0.6.0",
"eslint-config-ideal": "^1.0.0",
"istanbul": "^0.3.18",
"mocha": "^2.2.5"
"istanbul": "^0.4.1",
"mocha": "^2.4.5",
"eslint": "^1.10.3"
},

@@ -26,0 +24,0 @@ "engines": {

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