Socket
Socket
Sign inDemoInstall

eslint-plugin-ava

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-ava - npm Package Compare versions

Comparing version 10.0.1 to 10.1.0

2

package.json
{
"name": "eslint-plugin-ava",
"version": "10.0.1",
"version": "10.1.0",
"description": "ESLint rules for AVA",

@@ -5,0 +5,0 @@ "license": "MIT",

'use strict';
const path = require('path');
const espurify = require('espurify');

@@ -27,14 +28,25 @@ const deepStrictEqual = require('deep-strict-equal');

const create = context => ({
ImportDeclaration: node => {
if (node.source.value === 'ava' && node.specifiers[0].local.name !== 'test') {
report(context, node);
const create = context => {
const ext = path.extname(context.getFilename());
const isTypeScript = ext === '.ts' || ext === '.tsx';
return {
ImportDeclaration: node => {
if (node.source.value === 'ava') {
const {name} = node.specifiers[0].local;
if (name !== 'test' && (!isTypeScript || name !== 'anyTest')) {
report(context, node);
}
}
},
VariableDeclarator: node => {
if (node.init && deepStrictEqual(espurify(node.init), avaVariableDeclaratorInitAst)) {
const {name} = node.id;
if (name !== 'test' && (!isTypeScript || name !== 'anyTest')) {
report(context, node);
}
}
}
},
VariableDeclarator: node => {
if (node.id.name !== 'test' && node.init && deepStrictEqual(espurify(node.init), avaVariableDeclaratorInitAst)) {
report(context, node);
}
}
});
};
};

@@ -41,0 +53,0 @@ module.exports = {

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