mocha-eslint
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -5,4 +5,9 @@ # mocha-eslint Changelog | ||
### 2.0.0 | ||
* [ENHANCEMENT] Add multiple globs and negation support | ||
* [ENHANCEMENT] Add mocha timeout option | ||
* [BREAKING] Update to ESLint 2.0.0 | ||
### 1.0.0 | ||
- [BREAKING] Update to ESLint 1.0.0 | ||
* [BREAKING] Update to ESLint 1.0.0 | ||
@@ -9,0 +14,0 @@ ### v0.2.0 |
17
index.js
var CLIEngine = require('eslint').CLIEngine; | ||
var chalk = require('chalk'); | ||
var glob = require('glob'); | ||
var globAll = require('glob-all'); | ||
var cli = new CLIEngine({}); | ||
@@ -10,2 +10,7 @@ | ||
var format, warn; | ||
if (opts && opts.timeout) { | ||
this.timeout(opts.timeout); | ||
} | ||
if (opts && opts.formatter) { | ||
@@ -45,12 +50,6 @@ format = opts.formatter; | ||
describe('eslint', function () { | ||
patterns.forEach(function (pattern) { | ||
if (glob.hasMagic(pattern)) { | ||
glob.sync(pattern).forEach(function (file) { | ||
test(file, options); | ||
}); | ||
} else { | ||
test(pattern, options); | ||
} | ||
globAll.sync(patterns).forEach(function (file) { | ||
test(file, options); | ||
}); | ||
}); | ||
}; |
{ | ||
"name": "mocha-eslint", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "run ESLint as mocha tests", | ||
@@ -17,8 +17,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"chalk": "^1.0", | ||
"eslint": "^1.0.0", | ||
"glob": "^5.0.14" | ||
"chalk": "^1.1.0", | ||
"eslint": "^2.0.0", | ||
"glob-all": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.0" | ||
"mocha": "^2.2.5" | ||
}, | ||
@@ -25,0 +25,0 @@ "repository": { |
@@ -22,2 +22,4 @@ # mocha-eslint | ||
*Note: verison 1.0.0 of this project uses eslint 1.0.0. Read the [migration guide](http://eslint.org/docs/user-guide/migrating-to-1.0.0) to learn what you need to do for the upgrade, but the main thing is that ESLint will no longer provide rules by default, you'll need to set them explicitly or extend from a shared config.* | ||
## Usage | ||
@@ -27,7 +29,7 @@ | ||
Mocha and requiring mocha-eslint like so: | ||
``` | ||
```javascript | ||
var lint = require('mocha-eslint'); | ||
``` | ||
This will return a function with the signature: | ||
``` | ||
```javascript | ||
lint(paths, options) | ||
@@ -46,3 +48,3 @@ ``` | ||
``` | ||
```javascript | ||
var lint = require('mocha-eslint'); | ||
@@ -57,2 +59,3 @@ | ||
'tests/**/*Test.js', | ||
'!tests/NotATest.js', // negation also works | ||
]; | ||
@@ -67,2 +70,5 @@ | ||
// Increase the timeout of the test if linting takes to long | ||
options.timeout = 5000; // Defaults to the global mocha timeout option | ||
// Run the tests | ||
@@ -74,5 +80,3 @@ lint(paths, options); | ||
This module does not make any decisions about which ESLint rules to run. Make | ||
sure your project has a .eslintrc file if you want something other than the | ||
default ESLint rules to execute. | ||
This module does not make any decisions about which ESLint rules to run. Make sure your project has a .eslintrc file if you want ESLint to do anything. As of version 1.0.0, no rules are enabled by default. | ||
@@ -79,0 +83,0 @@ [npm-image]: https://img.shields.io/npm/v/mocha-eslint.svg |
Sorry, the diff of this file is not supported yet
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
7210
83
44
+ Addedglob-all@^3.0.1
+ Addedacorn@3.3.05.7.4(transitive)
+ Addedacorn-jsx@3.0.1(transitive)
+ Addedajv@4.11.8(transitive)
+ Addedajv-keywords@1.5.1(transitive)
+ Addedansi-regex@3.0.15.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedcaller-path@0.1.0(transitive)
+ Addedcallsites@0.2.0(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcli-width@2.2.1(transitive)
+ Addedcliui@6.0.0(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddoctrine@1.5.0(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedeslint@2.13.1(transitive)
+ Addedespree@3.5.4(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedglob-all@3.3.1(transitive)
+ Addedglobals@9.18.0(transitive)
+ Addedignore@3.3.10(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinquirer@0.12.0(transitive)
+ Addedis-fullwidth-code-point@2.0.03.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpluralize@1.2.1(transitive)
+ Addedprogress@1.1.8(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedrequire-uncached@1.0.3(transitive)
+ Addedresolve-from@1.0.1(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedshelljs@0.6.1(transitive)
+ Addedslice-ansi@0.0.4(transitive)
+ Addedstring-width@2.1.14.2.3(transitive)
+ Addedstrip-ansi@4.0.06.0.1(transitive)
+ Addedtable@3.8.3(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyargs@15.4.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
- Removedglob@^5.0.14
- Removedcli-width@1.1.1(transitive)
- Removeddoctrine@0.7.2(transitive)
- Removedeslint@1.10.3(transitive)
- Removedespree@2.2.5(transitive)
- Removedesprima@2.7.3(transitive)
- Removedestraverse-fb@1.3.2(transitive)
- Removedesutils@1.1.6(transitive)
- Removedfast-levenshtein@1.0.7(transitive)
- Removedglob@5.0.15(transitive)
- Removedglobals@8.18.0(transitive)
- Removedhandlebars@4.7.8(transitive)
- Removedinquirer@0.11.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjs-yaml@3.4.5(transitive)
- Removedlevn@0.2.5(transitive)
- Removedlodash@3.10.1(transitive)
- Removedlodash._arraycopy@3.0.0(transitive)
- Removedlodash._arrayeach@3.0.0(transitive)
- Removedlodash._arraymap@3.0.0(transitive)
- Removedlodash._baseassign@3.2.0(transitive)
- Removedlodash._baseclone@3.3.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basedifference@3.0.3(transitive)
- Removedlodash._baseflatten@3.1.4(transitive)
- Removedlodash._basefor@3.0.3(transitive)
- Removedlodash._baseindexof@3.1.0(transitive)
- Removedlodash._bindcallback@3.0.1(transitive)
- Removedlodash._cacheindexof@3.0.2(transitive)
- Removedlodash._createassigner@3.1.1(transitive)
- Removedlodash._createcache@3.1.2(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._pickbyarray@3.0.2(transitive)
- Removedlodash._pickbycallback@3.0.0(transitive)
- Removedlodash.clonedeep@3.0.2(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.isplainobject@3.2.0(transitive)
- Removedlodash.istypedarray@3.0.6(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.keysin@3.0.8(transitive)
- Removedlodash.merge@3.3.2(transitive)
- Removedlodash.omit@3.1.0(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.toplainobject@3.0.0(transitive)
- Removedneo-async@2.6.2(transitive)
- Removedoptionator@0.6.0(transitive)
- Removedshelljs@0.5.3(transitive)
- Removedsource-map@0.6.1(transitive)
- Removeduglify-js@3.19.3(transitive)
- Removedwordwrap@0.0.31.0.0(transitive)
- Removedxml-escape@1.0.0(transitive)
Updatedchalk@^1.1.0
Updatedeslint@^2.0.0