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

eslint-find-rules

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-find-rules - npm Package Compare versions

Comparing version 1.14.1 to 1.14.2

2

package.json
{
"name": "eslint-find-rules",
"version": "1.14.1",
"version": "1.14.2",
"description": "Find built-in ESLint rules you don't have in your custom config.",

@@ -5,0 +5,0 @@ "main": "src/lib/rule-finder.js",

@@ -13,15 +13,17 @@ var assert = require('assert')

var stub = {
'../lib/rule-finder': function() {
return {
getCurrentRules: getCurrentRules,
getPluginRules: getPluginRules,
getAllAvailableRules: getAllAvailableRules,
getUnusedRules: getUnusedRules,
}
},
}
var stub
describe('bin', function() {
beforeEach(function() {
stub = {
'../lib/rule-finder': function() {
return {
getCurrentRules: getCurrentRules,
getPluginRules: getPluginRules,
getAllAvailableRules: getAllAvailableRules,
getUnusedRules: getUnusedRules,
}
},
}
console.log = function() { // eslint-disable-line no-console

@@ -119,2 +121,33 @@ if (arguments[0].match(/(current|plugin|all\-available|unused|rules found)/)) {

})
it('logs core rules', function() {
stub = {
'../lib/rule-finder': function(specifiedFile, noCore) {
return {
getCurrentRules: function() {
assert(!noCore)
return ['current', 'rules']
},
}
},
}
process.argv[2] = '-c'
proxyquire('../../src/bin/find', stub)
})
it('does not log core rules', function() {
stub = {
'../lib/rule-finder': function(specifiedFile, noCore) {
return {
getCurrentRules: function() {
assert(noCore)
return ['current', 'rules']
},
}
},
}
process.argv[2] = '-c'
process.argv[3] = '--no-core'
proxyquire('../../src/bin/find', stub)
})
})
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