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

mocha-eslint

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-eslint - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

7

CHANGELOG.md

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

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