eslint-config-hapi
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -72,3 +72,3 @@ 'use strict'; | ||
'indent': [2, 4, { 'SwitchCase': 1 }], | ||
'space-before-function-paren': 2, | ||
'space-before-function-paren': [2, { 'anonymous': 'always', 'named': 'never' }], | ||
'func-style': [2, 'expression'], | ||
@@ -75,0 +75,0 @@ 'object-curly-spacing': [2, 'always'] |
{ | ||
"name": "eslint-config-hapi", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Shareable ESLint config for the hapi ecosystem", | ||
@@ -5,0 +5,0 @@ "author": "Continuation Labs <contact@continuation.io> (http://continuation.io/)", |
@@ -180,2 +180,33 @@ 'use strict'; | ||
it('enforces space-before-function-paren', function (done) { | ||
var output = lintFile('fixtures/space-before-function-paren.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('space-before-function-paren'); | ||
expect(msg.severity).to.equal(2); | ||
expect(msg.message).to.equal('Missing space before function parentheses.'); | ||
expect(msg.line).to.equal(8); | ||
expect(msg.column).to.equal(21); | ||
expect(msg.nodeType).to.equal('FunctionExpression'); | ||
expect(msg.source).to.equal('const bar = function() {'); | ||
msg = results.messages[1]; | ||
expect(msg.ruleId).to.equal('space-before-function-paren'); | ||
expect(msg.severity).to.equal(2); | ||
expect(msg.message).to.equal('Unexpected space before function parentheses.'); | ||
expect(msg.line).to.equal(16); | ||
expect(msg.column).to.equal(27); | ||
expect(msg.nodeType).to.equal('FunctionExpression'); | ||
expect(msg.source).to.equal('const quux = function quux () {'); | ||
done(); | ||
}); | ||
it('enforces hapi/hapi-scope-start', function (done) { | ||
@@ -236,3 +267,3 @@ var output = lintFile('fixtures/hapi-scope-start.js'); | ||
expect(msg.severity).to.equal(1); | ||
expect(msg.message).to.equal('res is already declared in the upper scope.'); | ||
expect(msg.message).to.equal('"res" is already declared in the upper scope.'); | ||
expect(msg.line).to.equal(27); | ||
@@ -239,0 +270,0 @@ expect(msg.column).to.equal(33); |
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
27406
30
668