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

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 8.0.0 to 9.0.0

rules/.DS_Store

135

create-ava-rule.js

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

const avaImportDeclarationAst = {
const avaImportDeclarationAsts = [{
type: 'ImportDeclaration',

@@ -23,5 +23,62 @@ specifiers: [

}
};
}, {
type: 'ImportDeclaration',
specifiers: [
{
type: 'ImportSpecifier',
imported: {
type: 'Identifier',
name: 'serial'
},
local: {
type: 'Identifier',
name: 'test'
}
}
],
source: {
type: 'Literal',
value: 'ava'
}
}, {
type: 'ImportDeclaration',
specifiers: [
{
type: 'ImportSpecifier',
imported: {
type: 'Identifier',
name: 'serial'
},
local: {
type: 'Identifier',
name: 'test'
}
}
],
source: {
type: 'Literal',
value: 'ava'
}
}, {
type: 'ImportDeclaration',
specifiers: [
{
type: 'ImportSpecifier',
imported: {
type: 'Identifier',
name: 'serial'
},
local: {
type: 'Identifier',
name: 'serial'
}
}
],
source: {
type: 'Literal',
value: 'ava'
}
}];
const avaVariableDeclaratorAst = {
const avaVariableDeclaratorAsts = [{
type: 'VariableDeclarator',

@@ -45,3 +102,69 @@ id: {

}
};
}, {
type: 'VariableDeclarator',
id: {
type: 'ObjectPattern',
properties: [{
type: 'Property',
key: {
type: 'Identifier',
name: 'serial'
},
value: {
type: 'Identifier',
name: 'serial'
},
kind: 'init',
method: false,
shorthand: true,
computed: false
}]
},
init: {
type: 'CallExpression',
callee: {
type: 'Identifier',
name: 'require'
},
arguments: [
{
type: 'Literal',
value: 'ava'
}
]
}
}, {
type: 'VariableDeclarator',
id: {
type: 'ObjectPattern',
properties: [{
type: 'Property',
key: {
type: 'Identifier',
name: 'serial'
},
value: {
type: 'Identifier',
name: 'test'
},
kind: 'init',
method: false,
shorthand: false,
computed: false
}]
},
init: {
type: 'CallExpression',
callee: {
type: 'Identifier',
name: 'require'
},
arguments: [
{
type: 'Literal',
value: 'ava'
}
]
}
}];

@@ -71,3 +194,3 @@ function isTestFunctionCall(node) {

ImportDeclaration: node => {
if (!isTestFile && deepStrictEqual(espurify(node), avaImportDeclarationAst)) {
if (!isTestFile && avaImportDeclarationAsts.some(ast => deepStrictEqual(espurify(node), ast))) {
isTestFile = true;

@@ -77,3 +200,3 @@ }

VariableDeclarator: node => {
if (!isTestFile && deepStrictEqual(espurify(node), avaVariableDeclaratorAst)) {
if (!isTestFile && avaVariableDeclaratorAsts.some(ast => deepStrictEqual(espurify(node), ast))) {
isTestFile = true;

@@ -80,0 +203,0 @@ }

2

index.js

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

parserOptions: {
ecmaVersion: 2019,
ecmaVersion: 2020,
sourceType: 'module'

@@ -16,0 +16,0 @@ },

{
"name": "eslint-plugin-ava",
"version": "8.0.0",
"version": "9.0.0",
"description": "ESLint rules for AVA",

@@ -47,3 +47,3 @@ "license": "MIT",

"del": "^5.0.0",
"eslint": "^6.0.0",
"eslint": "^6.2.0",
"eslint-ava-rule-tester": "^3.0.0",

@@ -61,3 +61,3 @@ "eslint-plugin-eslint-plugin": "2.1.0",

"peerDependencies": {
"eslint": ">=6"
"eslint": ">=6.2.0"
},

@@ -64,0 +64,0 @@ "ava": {

@@ -31,3 +31,3 @@ # eslint-plugin-ava [![Build Status](https://travis-ci.org/avajs/eslint-plugin-ava.svg?branch=master)](https://travis-ci.org/avajs/eslint-plugin-ava) [![Coverage Status](https://coveralls.io/repos/github/avajs/eslint-plugin-ava/badge.svg?branch=master)](https://coveralls.io/github/avajs/eslint-plugin-ava?branch=master)

"parserOptions": {
"ecmaVersion": 2019,
"ecmaVersion": 2020,
"sourceType": "module"

@@ -132,6 +132,1 @@ },

**Note**: This config will also enable the correct [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options) and [environment](http://eslint.org/docs/user-guide/configuring#specifying-environments).
## License
MIT

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

if (filename === '<text>') {
if (filename === '<input>' || filename === '<text>') {
return {};

@@ -13,0 +13,0 @@ }

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

if (filename === '<text>') {
if (filename === '<input>' || filename === '<text>') {
return {};

@@ -15,0 +15,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