Socket
Socket
Sign inDemoInstall

eslint-plugin-mocha

Package Overview
Dependencies
Maintainers
3
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 6.1.1 to 6.2.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 6.2.0 (October 14, 2019)
### Enhancements
* Startup Performance Optimization ([#214](https://github.com/lo1tuma/eslint-plugin-mocha/pull/214))
## 6.1.1 (September 11, 2019)

@@ -2,0 +8,0 @@

4

lib/rules/handle-done-callback.js
'use strict';
const R = require('ramda');
const find = require('ramda/src/find');
const astUtils = require('../util/ast');

@@ -12,3 +12,3 @@

function findParamInScope(paramName, scope) {
return R.find(function (variable) {
return find(function (variable) {
return variable.name === paramName && variable.defs[0].type === 'Parameter';

@@ -15,0 +15,0 @@ }, scope.variables);

@@ -8,3 +8,3 @@ 'use strict';

const R = require('ramda');
const isNil = require('ramda/src/isNil');
const astUtil = require('../util/ast');

@@ -22,3 +22,3 @@ const { additionalSuiteNames } = require('../util/settings');

if (R.isNil(options.limit)) {
if (isNil(options.limit)) {
suiteLimit = defaultSuiteLimit;

@@ -25,0 +25,0 @@ } else {

@@ -8,3 +8,3 @@ 'use strict';

const R = require('ramda');
const last = require('ramda/src/last');
const astUtils = require('../util/ast');

@@ -29,3 +29,3 @@

if (fn.params.length > 0) {
paramsFullText = `(${ sourceCode.text.slice(fn.params[0].start, R.last(fn.params).end) })`;
paramsFullText = `(${ sourceCode.text.slice(fn.params[0].start, last(fn.params).end) })`;
}

@@ -32,0 +32,0 @@

'use strict';
const R = require('ramda');
const isNil = require('ramda/src/isNil');
const find = require('ramda/src/find');
const astUtil = require('../util/ast');

@@ -17,3 +18,3 @@

function findPromiseReturnStatement(nodes) {
return R.find(function (node) {
return find(function (node) {
return node.type === 'ReturnStatement' && node.argument && node.argument.type !== 'Literal';

@@ -40,3 +41,3 @@ }, nodes);

const options = context.options[0] || {};
const allowedAsyncMethods = R.isNil(options.allowed) ? asyncMethods : options.allowed;
const allowedAsyncMethods = isNil(options.allowed) ? asyncMethods : options.allowed;

@@ -43,0 +44,0 @@ function check(node) {

'use strict';
const R = require('ramda');
const complement = require('ramda/src/complement');
const both = require('ramda/src/both');
const isNil = require('ramda/src/isNil');
const propEq = require('ramda/src/propEq');
const pathEq = require('ramda/src/pathEq');
const find = require('ramda/src/find');
const isDefined = R.complement(R.isNil);
const isCallExpression = R.both(isDefined, R.propEq('type', 'CallExpression'));
const isDefined = complement(isNil);
const isCallExpression = both(isDefined, propEq('type', 'CallExpression'));

@@ -62,5 +67,5 @@ const describeAliases = [

function findReference(scope, node) {
const hasSameRangeAsNode = R.pathEq([ 'identifier', 'range' ], node.range);
const hasSameRangeAsNode = pathEq([ 'identifier', 'range' ], node.range);
return R.find(hasSameRangeAsNode, scope.references);
return find(hasSameRangeAsNode, scope.references);
}

@@ -107,3 +112,3 @@

const findReturnStatement = R.find(R.propEq('type', 'ReturnStatement'));
const findReturnStatement = find(propEq('type', 'ReturnStatement'));

@@ -110,0 +115,0 @@ module.exports = {

{
"name": "eslint-plugin-mocha",
"version": "6.1.1",
"version": "6.2.0",
"description": "Eslint rules for mocha.",

@@ -17,5 +17,6 @@ "engines": {

"pretest": "eslint .",
"test": "npm run test:unit:with-coverage",
"test": "npm run test:unit:with-coverage && npm run test:bench",
"test:unit": "mocha test --recursive --reporter dot",
"test:unit:with-coverage": "nyc npm run test:unit",
"test:bench": "mocha benchmarks",
"coveralls": "cat ./build/coverage/lcov.info | coveralls",

@@ -68,3 +69,4 @@ "changelog": "pr-log"

"build",
"test"
"test",
"benchmarks/"
],

@@ -71,0 +73,0 @@ "reporter": [

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