Socket
Socket
Sign inDemoInstall

eslint-plugin-mocha

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-mocha - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

.eslintignore

3

index.js

@@ -5,4 +5,5 @@ 'use strict';

rules: {
'no-exclusive-tests': require('./lib/rules/no-exclusive-tests')
'no-exclusive-tests': require('./lib/rules/no-exclusive-tests'),
'handle-done-callback': require('./lib/rules/handle-done-callback')
}
};

@@ -0,4 +1,4 @@

'use strict';
module.exports = function (context) {
'use strict';
var mochaTestFunctions = [

@@ -11,8 +11,2 @@ 'it',

function isCallToMochasOnlyFunction(callee) {
return callee.type === 'MemberExpression' &&
matchesMochaTestFunction(callee.object) &&
isPropertyNamedOnly(callee.property);
}
function matchesMochaTestFunction(object) {

@@ -26,4 +20,10 @@ return object && mochaTestFunctions.indexOf(object.name) !== -1;

function isCallToMochasOnlyFunction(callee) {
return callee.type === 'MemberExpression' &&
matchesMochaTestFunction(callee.object) &&
isPropertyNamedOnly(callee.property);
}
return {
'CallExpression': function (node) {
CallExpression: function (node) {
var callee = node.callee;

@@ -30,0 +30,0 @@

{
"name": "eslint-plugin-mocha",
"version": "0.2.2",
"version": "0.3.0",
"description": "Eslint rules for mocha.",
"main": "index.js",
"scripts": {
"test": "npm run unit-test --coverage && npm run check-coverage",
"unit-test": "istanbul test --dir build/coverage _mocha test -- --recursive --reporter dot",
"pretest": "eslint .",
"test": "npm run test:unit --coverage && npm run check-coverage",
"test:unit": "istanbul test --dir build/coverage _mocha test -- --recursive --reporter dot",
"check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100 --lines 100",
"report-coverage-html": "istanbul report --dir build/coverage html",
"coveralls": "cat ./build/coverage/lcov.info | coveralls"
"coveralls": "cat ./build/coverage/lcov.info | coveralls",
"changelog": "pr-log"
},
"dependencies": {
"lodash": "^3.9.3"
},
"devDependencies": {
"istanbul": "0.3.2",
"mocha": "1.21.4",
"eslint-tester": "0.2.1",
"eslint": "^0.8.0",
"coveralls": "2.11.1"
"pr-log": "1.1.0",
"istanbul": "0.3.15",
"mocha": "2.2.5",
"eslint-tester": "0.7.0",
"eslint": "0.23.0",
"coveralls": "2.11.2"
},

@@ -20,0 +25,0 @@ "peerDependencies": {

@@ -8,8 +8,26 @@ [![NPM Version](https://img.shields.io/npm/v/eslint-plugin-mocha.svg?style=flat)](https://www.npmjs.org/package/eslint-plugin-mocha)

ESLint rules for [mocha](http://visionmedia.github.io/mocha/).
ESLint rules for [mocha](http://mochajs.org/).
## Getting Started
## Install and configure
This plugin requires ESLint `0.8.0` or later.
`npm install --save-dev eslint-plugin-mocha`
Then add a reference to this plugin and selected rules in your eslint config:
```json
{
"plugins": [
"mocha"
],
"rules": {
"mocha/no-exclusive-tests": 2
}
}
```
See [Configuring Eslint](http://eslint.org/docs/user-guide/configuring) on [eslint.org](http://eslint.org) for more info.
## Rules documentation
The documentation of the rules can be found [here](docs/rules).

@@ -16,0 +34,0 @@

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