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

eslint-plugin-eslint-plugin

Package Overview
Dependencies
Maintainers
0
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-eslint-plugin - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

2

lib/rules/fixer-return.js

@@ -13,3 +13,3 @@ /**

const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -16,0 +16,0 @@ // ------------------------------------------------------------------------------

@@ -9,3 +9,3 @@ /**

const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -12,0 +12,0 @@ // ------------------------------------------------------------------------------

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

isClosingBraceToken,
} = require('eslint-utils');
} = require('@eslint-community/eslint-utils');

@@ -11,0 +11,0 @@ /** @type {import('eslint').Rule.RuleModule} */

'use strict';
const typedNodeSourceFileTesters = [
const defaultTypedNodeSourceFileTesters = [
/@types[/\\]estree[/\\]index\.d\.ts/,

@@ -29,5 +29,6 @@ /@typescript-eslint[/\\]types[/\\]dist[/\\]generated[/\\]ast-spec\.d\.ts/,

* @param {import('typescript').Type} type
* @param {RegExp[]} typedNodeSourceFileTesters
* @returns Whether the type seems to include a known ESTree or TSESTree AST node.
*/
function isAstNodeType(type) {
function isAstNodeType(type, typedNodeSourceFileTesters) {
return (type.types || [type])

@@ -59,3 +60,16 @@ .filter((typePart) => typePart.getProperty('type'))

},
schema: [],
schema: [
{
type: 'object',
properties: {
additionalNodeTypeFiles: {
description:
'Any additional regular expressions to consider source files defining AST Node types.',
elements: { type: 'string' },
type: 'array',
},
},
additionalProperties: false,
},
],
messages: {

@@ -67,2 +81,9 @@ in: 'Prefer checking specific node properties instead of a broad `in`.',

create(context) {
const typedNodeSourceFileTesters = [
...defaultTypedNodeSourceFileTesters,
...(context.options[0]?.additionalNodeTypeFiles?.map(
(filePath) => new RegExp(filePath),
) ?? []),
];
return {

@@ -83,3 +104,3 @@ 'BinaryExpression[operator=in]'(node) {

if (isAstNodeType(type)) {
if (isAstNodeType(type, typedNodeSourceFileTesters)) {
context.report({ messageId: 'in', node });

@@ -86,0 +107,0 @@ }

@@ -9,3 +9,3 @@ /**

const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -12,0 +12,0 @@ // ------------------------------------------------------------------------------

'use strict';
const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -6,0 +6,0 @@ // ------------------------------------------------------------------------------

@@ -9,3 +9,3 @@ /**

const utils = require('../utils');
const { findVariable } = require('eslint-utils');
const { findVariable } = require('@eslint-community/eslint-utils');

@@ -12,0 +12,0 @@ // ------------------------------------------------------------------------------

@@ -8,3 +8,3 @@ /**

const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -11,0 +11,0 @@

'use strict';
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -5,0 +5,0 @@

'use strict';
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -5,0 +5,0 @@

@@ -13,3 +13,3 @@ /**

const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -16,0 +16,0 @@ // -----------------------------------------------------------------------------

@@ -8,3 +8,3 @@ /**

const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -11,0 +11,0 @@

'use strict';
const utils = require('../utils');
const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');

@@ -6,0 +6,0 @@ // ------------------------------------------------------------------------------

'use strict';
const { findVariable } = require('eslint-utils');
const { findVariable } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -5,0 +5,0 @@

@@ -8,3 +8,3 @@ /**

const { getStaticValue } = require('eslint-utils');
const { getStaticValue } = require('@eslint-community/eslint-utils');
const utils = require('../utils');

@@ -11,0 +11,0 @@ const VALID_TYPES = new Set(['problem', 'suggestion', 'layout']);

'use strict';
const { getStaticValue, findVariable } = require('eslint-utils');
const {
getStaticValue,
findVariable,
} = require('@eslint-community/eslint-utils');
const estraverse = require('estraverse');

@@ -5,0 +8,0 @@

{
"name": "eslint-plugin-eslint-plugin",
"version": "6.1.0",
"version": "6.2.0",
"description": "An ESLint plugin for linting ESLint plugins",

@@ -43,3 +43,3 @@ "author": "Teddy Katz",

"dependencies": {
"eslint-utils": "^3.0.0",
"@eslint-community/eslint-utils": "^4.4.0",
"estraverse": "^5.3.0"

@@ -56,2 +56,3 @@ },

"@commitlint/config-conventional": "^19.2.2",
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"@eslint/eslintrc": "^3.0.2",

@@ -66,12 +67,11 @@ "@eslint/js": "^9.0.0",

"dirty-chai": "^2.0.1",
"eslint": "^9.0.0",
"eslint": "^9.1.1",
"eslint-config-not-an-aardvark": "^2.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-doc-generator": "^1.7.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "file:./",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-markdown": "^5.0.0",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-remote-tester": "^3.0.1",

@@ -83,3 +83,3 @@ "eslint-scope": "^8.0.1",

"lodash": "^4.17.21",
"markdownlint-cli": "^0.39.0",
"markdownlint-cli": "^0.41.0",
"mocha": "^10.4.0",

@@ -86,0 +86,0 @@ "npm-package-json-lint": "^7.1.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