Socket
Socket
Sign inDemoInstall

tslint

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

2

lib/language/rule/rule.d.ts

@@ -151,3 +151,3 @@ /**

constructor(start: number, length: number, text: string);
readonly end: number;
get end(): number;
apply(content: string): string;

@@ -154,0 +154,0 @@ toJson(): ReplacementJson;

@@ -158,1 +158,3 @@ /**

export declare function isWhiteSpace(ch: number): boolean;
/** Wrapper for compatability with typescript@<3.8.2 */
export declare function isPrivateIdentifier(node: ts.Node): node is ts.PrivateIdentifier;

@@ -479,1 +479,7 @@ "use strict";

exports.isWhiteSpace = isWhiteSpace;
/** Wrapper for compatability with typescript@<3.8.2 */
function isPrivateIdentifier(node) {
// tslint:disable-next-line
return ts.isPrivateIdentifier ? ts.isPrivateIdentifier(node) : false;
}
exports.isPrivateIdentifier = isPrivateIdentifier;

@@ -246,3 +246,3 @@ "use strict";

};
Linter.VERSION = "6.0.0";
Linter.VERSION = "6.1.0";
Linter.findConfiguration = configuration_1.findConfiguration;

@@ -249,0 +249,0 @@ Linter.findConfigurationPath = configuration_1.findConfigurationPath;

@@ -24,3 +24,3 @@ "use strict";

{
description: "Disallow object literals to appear in type assertion expressions (default). Casing to `any` and `unknown` is allowed.",
description: "Disallow object literals to appear in type assertion expressions (default). Casting to `any` and `unknown` is allowed.",
config: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n \"rules\": { \"no-object-literal-type-assertion\": true }\n "], ["\n \"rules\": { \"no-object-literal-type-assertion\": true }\n "]))),

@@ -27,0 +27,0 @@ pass: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n let foo = {} as any;\n let foo = {} as unknown;\n\n let foo = {} as any as Foo;\n let foo = {} as unknown as Foo;\n "], ["\n let foo = {} as any;\n let foo = {} as unknown;\n\n let foo = {} as any as Foo;\n let foo = {} as unknown as Foo;\n "]))),

@@ -25,2 +25,2 @@ /**

}
export declare const constructExclusionsMap: (ruleArguments: IInputExclusionDescriptors[]) => Map<DocType, DocTypeExclusions>;
export declare const constructExclusionsMap: (ruleArguments: IInputExclusionDescriptors[]) => ExclusionsMap;

@@ -24,5 +24,5 @@ /**

static FAILURE_STRING(expected: number, actual: number, name?: string): string;
private readonly threshold;
private get threshold();
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[];
isEnabled(): boolean;
}

@@ -191,3 +191,5 @@ "use strict";

? importClause.namedBindings.elements.map(toExportName)
: []), (exportClause !== undefined ? exportClause.elements.map(toExportName) : []));
: []), (exportClause !== undefined && tsutils_1.isNamedExports(exportClause)
? exportClause.elements.map(toExportName)
: []));
for (var _e = 0, namedImportsOrReExports_1 = namedImportsOrReExports; _e < namedImportsOrReExports_1.length; _e++) {

@@ -194,0 +196,0 @@ var importName = namedImportsOrReExports_1[_e];

@@ -50,3 +50,3 @@ "use strict";

else {
var _a = OPTION_CHECK_REGEX, checkRegex = argument[_a], _b = OPTION_CHECK_STRINGS, checkStrings = argument[_b], _c = OPTION_IGNORE_PATTERN, ignorePattern = argument[_c], _d = OPTION_LIMIT, limit = argument[_d];
var _a = argument, _b = OPTION_CHECK_REGEX, checkRegex = _a[_b], _c = OPTION_CHECK_STRINGS, checkStrings = _a[_c], _d = OPTION_IGNORE_PATTERN, ignorePattern = _a[_d], _e = OPTION_LIMIT, limit = _a[_e];
return {

@@ -53,0 +53,0 @@ checkRegex: Boolean(checkRegex),

@@ -67,3 +67,3 @@ "use strict";

var _b = node, expression = _b.expression, name = _b.name;
if (utils.isEntityNameExpression(expression)) {
if (utils.isEntityNameExpression(expression) && !Lint.isPrivateIdentifier(name)) {
visitNamespaceAccess(node, expression, name);

@@ -70,0 +70,0 @@ break;

@@ -139,3 +139,5 @@ "use strict";

var exportClause_1 = node.exportClause;
if (options.module && exportClause_1 !== undefined) {
if (options.module &&
exportClause_1 !== undefined &&
utils.isNamedExports(exportClause_1)) {
exportClause_1.elements.forEach(function (element, idx, arr) {

@@ -142,0 +144,0 @@ if (idx === arr.length - 1) {

{
"name": "tslint",
"version": "6.0.0",
"version": "6.1.0",
"description": "An extensible static analysis linter for the TypeScript language",

@@ -76,3 +76,3 @@ "bin": {

"tslint-test-config-non-relative": "file:test/external/tslint-test-config-non-relative",
"typescript": "~3.6.3",
"typescript": "~3.8.2",
"yarn-deduplicate": "^1.1.1"

@@ -79,0 +79,0 @@ },

Sorry, the diff of this file is too big to display

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