@typescript-eslint/eslint-plugin
Advanced tools
Comparing version 1.7.1-alpha.7 to 1.7.1-alpha.8
@@ -21,3 +21,3 @@ "use strict"; | ||
description: 'When adding two variables, operands must both be of type number or of type string.', | ||
tslintRuleName: 'restrict-plus-operands', | ||
tslintName: 'restrict-plus-operands', | ||
category: 'Best Practices', | ||
@@ -39,6 +39,11 @@ recommended: false, | ||
* Helper function to get base type of node | ||
* @param type type to be evaluated | ||
* @returns string, number or invalid | ||
*/ | ||
function getBaseTypeOfLiteralType(type) { | ||
const constraint = type.getConstraint(); | ||
if (constraint && | ||
// for generic types with union constraints, it will return itself from getConstraint | ||
// so we have to guard against infinite recursion... | ||
constraint !== type) { | ||
return getBaseTypeOfLiteralType(constraint); | ||
} | ||
if (type.isNumberLiteral()) { | ||
@@ -45,0 +50,0 @@ return 'number'; |
{ | ||
"name": "@typescript-eslint/eslint-plugin", | ||
"version": "1.7.1-alpha.7+92e65ec", | ||
"version": "1.7.1-alpha.8+3f305b1", | ||
"description": "TypeScript plugin for ESLint", | ||
@@ -38,4 +38,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@typescript-eslint/parser": "1.7.1-alpha.7+92e65ec", | ||
"@typescript-eslint/typescript-estree": "1.7.1-alpha.7+92e65ec", | ||
"@typescript-eslint/parser": "1.7.1-alpha.8+3f305b1", | ||
"@typescript-eslint/typescript-estree": "1.7.1-alpha.8+3f305b1", | ||
"eslint-utils": "^1.3.1", | ||
@@ -52,3 +52,3 @@ "regexpp": "^2.0.1", | ||
}, | ||
"gitHead": "92e65ec41033df9375ecb5b5c4ebf61c4ef7e73d" | ||
"gitHead": "3f305b16fd69304e5f1fc66cef2dfc1c3eaeb1df" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
595714
6541