eslint-find-rules
Advanced tools
Comparing version 1.14.1 to 1.14.2
{ | ||
"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) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46282
1001