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.1 to 7.0.0

test/fixtures/hapi-for-you.js

1

lib/index.js

@@ -30,2 +30,3 @@ 'use strict';

'hapi/hapi-capitalize-modules': [1, 'global-scope-only'],
'hapi/hapi-for-you': [1, { maxDepth: 3, startIterator: 'i' }],
'hapi/hapi-scope-start': 1,

@@ -32,0 +33,0 @@ 'array-bracket-spacing': 1,

6

package.json
{
"name": "eslint-config-hapi",
"version": "6.1.1",
"version": "7.0.0",
"description": "Shareable ESLint config for the hapi ecosystem",

@@ -21,3 +21,3 @@ "author": "Continuation Labs <contact@continuation.io> (http://continuation.io/)",

"peerDependencies": {
"eslint-plugin-hapi": "3.x.x"
"eslint-plugin-hapi": "4.x.x"
},

@@ -28,3 +28,3 @@ "devDependencies": {

"eslint": "1.x.x",
"eslint-plugin-hapi": "3.x.x",
"eslint-plugin-hapi": "4.x.x",
"lab": "6.x.x"

@@ -31,0 +31,0 @@ },

@@ -211,2 +211,33 @@ 'use strict';

it('enforces hapi/hapi-for-you', function (done) {
var output = lintFile('fixtures/hapi-for-you.js');
var results = output.results[0];
expect(output.errorCount).to.equal(0);
expect(output.warningCount).to.equal(2);
expect(results.errorCount).to.equal(0);
expect(results.warningCount).to.equal(2);
var msg = results.messages[0];
expect(msg.ruleId).to.equal('hapi/hapi-for-you');
expect(msg.severity).to.equal(1);
expect(msg.message).to.equal('Expected iterator \'j\', but got \'k\'.');
expect(msg.line).to.equal(6);
expect(msg.column).to.equal(5);
expect(msg.nodeType).to.equal('ForStatement');
expect(msg.source).to.equal(' for (let k = 0; k < arr.length; k++) {');
msg = results.messages[1];
expect(msg.ruleId).to.equal('hapi/hapi-for-you');
expect(msg.severity).to.equal(1);
expect(msg.message).to.equal('Update to iterator should use prefix operator.');
expect(msg.line).to.equal(6);
expect(msg.column).to.equal(5);
expect(msg.nodeType).to.equal('ForStatement');
expect(msg.source).to.equal(' for (let k = 0; k < arr.length; k++) {');
done();
});
it('enforces hapi/hapi-scope-start', function (done) {

@@ -213,0 +244,0 @@ var output = lintFile('fixtures/hapi-scope-start.js');

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