Socket
Socket
Sign inDemoInstall

@typescript-eslint/eslint-plugin

Package Overview
Dependencies
Maintainers
2
Versions
3733
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/eslint-plugin - npm Package Compare versions

Comparing version 8.5.1-alpha.5 to 8.5.1-alpha.6

19

dist/rules/no-deprecated.js

@@ -153,2 +153,3 @@ "use strict";

const signature = checker.getResolvedSignature(tsNode);
const symbol = services.getSymbolAtLocation(node);
if (signature) {

@@ -159,5 +160,18 @@ const signatureDeprecation = getJsDocDeprecation(signature);

}
// Properties with function-like types have "deprecated" jsdoc
// on their symbols, not on their signatures:
//
// interface Props {
// /** @deprecated */
// property: () => 'foo'
// ^symbol^ ^signature^
// }
const symbolDeclarationKind = symbol?.declarations?.[0].kind;
if (symbolDeclarationKind !== ts.SyntaxKind.MethodDeclaration &&
symbolDeclarationKind !== ts.SyntaxKind.FunctionDeclaration &&
symbolDeclarationKind !== ts.SyntaxKind.MethodSignature) {
return getJsDocDeprecation(symbol);
}
}
// Or it could be a ClassDeclaration or a variable set to a ClassExpression.
const symbol = services.getSymbolAtLocation(node);
const symbolAtLocation = symbol && checker.getTypeOfSymbolAtLocation(symbol, tsNode).getSymbol();

@@ -170,4 +184,3 @@ return symbolAtLocation &&

function getSymbol(node) {
if (node.parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
node.parent.type === utils_1.AST_NODE_TYPES.Property) {
if (node.parent.type === utils_1.AST_NODE_TYPES.Property) {
return services

@@ -174,0 +187,0 @@ .getTypeAtLocation(node.parent.parent)

14

package.json
{
"name": "@typescript-eslint/eslint-plugin",
"version": "8.5.1-alpha.5",
"version": "8.5.1-alpha.6",
"description": "TypeScript plugin for ESLint",

@@ -63,6 +63,6 @@ "files": [

"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.5.1-alpha.5",
"@typescript-eslint/type-utils": "8.5.1-alpha.5",
"@typescript-eslint/utils": "8.5.1-alpha.5",
"@typescript-eslint/visitor-keys": "8.5.1-alpha.5",
"@typescript-eslint/scope-manager": "8.5.1-alpha.6",
"@typescript-eslint/type-utils": "8.5.1-alpha.6",
"@typescript-eslint/utils": "8.5.1-alpha.6",
"@typescript-eslint/visitor-keys": "8.5.1-alpha.6",
"graphemer": "^1.4.0",

@@ -78,4 +78,4 @@ "ignore": "^5.3.1",

"@types/natural-compare": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "8.5.1-alpha.5",
"@typescript-eslint/rule-tester": "8.5.1-alpha.5",
"@typescript-eslint/rule-schema-to-typescript-types": "8.5.1-alpha.6",
"@typescript-eslint/rule-tester": "8.5.1-alpha.6",
"ajv": "^6.12.6",

@@ -82,0 +82,0 @@ "cross-env": "^7.0.3",

Sorry, the diff of this file is not supported yet

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