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

eslint-plugin-github

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-github - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

18

lib/configs/recommended.js
module.exports = {
"rules": {
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": [2, {"properties": "always"}],
"eol-last": 2,
"func-style": [2, "declaration"],
"github/no-implicit-buggy-globals": 2,

@@ -7,5 +12,16 @@ "github/no-sprockets-directives": 2,

"indent": [2, 2, {"SwitchCase": 1}],
"no-implicit-globals": 2
"no-extra-parens": 2,
"no-implicit-globals": 2,
"no-multi-spaces": 2,
"no-spaced-func": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-unexpected-multiline": 2,
"semi": [2, "never"],
"space-before-blocks": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"wrap-iife": [2, "inside"]
},
"extends": "eslint:recommended"
}

20

lib/rules/no-implicit-buggy-globals.js
module.exports = function(context) {
return {
"Program": function() {
var scope = context.getScope();
var scope = context.getScope()
scope.variables.forEach(function(variable) {
if (variable.writeable) {
return;
return
}

@@ -13,12 +13,12 @@

if (def.type === "FunctionName" || def.type === "ClassName" ||
(def.type === "Variable" && def.parent.kind === "const") ||
(def.type === "Variable" && def.parent.kind === "let")) {
context.report(def.node, "Implicit global variable, assign as global property instead.");
def.type === "Variable" && def.parent.kind === "const" ||
def.type === "Variable" && def.parent.kind === "let") {
context.report(def.node, "Implicit global variable, assign as global property instead.")
}
});
});
})
})
}
};
};
}
}
module.exports.schema = [];
module.exports.schema = []
module.exports = function(context) {
function checkSprocketsDirectives(node) {
if (node.value.match(/\s*=\s*(require|require_tree|require_directory|require_self|stub)/)) {
context.report(node, "Sprockets directive found, use ES import instead.");
context.report(node, "Sprockets directive found, use ES import instead.")
}

@@ -11,5 +11,5 @@ }

"BlockComment": checkSprocketsDirectives
};
};
}
}
module.exports.schema = [];
module.exports.schema = []
{
"name": "eslint-plugin-github",
"version": "0.3.0",
"version": "0.4.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

var rule = require('../lib/rules/no-implicit-buggy-globals')
var RuleTester = require('eslint').RuleTester
var ruleTester = new RuleTester();
var ruleTester = new RuleTester()

@@ -84,2 +84,2 @@ ruleTester.run("no-implicit-buggy-globals", rule, {

]
});
})
var rule = require('../lib/rules/no-sprockets-directives')
var RuleTester = require('eslint').RuleTester
var ruleTester = new RuleTester();
var ruleTester = new RuleTester()

@@ -98,2 +98,2 @@ ruleTester.run("sprockets-directives", rule, {

]
});
})

@@ -10,3 +10,3 @@ var rule = require('../lib/rules/no-unused-disabled-rules')

}
});
})

@@ -112,2 +112,2 @@ ruleTester.run("no-unused-disabled-rules", rule, {

]
});
})
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