mocha-eslint
Advanced tools
Comparing version 5.0.0 to 6.0.0
17
index.js
@@ -8,5 +8,7 @@ var path = require('path'); | ||
var mochaInterface; | ||
function test(p, opts) { | ||
opts = opts || {}; | ||
it('should have no errors in ' + p, function () { | ||
mochaInterface.it('should have no errors in ' + p, function () { | ||
var format, warn; | ||
@@ -54,4 +56,5 @@ | ||
module.exports = function (patterns, options) { | ||
mochaInterface = getMochaInterface(); | ||
var contextName = (options && options.contextName) || 'eslint'; | ||
describe(contextName, function () { | ||
mochaInterface.describe(contextName, function () { | ||
globAll.sync(patterns).forEach(function (file) { | ||
@@ -62,1 +65,11 @@ test(file, options); | ||
}; | ||
function getMochaInterface () { | ||
if (global.describe) { | ||
return { describe: global.describe, it: global.it }; | ||
} | ||
if (global.suite) { | ||
return { describe: global.suite, it: global.test }; | ||
} | ||
throw new Error('no mocha interface was found on the global scope'); | ||
} |
{ | ||
"name": "mocha-eslint", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "run ESLint as mocha tests", | ||
@@ -17,4 +17,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"chalk": "^2.4.1", | ||
"eslint": "^5.10.0", | ||
"chalk": "^2.4.2", | ||
"eslint": "^6.6.0", | ||
"glob-all": "^3.1.0", | ||
@@ -24,4 +24,4 @@ "replaceall": "^0.1.6" | ||
"devDependencies": { | ||
"es6-promise": "^4.2.5", | ||
"mocha": "^5.2.0" | ||
"es6-promise": "^4.2.8", | ||
"mocha": "^6.2.2" | ||
}, | ||
@@ -28,0 +28,0 @@ "repository": { |
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
8557
61
+ Addedacorn@7.4.1(transitive)
+ Addedansi-escapes@4.3.2(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-width@3.0.0(transitive)
+ Addedeslint@6.8.0(transitive)
+ Addedeslint-scope@5.1.1(transitive)
+ Addedespree@6.2.1(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobals@12.4.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedinquirer@7.3.3(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtype-fest@0.21.30.8.1(transitive)
+ Addedv8-compile-cache@2.4.0(transitive)
- Removedacorn@6.4.2(transitive)
- Removedansi-escapes@3.2.0(transitive)
- Removedansi-regex@3.0.1(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedcli-width@2.2.1(transitive)
- Removedeslint@5.16.0(transitive)
- Removedeslint-scope@4.0.3(transitive)
- Removedespree@5.0.1(transitive)
- Removedfigures@2.0.0(transitive)
- Removedglobals@11.12.0(transitive)
- Removedinquirer@6.5.2(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedmute-stream@0.0.7(transitive)
- Removedonetime@2.0.1(transitive)
- Removedpath-is-inside@1.0.2(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedstring-width@2.1.1(transitive)
- Removedstrip-ansi@4.0.0(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
Updatedchalk@^2.4.2
Updatedeslint@^6.6.0