eslint-config-hapi
Advanced tools
Comparing version 7.0.0 to 8.0.0
@@ -23,3 +23,2 @@ 'use strict'; | ||
'no-catch-shadow': 0, | ||
'handle-callback-err': 0, | ||
'no-lonely-if': 0, | ||
@@ -30,2 +29,3 @@ 'brace-style': [1, 'stroustrup'], | ||
'one-var': [2, 'never'], | ||
'handle-callback-err': [2, '^(e|err|error)$'], | ||
'hapi/hapi-capitalize-modules': [1, 'global-scope-only'], | ||
@@ -32,0 +32,0 @@ 'hapi/hapi-for-you': [1, { maxDepth: 3, startIterator: 'i' }], |
{ | ||
"name": "eslint-config-hapi", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"description": "Shareable ESLint config for the hapi ecosystem", | ||
@@ -5,0 +5,0 @@ "author": "Continuation Labs <contact@continuation.io> (http://continuation.io/)", |
@@ -1,2 +0,2 @@ | ||
/* eslint-disable strict, no-unused-vars */ | ||
/* eslint-disable strict, no-unused-vars, handle-callback-err */ | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* eslint-disable no-unused-vars */ | ||
/* eslint-disable no-unused-vars, handle-callback-err */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ const foo = (arg, callback) => { |
@@ -481,2 +481,34 @@ 'use strict'; | ||
it('enforces handle-callback-err rule', function (done) { | ||
var output = lintFile('fixtures/handle-callback-err.js'); | ||
var results = output.results[0]; | ||
expect(output.errorCount).to.equal(2); | ||
expect(output.warningCount).to.equal(0); | ||
expect(results.errorCount).to.equal(2); | ||
expect(results.warningCount).to.equal(0); | ||
var msg = results.messages[0]; | ||
expect(msg.ruleId).to.equal('handle-callback-err'); | ||
expect(msg.severity).to.equal(2); | ||
expect(msg.message).to.equal('Expected error to be handled.'); | ||
expect(msg.line).to.equal(6); | ||
expect(msg.column).to.equal(17); | ||
expect(msg.nodeType).to.equal('FunctionExpression'); | ||
expect(msg.source).to.equal(' const top = function (err) {'); | ||
msg = results.messages[1]; | ||
expect(msg.ruleId).to.equal('handle-callback-err'); | ||
expect(msg.severity).to.equal(2); | ||
expect(msg.message).to.equal('Expected error to be handled.'); | ||
expect(msg.line).to.equal(8); | ||
expect(msg.column).to.equal(23); | ||
expect(msg.nodeType).to.equal('FunctionExpression'); | ||
expect(msg.source).to.equal(' const inner = function (e) {'); | ||
done(); | ||
}); | ||
it('uses the node environment', function (done) { | ||
@@ -483,0 +515,0 @@ var output = lintFile('fixtures/node-env.js'); |
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
30399
32
744