eslint-config-hapi
Advanced tools
Comparing version 6.1.1 to 7.0.0
@@ -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, |
{ | ||
"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'); |
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
28789
31
701