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

eslint-config-hapi

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-hapi - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

test/fixtures/space-before-function-paren.js

2

lib/index.js

@@ -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);

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