Comparing version 5.20.0 to 6.0.0-beta0
@@ -109,3 +109,2 @@ /** | ||
"no-unused-expression": boolean; | ||
"no-use-before-declare": boolean; | ||
"no-var-keyword": boolean; | ||
@@ -112,0 +111,0 @@ "no-void-expression": boolean; |
@@ -143,3 +143,3 @@ "use strict"; | ||
// "no-unused-variable" - deprecated in #3919 | ||
"no-use-before-declare": true, | ||
// "no-use-before-declare" - deprecated in #4802, | ||
"no-var-keyword": true, | ||
@@ -293,2 +293,3 @@ "no-void-expression": true, | ||
"noUnusedVariable", | ||
"noUseBeforeDeclare", | ||
]; | ||
@@ -295,0 +296,0 @@ // Exclude typescript-only rules from jsRules, otherwise it's identical. |
@@ -19,10 +19,5 @@ /** | ||
"adjacent-overload-signatures": boolean; | ||
align: { | ||
options: string[]; | ||
}; | ||
"array-type": { | ||
options: string[]; | ||
}; | ||
"arrow-parens": boolean; | ||
"arrow-return-shorthand": boolean; | ||
"ban-types": { | ||
@@ -36,14 +31,4 @@ options: string[][]; | ||
}; | ||
curly: boolean; | ||
"cyclomatic-complexity": boolean; | ||
eofline: boolean; | ||
forin: boolean; | ||
"import-spacing": boolean; | ||
indent: { | ||
options: string[]; | ||
}; | ||
"interface-name": { | ||
options: string[]; | ||
}; | ||
"interface-over-type-literal": boolean; | ||
"jsdoc-format": boolean; | ||
@@ -54,11 +39,2 @@ "label-position": boolean; | ||
}; | ||
"max-line-length": { | ||
options: number; | ||
}; | ||
"member-access": boolean; | ||
"member-ordering": { | ||
options: { | ||
order: string; | ||
}; | ||
}; | ||
"new-parens": boolean; | ||
@@ -70,3 +46,2 @@ "no-angle-bracket-type-assertion": boolean; | ||
"no-conditional-assignment": boolean; | ||
"no-consecutive-blank-lines": boolean; | ||
"no-console": boolean; | ||
@@ -97,10 +72,3 @@ "no-construct": boolean; | ||
"no-var-requires": boolean; | ||
"object-literal-key-quotes": { | ||
options: string; | ||
}; | ||
"object-literal-shorthand": boolean; | ||
"object-literal-sort-keys": boolean; | ||
"one-line": { | ||
options: string[]; | ||
}; | ||
"one-variable-per-declaration": { | ||
@@ -112,34 +80,5 @@ options: string[]; | ||
}; | ||
"ordered-imports": { | ||
options: { | ||
"import-sources-order": string; | ||
"module-source-path": string; | ||
"named-imports-order": string; | ||
}; | ||
}; | ||
"prefer-const": boolean; | ||
"prefer-for-of": boolean; | ||
quotemark: { | ||
options: string[]; | ||
}; | ||
radix: boolean; | ||
semicolon: { | ||
options: string[]; | ||
}; | ||
"space-before-function-paren": { | ||
options: { | ||
anonymous: string; | ||
asyncArrow: string; | ||
constructor: string; | ||
method: string; | ||
named: string; | ||
}; | ||
}; | ||
"trailing-comma": { | ||
options: { | ||
esSpecCompliant: boolean; | ||
multiline: string; | ||
singleline: string; | ||
}; | ||
}; | ||
"triple-equals": { | ||
@@ -149,11 +88,2 @@ options: string[]; | ||
typedef: boolean; | ||
"typedef-whitespace": { | ||
options: { | ||
"call-signature": string; | ||
"index-signature": string; | ||
parameter: string; | ||
"property-declaration": string; | ||
"variable-declaration": string; | ||
}[]; | ||
}; | ||
"typeof-compare": boolean; | ||
@@ -165,23 +95,9 @@ "unified-signatures": boolean; | ||
}; | ||
whitespace: { | ||
options: string[]; | ||
}; | ||
}; | ||
export declare const jsRules: { | ||
align: { | ||
options: string[]; | ||
}; | ||
"class-name": boolean; | ||
curly: boolean; | ||
eofline: boolean; | ||
forin: boolean; | ||
"import-spacing": boolean; | ||
indent: { | ||
options: string[]; | ||
}; | ||
"jsdoc-format": boolean; | ||
"label-position": boolean; | ||
"max-line-length": { | ||
options: number[]; | ||
}; | ||
"new-parens": boolean; | ||
@@ -204,34 +120,8 @@ "no-arg": boolean; | ||
"no-switch-case-fall-through": boolean; | ||
"no-trailing-whitespace": boolean; | ||
"no-unused-expression": boolean; | ||
"no-use-before-declare": boolean; | ||
"object-literal-sort-keys": boolean; | ||
"one-line": { | ||
options: string[]; | ||
}; | ||
"one-variable-per-declaration": { | ||
options: string[]; | ||
}; | ||
quotemark: { | ||
options: string[]; | ||
}; | ||
radix: boolean; | ||
semicolon: { | ||
options: string[]; | ||
}; | ||
"space-before-function-paren": { | ||
options: { | ||
anonymous: string; | ||
asyncArrow: string; | ||
constructor: string; | ||
method: string; | ||
named: string; | ||
}; | ||
}; | ||
"trailing-comma": { | ||
options: { | ||
multiline: string; | ||
singleline: string; | ||
}; | ||
}; | ||
"triple-equals": { | ||
@@ -244,5 +134,2 @@ options: string[]; | ||
}; | ||
whitespace: { | ||
options: string[]; | ||
}; | ||
}; |
@@ -21,10 +21,5 @@ "use strict"; | ||
"adjacent-overload-signatures": true, | ||
align: { | ||
options: ["parameters", "statements"], | ||
}, | ||
"array-type": { | ||
options: ["array-simple"], | ||
options: ["array"], | ||
}, | ||
"arrow-parens": true, | ||
"arrow-return-shorthand": true, | ||
"ban-types": { | ||
@@ -48,24 +43,7 @@ options: [ | ||
}, | ||
curly: true, | ||
"cyclomatic-complexity": false, | ||
eofline: true, | ||
forin: true, | ||
"import-spacing": true, | ||
indent: { | ||
options: ["spaces"], | ||
}, | ||
"interface-name": { | ||
options: ["always-prefix"], | ||
}, | ||
"interface-over-type-literal": true, | ||
"jsdoc-format": true, | ||
"label-position": true, | ||
"max-classes-per-file": { options: 1 }, | ||
"max-line-length": { options: 120 }, | ||
"member-access": true, | ||
"member-ordering": { | ||
options: { | ||
order: "statics-first", | ||
}, | ||
}, | ||
"new-parens": true, | ||
@@ -77,3 +55,2 @@ "no-angle-bracket-type-assertion": true, | ||
"no-conditional-assignment": true, | ||
"no-consecutive-blank-lines": true, | ||
"no-console": true, | ||
@@ -104,14 +81,3 @@ "no-construct": true, | ||
"no-var-requires": true, | ||
"object-literal-key-quotes": { options: "consistent-as-needed" }, | ||
"object-literal-shorthand": true, | ||
"object-literal-sort-keys": true, | ||
"one-line": { | ||
options: [ | ||
"check-catch", | ||
"check-else", | ||
"check-finally", | ||
"check-open-brace", | ||
"check-whitespace", | ||
], | ||
}, | ||
"one-variable-per-declaration": { options: ["ignore-for-loop"] }, | ||
@@ -121,52 +87,7 @@ "only-arrow-functions": { | ||
}, | ||
"ordered-imports": { | ||
options: { | ||
"import-sources-order": "case-insensitive", | ||
"module-source-path": "full", | ||
"named-imports-order": "case-insensitive", | ||
}, | ||
}, | ||
"prefer-const": true, | ||
"prefer-for-of": true, | ||
quotemark: { | ||
options: ["double", "avoid-escape"], | ||
}, | ||
radix: true, | ||
semicolon: { options: ["always"] }, | ||
"space-before-function-paren": { | ||
options: { | ||
anonymous: "never", | ||
asyncArrow: "always", | ||
constructor: "never", | ||
method: "never", | ||
named: "never", | ||
}, | ||
}, | ||
"trailing-comma": { | ||
options: { | ||
esSpecCompliant: true, | ||
multiline: "always", | ||
singleline: "never", | ||
}, | ||
}, | ||
"triple-equals": { options: ["allow-null-check"] }, | ||
typedef: false, | ||
"typedef-whitespace": { | ||
options: [ | ||
{ | ||
"call-signature": "nospace", | ||
"index-signature": "nospace", | ||
parameter: "nospace", | ||
"property-declaration": "nospace", | ||
"variable-declaration": "nospace", | ||
}, | ||
{ | ||
"call-signature": "onespace", | ||
"index-signature": "onespace", | ||
parameter: "onespace", | ||
"property-declaration": "onespace", | ||
"variable-declaration": "onespace", | ||
}, | ||
], | ||
}, | ||
"typeof-compare": false, | ||
@@ -176,32 +97,11 @@ "unified-signatures": true, | ||
"variable-name": { | ||
options: ["ban-keywords", "check-format", "allow-pascal-case"], | ||
options: ["allow-leading-underscore", "ban-keywords", "check-format", "allow-pascal-case"], | ||
}, | ||
whitespace: { | ||
options: [ | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type", | ||
"check-typecast", | ||
], | ||
}, | ||
}; | ||
exports.jsRules = { | ||
align: { | ||
options: ["parameters", "statements"], | ||
}, | ||
"class-name": true, | ||
curly: true, | ||
eofline: true, | ||
forin: true, | ||
"import-spacing": true, | ||
indent: { | ||
options: ["spaces"], | ||
}, | ||
"jsdoc-format": true, | ||
"label-position": true, | ||
"max-line-length": { | ||
options: [120], | ||
}, | ||
"new-parens": true, | ||
@@ -224,52 +124,12 @@ "no-arg": true, | ||
"no-switch-case-fall-through": false, | ||
"no-trailing-whitespace": true, | ||
"no-unused-expression": true, | ||
// disable this rule as it is very heavy performance-wise and not that useful | ||
"no-use-before-declare": false, | ||
"object-literal-sort-keys": true, | ||
"one-line": { | ||
options: [ | ||
"check-catch", | ||
"check-else", | ||
"check-finally", | ||
"check-open-brace", | ||
"check-whitespace", | ||
], | ||
}, | ||
"one-variable-per-declaration": { options: ["ignore-for-loop"] }, | ||
quotemark: { | ||
options: ["double", "avoid-escape"], | ||
}, | ||
radix: true, | ||
semicolon: { options: ["always"] }, | ||
"space-before-function-paren": { | ||
options: { | ||
anonymous: "never", | ||
asyncArrow: "always", | ||
constructor: "never", | ||
method: "never", | ||
named: "never", | ||
}, | ||
}, | ||
"trailing-comma": { | ||
options: { | ||
multiline: "always", | ||
singleline: "never", | ||
}, | ||
}, | ||
"triple-equals": { options: ["allow-null-check"] }, | ||
"use-isnan": true, | ||
"variable-name": { | ||
options: ["ban-keywords", "check-format", "allow-pascal-case"], | ||
options: ["allow-leading-underscore", "ban-keywords", "check-format", "allow-pascal-case"], | ||
}, | ||
whitespace: { | ||
options: [ | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type", | ||
"check-typecast", | ||
], | ||
}, | ||
}; |
@@ -458,3 +458,3 @@ "use strict"; | ||
} | ||
return tslib_1.__assign({}, (raw.exclude !== undefined | ||
return tslib_1.__assign(tslib_1.__assign({}, (raw.exclude !== undefined | ||
? { | ||
@@ -465,3 +465,3 @@ exclude: utils_1.arrayify(raw.exclude).map(function (pattern) { | ||
} | ||
: {}), (raw.format !== undefined | ||
: {})), (raw.format !== undefined | ||
? { | ||
@@ -516,4 +516,4 @@ format: raw.format, | ||
var key = _a[0], value = _a[1]; | ||
return (tslib_1.__assign({}, result, (_b = {}, _b[key] = value, _b))); | ||
return (tslib_1.__assign(tslib_1.__assign({}, result), (_b = {}, _b[key] = value, _b))); | ||
}, {}); | ||
} |
@@ -30,3 +30,3 @@ "use strict"; | ||
var output = '<?xml version="1.0" encoding="utf-8"?><testsuites package="tslint">'; | ||
var failureFileNames = new Set(failures.map(function (f) { return f.getFileName(); }).slice()); | ||
var failureFileNames = new Set(tslib_1.__spreadArrays(failures.map(function (f) { return f.getFileName(); }))); | ||
if (failures.length !== 0) { | ||
@@ -33,0 +33,0 @@ var failuresSorted = failures.sort(function (a, b) { |
@@ -48,3 +48,3 @@ "use strict"; | ||
description: "The human-readable formatter which includes the rule name in messages.", | ||
descriptionDetails: "The output is the same as the prose formatter with the rule name included", | ||
descriptionDetails: "Basic formatter which outputs simple human-readable messages", | ||
sample: "ERROR: (semicolon) myFile.ts[1, 14]: Missing semicolon", | ||
@@ -51,0 +51,0 @@ consumer: "human", |
@@ -32,2 +32,3 @@ "use strict"; | ||
var failureString = failure.getFailure(); | ||
var failureSeverity = failure.getRuleSeverity(); | ||
var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); | ||
@@ -38,3 +39,3 @@ var line = lineAndCharacter.line + 1; | ||
var properties = "sourcepath=" + fileName + ";linenumber=" + line + ";columnnumber=" + character + ";code=" + code + ";"; | ||
return "##vso[task.logissue type=warning;" + properties + "]" + failureString; | ||
return "##vso[task.logissue type=" + failureSeverity + ";" + properties + "]" + failureString; | ||
}); | ||
@@ -41,0 +42,0 @@ return outputLines.join("\n") + "\n"; |
@@ -164,3 +164,3 @@ "use strict"; | ||
ruleName: this.ruleName, | ||
ruleSeverity: this.ruleSeverity.toUpperCase(), | ||
ruleSeverity: this.ruleSeverity, | ||
startPosition: this.startPosition.toJson(), | ||
@@ -167,0 +167,0 @@ }; |
@@ -136,3 +136,3 @@ "use strict"; | ||
var failures = this.options.quiet ? errors : this.failures; | ||
var formatterName = this.options.formatter !== undefined ? this.options.formatter : "prose"; | ||
var formatterName = this.options.formatter !== undefined ? this.options.formatter : "stylish"; | ||
var Formatter = formatterLoader_1.findFormatter(formatterName, this.options.formattersDirectory); | ||
@@ -247,3 +247,3 @@ if (Formatter === undefined) { | ||
}; | ||
Linter.VERSION = "5.20.0"; | ||
Linter.VERSION = "6.0.0-beta0"; | ||
Linter.findConfiguration = configuration_1.findConfiguration; | ||
@@ -250,0 +250,0 @@ Linter.findConfigurationPath = configuration_1.findConfigurationPath; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a; | ||
var utils = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -91,3 +91,3 @@ "use strict"; | ||
? undefined | ||
: (expr.kind === ts.SyntaxKind.ObjectLiteralExpression | ||
: tslib_1.__spreadArrays((expr.kind === ts.SyntaxKind.ObjectLiteralExpression | ||
? [ | ||
@@ -97,3 +97,3 @@ Lint.Replacement.appendText(expr.getStart(), "("), | ||
] | ||
: []).concat([ | ||
: []), [ | ||
// " {" | ||
@@ -100,0 +100,0 @@ Lint.Replacement.deleteFromTo(arrow.end, openBrace.end), |
@@ -29,3 +29,3 @@ "use strict"; | ||
Rule.prototype.applyWithProgram = function (sourceFile, program) { | ||
var promiseTypes = new Set(["Promise"].concat(this.ruleArguments)); | ||
var promiseTypes = new Set(tslib_1.__spreadArrays(["Promise"], this.ruleArguments)); | ||
return this.applyWithFunction(sourceFile, walk, promiseTypes, program.getTypeChecker()); | ||
@@ -32,0 +32,0 @@ }; |
@@ -22,2 +22,3 @@ "use strict"; | ||
var classExclusion_1 = require("./classExclusion"); | ||
var constructorExclusion_1 = require("./constructorExclusion"); | ||
var tagExclusion_1 = require("./tagExclusion"); | ||
@@ -48,8 +49,13 @@ exports.constructExclusionsMap = function (ruleArguments) { | ||
} | ||
if (docType === "methods" || docType === "properties") { | ||
requirements.push(new classExclusion_1.ClassExclusion(descriptor)); | ||
switch (docType) { | ||
case "constructors": | ||
requirements.push(new constructorExclusion_1.ConstructorExclusion(descriptor)); | ||
break; | ||
case "methods": | ||
case "properties": | ||
requirements.push(new classExclusion_1.ClassExclusion(descriptor)); | ||
break; | ||
default: | ||
requirements.push(new blockExclusion_1.BlockExclusion(descriptor)); | ||
} | ||
else { | ||
requirements.push(new blockExclusion_1.BlockExclusion(descriptor)); | ||
} | ||
if (descriptor.tags !== undefined) { | ||
@@ -56,0 +62,0 @@ requirements.push(new tagExclusion_1.TagExclusion(descriptor)); |
@@ -22,2 +22,3 @@ /** | ||
export declare const ARGUMENT_CLASSES = "classes"; | ||
export declare const ARGUMENT_CONSTRUCTORS = "constructors"; | ||
export declare const ARGUMENT_ENUMS = "enums"; | ||
@@ -47,3 +48,3 @@ export declare const ARGUMENT_ENUM_MEMBERS = "enum-members"; | ||
export declare type All = typeof ALL; | ||
export declare type DocType = All | typeof ARGUMENT_CLASSES | typeof ARGUMENT_ENUMS | typeof ARGUMENT_ENUM_MEMBERS | typeof ARGUMENT_FUNCTIONS | typeof ARGUMENT_INTERFACES | typeof ARGUMENT_METHODS | typeof ARGUMENT_NAMESPACES | typeof ARGUMENT_PROPERTIES | typeof ARGUMENT_TYPES | typeof ARGUMENT_VARIABLES; | ||
export declare type DocType = All | typeof ARGUMENT_CLASSES | typeof ARGUMENT_CONSTRUCTORS | typeof ARGUMENT_ENUMS | typeof ARGUMENT_ENUM_MEMBERS | typeof ARGUMENT_FUNCTIONS | typeof ARGUMENT_INTERFACES | typeof ARGUMENT_METHODS | typeof ARGUMENT_NAMESPACES | typeof ARGUMENT_PROPERTIES | typeof ARGUMENT_TYPES | typeof ARGUMENT_VARIABLES; | ||
export declare type Location = All | typeof LOCATION_INSTANCE | typeof LOCATION_STATIC; | ||
@@ -109,2 +110,30 @@ export declare type Privacy = All | typeof PRIVACY_PRIVATE | typeof PRIVACY_PROTECTED | typeof PRIVACY_PUBLIC; | ||
}; | ||
static ARGUMENT_DESCRIPTOR_CONSTRUCTOR: { | ||
properties: { | ||
tags: { | ||
properties: { | ||
content: { | ||
items: { | ||
type: string; | ||
}; | ||
type: string; | ||
}; | ||
existence: { | ||
items: { | ||
type: string; | ||
}; | ||
type: string; | ||
}; | ||
}; | ||
}; | ||
privacies: { | ||
enum: string[]; | ||
type: string; | ||
}; | ||
overloads: { | ||
type: string; | ||
}; | ||
}; | ||
type: string; | ||
}; | ||
static ARGUMENT_DESCRIPTOR_FUNCTION: { | ||
@@ -111,0 +140,0 @@ properties: { |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; | ||
var tsutils = require("tsutils"); | ||
@@ -28,2 +28,3 @@ var ts = require("typescript"); | ||
exports.ARGUMENT_CLASSES = "classes"; | ||
exports.ARGUMENT_CONSTRUCTORS = "constructors"; | ||
exports.ARGUMENT_ENUMS = "enums"; | ||
@@ -144,12 +145,40 @@ exports.ARGUMENT_ENUM_MEMBERS = "enum-members"; | ||
}; | ||
Rule.ARGUMENT_DESCRIPTOR_CONSTRUCTOR = { | ||
properties: (_k = {}, | ||
_k[exports.DESCRIPTOR_TAGS] = { | ||
properties: (_l = {}, | ||
_l[exports.TAGS_FOR_CONTENT] = { | ||
items: { | ||
type: "string", | ||
}, | ||
type: "object", | ||
}, | ||
_l[exports.TAGS_FOR_EXISTENCE] = { | ||
items: { | ||
type: "string", | ||
}, | ||
type: "array", | ||
}, | ||
_l), | ||
}, | ||
_k[exports.DESCRIPTOR_PRIVACIES] = { | ||
enum: [exports.ALL, exports.PRIVACY_PRIVATE, exports.PRIVACY_PROTECTED, exports.PRIVACY_PUBLIC], | ||
type: "string", | ||
}, | ||
_k[exports.DESCRIPTOR_OVERLOADS] = { | ||
type: "boolean", | ||
}, | ||
_k), | ||
type: "object", | ||
}; | ||
Rule.ARGUMENT_DESCRIPTOR_FUNCTION = { | ||
properties: tslib_1.__assign({}, Rule.ARGUMENT_DESCRIPTOR_BLOCK.properties, (_k = {}, _k[exports.DESCRIPTOR_OVERLOADS] = { | ||
properties: tslib_1.__assign(tslib_1.__assign({}, Rule.ARGUMENT_DESCRIPTOR_BLOCK.properties), (_m = {}, _m[exports.DESCRIPTOR_OVERLOADS] = { | ||
type: "boolean", | ||
}, _k)), | ||
}, _m)), | ||
type: "object", | ||
}; | ||
Rule.ARGUMENT_DESCRIPTOR_METHOD = { | ||
properties: tslib_1.__assign({}, Rule.ARGUMENT_DESCRIPTOR_CLASS.properties, (_l = {}, _l[exports.DESCRIPTOR_OVERLOADS] = { | ||
properties: tslib_1.__assign(tslib_1.__assign({}, Rule.ARGUMENT_DESCRIPTOR_CLASS.properties), (_o = {}, _o[exports.DESCRIPTOR_OVERLOADS] = { | ||
type: "boolean", | ||
}, _l)), | ||
}, _o)), | ||
type: "object", | ||
@@ -161,3 +190,3 @@ }; | ||
description: "Enforces JSDoc comments for important items be filled out.", | ||
optionsDescription: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n `true` to enable for `[", "]`,\n or an array with each item in one of two formats:\n\n * `string` to enable for that type\n * `object` keying types to when their documentation is required:\n * `\"", "\"` and `\"", "\"` may specify:\n * `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * Other types may specify `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"` `\"", "\"` may also specify `\"", "\"`\n to indicate that each overload should have its own documentation, which is `false` by default.\n * All types may also provide `\"", "\"`\n with members specifying tags that allow the docs to not have a body.\n * `\"", "\"`: Object mapping tags to `RegExp` bodies content allowed to count as complete docs.\n * `\"", "\"`: Array of tags that must only exist to count as complete docs.\n\n Types that may be enabled are:\n\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`"], ["\n \\`true\\` to enable for \\`[", "]\\`,\n or an array with each item in one of two formats:\n\n * \\`string\\` to enable for that type\n * \\`object\\` keying types to when their documentation is required:\n * \\`\"", "\"\\` and \\`\"", "\"\\` may specify:\n * \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * Other types may specify \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\` \\`\"", "\"\\` may also specify \\`\"", "\"\\`\n to indicate that each overload should have its own documentation, which is \\`false\\` by default.\n * All types may also provide \\`\"", "\"\\`\n with members specifying tags that allow the docs to not have a body.\n * \\`\"", "\"\\`: Object mapping tags to \\`RegExp\\` bodies content allowed to count as complete docs.\n * \\`\"", "\"\\`: Array of tags that must only exist to count as complete docs.\n\n Types that may be enabled are:\n\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`"])), Object.keys(Rule.defaultArguments).join(", "), exports.ARGUMENT_METHODS, exports.ARGUMENT_PROPERTIES, exports.DESCRIPTOR_PRIVACIES, exports.ALL, exports.PRIVACY_PRIVATE, exports.PRIVACY_PROTECTED, exports.PRIVACY_PUBLIC, exports.DESCRIPTOR_LOCATIONS, exports.ALL, exports.LOCATION_INSTANCE, exports.LOCATION_STATIC, exports.DESCRIPTOR_VISIBILITIES, exports.ALL, exports.VISIBILITY_EXPORTED, exports.VISIBILITY_INTERNAL, exports.ARGUMENT_FUNCTIONS, exports.ARGUMENT_METHODS, exports.DESCRIPTOR_OVERLOADS, exports.DESCRIPTOR_TAGS, exports.TAGS_FOR_CONTENT, exports.TAGS_FOR_EXISTENCE, exports.ARGUMENT_CLASSES, exports.ARGUMENT_ENUMS, exports.ARGUMENT_ENUM_MEMBERS, exports.ARGUMENT_FUNCTIONS, exports.ARGUMENT_INTERFACES, exports.ARGUMENT_METHODS, exports.ARGUMENT_NAMESPACES, exports.ARGUMENT_PROPERTIES, exports.ARGUMENT_TYPES, exports.ARGUMENT_VARIABLES), | ||
optionsDescription: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n `true` to enable for `[", "]`,\n or an array with each item in one of two formats:\n\n * `string` to enable for that type\n * `object` keying types to when their documentation is required:\n * `\"", "\"` and `\"", "\"` may specify:\n * `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * Other types may specify `\"", "\"`:\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"` `\"", "\"` may also specify `\"", "\"`\n to indicate that each overload should have its own documentation, which is `false` by default.\n * All types may also provide `\"", "\"`\n with members specifying tags that allow the docs to not have a body.\n * `\"", "\"`: Object mapping tags to `RegExp` bodies content allowed to count as complete docs.\n * `\"", "\"`: Array of tags that must only exist to count as complete docs.\n\n Types that may be enabled are:\n\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`\n * `\"", "\"`"], ["\n \\`true\\` to enable for \\`[", "]\\`,\n or an array with each item in one of two formats:\n\n * \\`string\\` to enable for that type\n * \\`object\\` keying types to when their documentation is required:\n * \\`\"", "\"\\` and \\`\"", "\"\\` may specify:\n * \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * Other types may specify \\`\"", "\"\\`:\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\` \\`\"", "\"\\` may also specify \\`\"", "\"\\`\n to indicate that each overload should have its own documentation, which is \\`false\\` by default.\n * All types may also provide \\`\"", "\"\\`\n with members specifying tags that allow the docs to not have a body.\n * \\`\"", "\"\\`: Object mapping tags to \\`RegExp\\` bodies content allowed to count as complete docs.\n * \\`\"", "\"\\`: Array of tags that must only exist to count as complete docs.\n\n Types that may be enabled are:\n\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`\n * \\`\"", "\"\\`"])), Object.keys(Rule.defaultArguments).join(", "), exports.ARGUMENT_METHODS, exports.ARGUMENT_PROPERTIES, exports.DESCRIPTOR_PRIVACIES, exports.ALL, exports.PRIVACY_PRIVATE, exports.PRIVACY_PROTECTED, exports.PRIVACY_PUBLIC, exports.DESCRIPTOR_LOCATIONS, exports.ALL, exports.LOCATION_INSTANCE, exports.LOCATION_STATIC, exports.DESCRIPTOR_VISIBILITIES, exports.ALL, exports.VISIBILITY_EXPORTED, exports.VISIBILITY_INTERNAL, exports.ARGUMENT_FUNCTIONS, exports.ARGUMENT_METHODS, exports.DESCRIPTOR_OVERLOADS, exports.DESCRIPTOR_TAGS, exports.TAGS_FOR_CONTENT, exports.TAGS_FOR_EXISTENCE, exports.ARGUMENT_CLASSES, exports.ARGUMENT_CONSTRUCTORS, exports.ARGUMENT_ENUMS, exports.ARGUMENT_ENUM_MEMBERS, exports.ARGUMENT_FUNCTIONS, exports.ARGUMENT_INTERFACES, exports.ARGUMENT_METHODS, exports.ARGUMENT_NAMESPACES, exports.ARGUMENT_PROPERTIES, exports.ARGUMENT_TYPES, exports.ARGUMENT_VARIABLES), | ||
options: { | ||
@@ -183,14 +212,15 @@ type: "array", | ||
type: "object", | ||
properties: (_m = {}, | ||
_m[exports.ARGUMENT_CLASSES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_ENUMS] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_ENUM_MEMBERS] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_FUNCTIONS] = Rule.ARGUMENT_DESCRIPTOR_FUNCTION, | ||
_m[exports.ARGUMENT_INTERFACES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_METHODS] = Rule.ARGUMENT_DESCRIPTOR_METHOD, | ||
_m[exports.ARGUMENT_NAMESPACES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_PROPERTIES] = Rule.ARGUMENT_DESCRIPTOR_CLASS, | ||
_m[exports.ARGUMENT_TYPES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m[exports.ARGUMENT_VARIABLES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_m), | ||
properties: (_p = {}, | ||
_p[exports.ARGUMENT_CLASSES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_CONSTRUCTORS] = Rule.ARGUMENT_DESCRIPTOR_CONSTRUCTOR, | ||
_p[exports.ARGUMENT_ENUMS] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_ENUM_MEMBERS] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_FUNCTIONS] = Rule.ARGUMENT_DESCRIPTOR_FUNCTION, | ||
_p[exports.ARGUMENT_INTERFACES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_METHODS] = Rule.ARGUMENT_DESCRIPTOR_METHOD, | ||
_p[exports.ARGUMENT_NAMESPACES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_PROPERTIES] = Rule.ARGUMENT_DESCRIPTOR_CLASS, | ||
_p[exports.ARGUMENT_TYPES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p[exports.ARGUMENT_VARIABLES] = Rule.ARGUMENT_DESCRIPTOR_BLOCK, | ||
_p), | ||
}, | ||
@@ -205,20 +235,20 @@ ], | ||
true, | ||
(_o = {}, | ||
_o[exports.ARGUMENT_ENUMS] = true, | ||
_o[exports.ARGUMENT_FUNCTIONS] = (_p = {}, | ||
_p[exports.DESCRIPTOR_VISIBILITIES] = [exports.VISIBILITY_EXPORTED], | ||
_p), | ||
_o[exports.ARGUMENT_METHODS] = (_q = {}, | ||
_q[exports.DESCRIPTOR_LOCATIONS] = exports.LOCATION_INSTANCE, | ||
_q[exports.DESCRIPTOR_PRIVACIES] = [exports.PRIVACY_PUBLIC, exports.PRIVACY_PROTECTED], | ||
_q), | ||
_o[exports.ARGUMENT_PROPERTIES] = (_r = {}, | ||
_r[exports.DESCRIPTOR_TAGS] = (_s = {}, | ||
_s[exports.TAGS_FOR_CONTENT] = { | ||
(_q = {}, | ||
_q[exports.ARGUMENT_ENUMS] = true, | ||
_q[exports.ARGUMENT_FUNCTIONS] = (_r = {}, | ||
_r[exports.DESCRIPTOR_VISIBILITIES] = [exports.VISIBILITY_EXPORTED], | ||
_r), | ||
_q[exports.ARGUMENT_METHODS] = (_s = {}, | ||
_s[exports.DESCRIPTOR_LOCATIONS] = exports.LOCATION_INSTANCE, | ||
_s[exports.DESCRIPTOR_PRIVACIES] = [exports.PRIVACY_PUBLIC, exports.PRIVACY_PROTECTED], | ||
_s), | ||
_q[exports.ARGUMENT_PROPERTIES] = (_t = {}, | ||
_t[exports.DESCRIPTOR_TAGS] = (_u = {}, | ||
_u[exports.TAGS_FOR_CONTENT] = { | ||
see: ["#.*"], | ||
}, | ||
_s[exports.TAGS_FOR_EXISTENCE] = ["inheritdoc"], | ||
_s), | ||
_r), | ||
_o), | ||
_u[exports.TAGS_FOR_EXISTENCE] = ["inheritdoc"], | ||
_u), | ||
_t), | ||
_q), | ||
], | ||
@@ -243,2 +273,5 @@ ], | ||
break; | ||
case ts.SyntaxKind.Constructor: | ||
checkNode(node, exports.ARGUMENT_CONSTRUCTORS); | ||
break; | ||
case ts.SyntaxKind.EnumDeclaration: | ||
@@ -316,5 +349,7 @@ checkNode(node, exports.ARGUMENT_ENUMS); | ||
function nodeIsExcluded(node, docType, requirementNode) { | ||
var name = node.name; | ||
if (name === undefined) { | ||
return true; | ||
if (docType !== exports.ARGUMENT_CONSTRUCTORS) { | ||
var name = node.name; | ||
if (name === undefined) { | ||
return true; | ||
} | ||
} | ||
@@ -360,3 +395,3 @@ var exclusions = context.options.get(docType); | ||
.filter(function (nodeDocs) { return nodeDocs !== undefined; }) | ||
.reduce(function (docs, moreDocs) { return docs.concat(moreDocs); }, []); | ||
.reduce(function (docs, moreDocs) { return tslib_1.__spreadArrays(docs, moreDocs); }, []); | ||
} | ||
@@ -379,2 +414,6 @@ /** | ||
} | ||
if (tsutils.isConstructorDeclaration(node)) { | ||
var members = node.parent.members; | ||
return members.filter(function (child) { return tsutils.isConstructorDeclaration(child); }); | ||
} | ||
if (tsutils.isMethodDeclaration(node) && | ||
@@ -445,3 +484,3 @@ tsutils.isIdentifier(node.name) && | ||
if (ts.isSourceFile(parent)) { | ||
return parent.statements.slice(); | ||
return tslib_1.__spreadArrays(parent.statements); | ||
} | ||
@@ -448,0 +487,0 @@ return parent.getChildren(); |
@@ -24,5 +24,5 @@ /** | ||
static FAILURE_STRING(expected: number, actual: number, name?: string): string; | ||
private readonly threshold; | ||
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[]; | ||
isEnabled(): boolean; | ||
private readonly threshold; | ||
} |
@@ -34,10 +34,2 @@ "use strict"; | ||
}; | ||
Rule.prototype.apply = function (sourceFile) { | ||
return this.applyWithFunction(sourceFile, walk, { threshold: this.threshold }); | ||
}; | ||
Rule.prototype.isEnabled = function () { | ||
// Disable the rule if the option is provided but non-numeric or less than the minimum. | ||
var isThresholdValid = typeof this.threshold === "number" && this.threshold >= Rule.MINIMUM_THRESHOLD; | ||
return _super.prototype.isEnabled.call(this) && isThresholdValid; | ||
}; | ||
Object.defineProperty(Rule.prototype, "threshold", { | ||
@@ -53,2 +45,10 @@ get: function () { | ||
}); | ||
Rule.prototype.apply = function (sourceFile) { | ||
return this.applyWithFunction(sourceFile, walk, { threshold: this.threshold }); | ||
}; | ||
Rule.prototype.isEnabled = function () { | ||
// Disable the rule if the option is provided but non-numeric or less than the minimum. | ||
var isThresholdValid = typeof this.threshold === "number" && this.threshold >= Rule.MINIMUM_THRESHOLD; | ||
return _super.prototype.isEnabled.call(this) && isThresholdValid; | ||
}; | ||
Rule.DEFAULT_THRESHOLD = 20; | ||
@@ -55,0 +55,0 @@ Rule.MINIMUM_THRESHOLD = 2; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var ts = require("typescript"); | ||
@@ -92,5 +92,5 @@ var Lint = require("../index"); | ||
return (lineEnding.repeat(leadingNewlines) + | ||
[ | ||
tslib_1.__spreadArrays([ | ||
"/*!" | ||
].concat(commentText.split(/\r?\n/g).map(function (line) { return (" * " + line).replace(/\s+$/, ""); }), [ | ||
], commentText.split(/\r?\n/g).map(function (line) { return (" * " + line).replace(/\s+$/, ""); }), [ | ||
" */", | ||
@@ -97,0 +97,0 @@ ]).join(lineEnding) + |
@@ -76,2 +76,4 @@ "use strict"; | ||
[true, "rxjs", "lodash"], | ||
[true, [".*\\.temp$", ".*\\.tmp$"]], | ||
[true, { lodash: ["pull", "pullAll"] }], | ||
[true, "lodash", { lodash: ["pull", "pullAll"] }], | ||
@@ -188,3 +190,3 @@ [true, "rxjs", { lodash: ["pull", "pullAll"] }, [".*\\.temp$", ".*\\.tmp$"]], | ||
: undefined; | ||
var namedImportsOrReExports = (importsDefaultExport ? ["default"] : []).concat((importsSpecificNamedExports | ||
var namedImportsOrReExports = tslib_1.__spreadArrays((importsDefaultExport ? ["default"] : []), (importsSpecificNamedExports | ||
? importClause.namedBindings.elements.map(toExportName) | ||
@@ -191,0 +193,0 @@ : []), (exportClause !== undefined ? exportClause.elements.map(toExportName) : [])); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b, _c; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b, _c; | ||
var tsutils = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -22,3 +22,4 @@ /** | ||
static FAILURE_STRING_ALPHABETIZE(prevName: string, curName: string): string; | ||
static stringCompare(a: string, b: string): 1 | -1 | 0; | ||
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[]; | ||
} |
@@ -30,7 +30,7 @@ "use strict"; | ||
MemberKind[MemberKind["publicStaticField"] = 0] = "publicStaticField"; | ||
MemberKind[MemberKind["publicStaticMethod"] = 1] = "publicStaticMethod"; | ||
MemberKind[MemberKind["protectedStaticField"] = 2] = "protectedStaticField"; | ||
MemberKind[MemberKind["protectedStaticMethod"] = 3] = "protectedStaticMethod"; | ||
MemberKind[MemberKind["privateStaticField"] = 4] = "privateStaticField"; | ||
MemberKind[MemberKind["privateStaticMethod"] = 5] = "privateStaticMethod"; | ||
MemberKind[MemberKind["protectedStaticField"] = 1] = "protectedStaticField"; | ||
MemberKind[MemberKind["privateStaticField"] = 2] = "privateStaticField"; | ||
MemberKind[MemberKind["publicStaticMethod"] = 3] = "publicStaticMethod"; | ||
MemberKind[MemberKind["privateStaticMethod"] = 4] = "privateStaticMethod"; | ||
MemberKind[MemberKind["protectedStaticMethod"] = 5] = "protectedStaticMethod"; | ||
MemberKind[MemberKind["publicInstanceField"] = 6] = "publicInstanceField"; | ||
@@ -45,2 +45,8 @@ MemberKind[MemberKind["protectedInstanceField"] = 7] = "protectedInstanceField"; | ||
MemberKind[MemberKind["privateInstanceMethod"] = 14] = "privateInstanceMethod"; | ||
MemberKind[MemberKind["publicStaticAccessor"] = 15] = "publicStaticAccessor"; | ||
MemberKind[MemberKind["protectedStaticAccessor"] = 16] = "protectedStaticAccessor"; | ||
MemberKind[MemberKind["privateStaticAccessor"] = 17] = "privateStaticAccessor"; | ||
MemberKind[MemberKind["publicInstanceAccessor"] = 18] = "publicInstanceAccessor"; | ||
MemberKind[MemberKind["protectedInstanceAccessor"] = 19] = "protectedInstanceAccessor"; | ||
MemberKind[MemberKind["privateInstanceAccessor"] = 20] = "privateInstanceAccessor"; | ||
})(MemberKind || (MemberKind = {})); | ||
@@ -58,5 +64,11 @@ var PRESETS = new Map([ | ||
"constructor", | ||
"public-static-accessor", | ||
"protected-static-accessor", | ||
"private-static-accessor", | ||
"public-static-method", | ||
"protected-static-method", | ||
"private-static-method", | ||
"public-instance-accessor", | ||
"protected-instance-accessor", | ||
"private-instance-accessor", | ||
"public-instance-method", | ||
@@ -77,5 +89,11 @@ "protected-instance-method", | ||
"constructor", | ||
"public-instance-accessor", | ||
"protected-instance-accessor", | ||
"private-instance-accessor", | ||
"public-instance-method", | ||
"protected-instance-method", | ||
"private-instance-method", | ||
"public-static-accessor", | ||
"protected-static-accessor", | ||
"private-static-accessor", | ||
"public-static-method", | ||
@@ -90,6 +108,9 @@ "protected-static-method", | ||
"public-static-field", | ||
"public-static-accessor", | ||
"public-static-method", | ||
"protected-static-field", | ||
"protected-static-accessor", | ||
"protected-static-method", | ||
"private-static-field", | ||
"private-static-accessor", | ||
"private-static-method", | ||
@@ -100,2 +121,5 @@ "public-instance-field", | ||
"constructor", | ||
"public-instance-accessor", | ||
"protected-instance-accessor", | ||
"private-instance-accessor", | ||
"public-instance-method", | ||
@@ -117,3 +141,3 @@ "protected-instance-method", | ||
} | ||
var optionsDescription = Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n One argument, which is an object, must be provided. It should contain an `order` property.\n The `order` property should have a value of one of the following strings:\n\n ", "\n\n `fields-first` puts, in order of precedence:\n\n * fields before constructors before methods\n * static members before instance members\n * public members before protected members before private members\n\n `instance-sandwich` puts, in order of precedence:\n\n * fields before constructors before methods\n * static fields before instance fields, but static methods *after* instance methods\n * public members before protected members before private members\n\n `statics-first` puts, in order of precedence:\n\n * static members before instance members\n * public members before protected members before private members\n * fields before methods\n * instance fields before constructors before instance methods\n * fields before constructors before methods\n * public members before protected members before private members\n\n Note that these presets, despite looking similar, can have subtly different behavior due to the order in which these\n rules are specified. A fully expanded ordering can be found in the PRESETS constant in\n https://github.com/palantir/tslint/blob/master/src/rules/memberOrderingRule.ts.\n (You may need to check the version of the file corresponding to your version of tslint.)\n\n Alternatively, the value for `order` may be an array consisting of the following strings:\n\n ", "\n\n You can also omit the access modifier to refer to \"public-\", \"protected-\", and \"private-\" all at once; for example, \"static-field\".\n\n You can also make your own categories by using an object instead of a string:\n\n {\n \"name\": \"static non-private\",\n \"kinds\": [\n \"public-static-field\",\n \"protected-static-field\",\n \"public-static-method\",\n \"protected-static-method\"\n ]\n }\n\n The '", "' option will enforce that members within the same category should be alphabetically sorted by name."], ["\n One argument, which is an object, must be provided. It should contain an \\`order\\` property.\n The \\`order\\` property should have a value of one of the following strings:\n\n ", "\n\n \\`fields-first\\` puts, in order of precedence:\n\n * fields before constructors before methods\n * static members before instance members\n * public members before protected members before private members\n\n \\`instance-sandwich\\` puts, in order of precedence:\n\n * fields before constructors before methods\n * static fields before instance fields, but static methods *after* instance methods\n * public members before protected members before private members\n\n \\`statics-first\\` puts, in order of precedence:\n\n * static members before instance members\n * public members before protected members before private members\n * fields before methods\n * instance fields before constructors before instance methods\n * fields before constructors before methods\n * public members before protected members before private members\n\n Note that these presets, despite looking similar, can have subtly different behavior due to the order in which these\n rules are specified. A fully expanded ordering can be found in the PRESETS constant in\n https://github.com/palantir/tslint/blob/master/src/rules/memberOrderingRule.ts.\n (You may need to check the version of the file corresponding to your version of tslint.)\n\n Alternatively, the value for \\`order\\` may be an array consisting of the following strings:\n\n ", "\n\n You can also omit the access modifier to refer to \"public-\", \"protected-\", and \"private-\" all at once; for example, \"static-field\".\n\n You can also make your own categories by using an object instead of a string:\n\n {\n \"name\": \"static non-private\",\n \"kinds\": [\n \"public-static-field\",\n \"protected-static-field\",\n \"public-static-method\",\n \"protected-static-method\"\n ]\n }\n\n The '", "' option will enforce that members within the same category should be alphabetically sorted by name."])), namesMarkdown(PRESET_NAMES), namesMarkdown(allMemberKindNames), OPTION_ALPHABETIZE); | ||
var optionsDescription = Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n One argument, which is an object, must be provided. It should contain an `order` property.\n The `order` property should have a value of one of the following strings:\n\n ", "\n\n `fields-first` puts, in order of precedence:\n * fields before constructors before methods\n * static members before instance members\n * public members before protected members before private members\n `instance-sandwich` puts, in order of precedence:\n * fields before constructors before methods\n * static fields before instance fields, but static methods *after* instance methods\n * public members before protected members before private members\n `statics-first` puts, in order of precedence:\n * static members before instance members\n * public members before protected members before private members\n * fields before methods\n * instance fields before constructors before instance methods\n * fields before constructors before methods\n * public members before protected members before private members\n Note that these presets, despite looking similar, can have subtly different behavior due to the order in which these\n rules are specified. A fully expanded ordering can be found in the PRESETS constant in\n https://github.com/palantir/tslint/blob/master/src/rules/memberOrderingRule.ts.\n (You may need to check the version of the file corresponding to your version of tslint.)\n\n Alternatively, the value for `order` may be an array consisting of the following strings:\n\n ", "\n\n You can also omit the access modifier to refer to \"public-\", \"protected-\", and \"private-\" all at once; for example, \"static-field\".\n\n You can also make your own categories by using an object instead of a string:\n\n {\n \"name\": \"static non-private\",\n \"kinds\": [\n \"public-static-field\",\n \"protected-static-field\",\n \"public-static-method\",\n \"protected-static-method\"\n ]\n }\n\n The '", "' option will enforce that members within the same category should be alphabetically sorted by name.\n Computed property names are sorted before others but not sorted amongst each other.\n Additionally getters will be sorted before setters (after alphabetization)."], ["\n One argument, which is an object, must be provided. It should contain an \\`order\\` property.\n The \\`order\\` property should have a value of one of the following strings:\n\n ", "\n\n \\`fields-first\\` puts, in order of precedence:\n * fields before constructors before methods\n * static members before instance members\n * public members before protected members before private members\n \\`instance-sandwich\\` puts, in order of precedence:\n * fields before constructors before methods\n * static fields before instance fields, but static methods *after* instance methods\n * public members before protected members before private members\n \\`statics-first\\` puts, in order of precedence:\n * static members before instance members\n * public members before protected members before private members\n * fields before methods\n * instance fields before constructors before instance methods\n * fields before constructors before methods\n * public members before protected members before private members\n Note that these presets, despite looking similar, can have subtly different behavior due to the order in which these\n rules are specified. A fully expanded ordering can be found in the PRESETS constant in\n https://github.com/palantir/tslint/blob/master/src/rules/memberOrderingRule.ts.\n (You may need to check the version of the file corresponding to your version of tslint.)\n\n Alternatively, the value for \\`order\\` may be an array consisting of the following strings:\n\n ", "\n\n You can also omit the access modifier to refer to \"public-\", \"protected-\", and \"private-\" all at once; for example, \"static-field\".\n\n You can also make your own categories by using an object instead of a string:\n\n {\n \"name\": \"static non-private\",\n \"kinds\": [\n \"public-static-field\",\n \"protected-static-field\",\n \"public-static-method\",\n \"protected-static-method\"\n ]\n }\n\n The '", "' option will enforce that members within the same category should be alphabetically sorted by name.\n Computed property names are sorted before others but not sorted amongst each other.\n Additionally getters will be sorted before setters (after alphabetization)."])), namesMarkdown(PRESET_NAMES), namesMarkdown(allMemberKindNames), OPTION_ALPHABETIZE); | ||
var Rule = /** @class */ (function (_super) { | ||
@@ -130,3 +154,7 @@ tslib_1.__extends(Rule, _super); | ||
}; | ||
/* tslint:enable:object-literal-sort-keys */ | ||
Rule.stringCompare = function (a, b) { | ||
var aLower = a.toLowerCase(); | ||
var bLower = b.toLowerCase(); | ||
return aLower < bLower ? -1 : aLower > bLower ? 1 : 0; | ||
}; | ||
Rule.prototype.apply = function (sourceFile) { | ||
@@ -153,2 +181,5 @@ var options; | ||
properties: { | ||
alphabetize: { | ||
type: "boolean", | ||
}, | ||
order: { | ||
@@ -170,5 +201,2 @@ oneOf: [ | ||
}, | ||
alphabetize: { | ||
type: "boolean", | ||
}, | ||
}, | ||
@@ -182,2 +210,3 @@ additionalProperties: false, | ||
{ | ||
alphabetize: true, | ||
order: [ | ||
@@ -194,3 +223,2 @@ "public-static-field", | ||
], | ||
alphabetize: true, | ||
}, | ||
@@ -259,7 +287,6 @@ ], | ||
var _this = this; | ||
var prevRank = -1; | ||
var prevName; | ||
var prevMember = members[0]; | ||
var failureExists = false; | ||
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { | ||
var member = members_1[_i]; | ||
for (var i = 1; i < members.length; i++) { | ||
var member = members[i]; | ||
var rank = this.memberRank(member); | ||
@@ -270,2 +297,3 @@ if (rank === -1) { | ||
} | ||
var prevRank = this.memberRank(prevMember); | ||
if (rank < prevRank) { | ||
@@ -283,21 +311,26 @@ var nodeType = this.rankName(rank); | ||
failureExists = true; | ||
continue; // avoid updating prevMember at end of loop | ||
} | ||
else { | ||
if (this.options.alphabetize && member.name !== undefined) { | ||
if (rank !== prevRank) { | ||
// No alphabetical ordering between different ranks | ||
prevName = undefined; | ||
} | ||
var curName = nameString(member.name); | ||
if (prevName !== undefined && caseInsensitiveLess(curName, prevName)) { | ||
this.addFailureAtNode(member.name, Rule.FAILURE_STRING_ALPHABETIZE(this.findLowerName(members, rank, curName), curName), []); | ||
failureExists = true; | ||
} | ||
else { | ||
prevName = curName; | ||
} | ||
else if (prevRank === rank && | ||
this.options.alphabetize && | ||
member.name !== undefined && | ||
prevMember.name !== undefined) { | ||
var curName = nameString(member.name); | ||
var prevName = nameString(prevMember.name); | ||
var alphaDiff = Rule.stringCompare(prevName, curName); | ||
if (alphaDiff > 0) { | ||
this.addFailureAtNode(member.name, Rule.FAILURE_STRING_ALPHABETIZE(this.findLowerName(members, rank, curName), curName), []); | ||
failureExists = true; | ||
continue; | ||
} | ||
// keep track of last good node | ||
prevRank = rank; | ||
else if (alphaDiff === 0 && | ||
curName !== "" && // do not enforce get < set for computed properties | ||
member.kind === ts.SyntaxKind.GetAccessor && | ||
prevMember.kind === ts.SyntaxKind.SetAccessor) { | ||
this.addFailureAtNode(member.name, "Getter for '" + curName + "' should appear before setter.", []); | ||
failureExists = true; | ||
continue; | ||
} | ||
} | ||
prevMember = member; | ||
} | ||
@@ -319,6 +352,16 @@ if (failureExists) { | ||
var bName = nameString(b.name); | ||
var nameDiff = aName.localeCompare(bName); | ||
var nameDiff = Rule.stringCompare(aName, bName); | ||
if (nameDiff !== 0) { | ||
return nameDiff; | ||
} | ||
var getSetDiff = a.kind === ts.SyntaxKind.GetAccessor && | ||
b.kind === ts.SyntaxKind.SetAccessor | ||
? -1 | ||
: a.kind === ts.SyntaxKind.SetAccessor && | ||
b.kind === ts.SyntaxKind.GetAccessor | ||
? 1 | ||
: 0; | ||
if (aName !== "" && getSetDiff !== 0) { | ||
return getSetDiff; | ||
} | ||
} | ||
@@ -360,4 +403,4 @@ // finally, sort by position in original NodeArray so the sort remains stable. | ||
MemberOrderingWalker.prototype.findLowerName = function (members, targetRank, targetName) { | ||
for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { | ||
var member = members_2[_i]; | ||
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { | ||
var member = members_1[_i]; | ||
if (member.name === undefined || this.memberRank(member) !== targetRank) { | ||
@@ -376,4 +419,4 @@ continue; | ||
var max = -1; | ||
for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { | ||
var member = members_3[_i]; | ||
for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { | ||
var member = members_2[_i]; | ||
var rank = this.memberRank(member); | ||
@@ -401,8 +444,2 @@ if (rank !== -1 && rank < targetRank) { | ||
} | ||
function memberKindForConstructor(access) { | ||
return MemberKind[access + "Constructor"]; | ||
} | ||
function memberKindForMethodOrField(access, membership, kind) { | ||
return MemberKind[access + membership + kind]; | ||
} | ||
var allAccess = ["public", "protected", "private"]; | ||
@@ -426,21 +463,28 @@ function memberKindFromName(name) { | ||
: "public"; | ||
var membership = tsutils_1.hasModifier(member.modifiers, ts.SyntaxKind.StaticKeyword) | ||
? "Static" | ||
: "Instance"; | ||
switch (member.kind) { | ||
case ts.SyntaxKind.Constructor: | ||
case ts.SyntaxKind.ConstructSignature: | ||
return memberKindForConstructor(accessLevel); | ||
// tslint:disable-next-line:prefer-template | ||
return MemberKind[accessLevel + "Constructor"]; | ||
case ts.SyntaxKind.GetAccessor: | ||
case ts.SyntaxKind.SetAccessor: | ||
// tslint:disable-next-line:prefer-template | ||
return MemberKind[accessLevel + membership + "Accessor"]; | ||
case ts.SyntaxKind.PropertyDeclaration: | ||
case ts.SyntaxKind.PropertySignature: | ||
return methodOrField(isFunctionLiteral(member.initializer)); | ||
var type = isFunctionLiteral(member.initializer) | ||
? "Method" | ||
: "Field"; | ||
// tslint:disable-next-line:prefer-template | ||
return MemberKind[accessLevel + membership + type]; | ||
case ts.SyntaxKind.MethodDeclaration: | ||
case ts.SyntaxKind.MethodSignature: | ||
return methodOrField(true); | ||
// tslint:disable-next-line:prefer-template | ||
return MemberKind[accessLevel + membership + "Method"]; | ||
default: | ||
return undefined; | ||
} | ||
function methodOrField(isMethod) { | ||
var membership = tsutils_1.hasModifier(member.modifiers, ts.SyntaxKind.StaticKeyword) | ||
? "Static" | ||
: "Instance"; | ||
return memberKindForMethodOrField(accessLevel, membership, isMethod ? "Method" : "Field"); | ||
} | ||
} | ||
@@ -473,7 +517,10 @@ var MemberCategory = /** @class */ (function () { | ||
// Undocumented direct string option. Deprecate eventually. | ||
return { order: convertFromOldStyleOptions(allOptions), alphabetize: false }; // presume allOptions to be string[] | ||
var order = convertFromOldStyleOptions(allOptions); | ||
error_1.showWarningOnce(utils_1.dedent(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n Warning: member-ordering - Direct string option is deprecated and does not support accessors.\n See also https://palantir.github.io/tslint/rules/member-ordering/\n You should replace ", "\n with the following equivalent options and add -accessor categories as appropriate:\n"], ["\n Warning: member-ordering - Direct string option is deprecated and does not support accessors.\n See also https://palantir.github.io/tslint/rules/member-ordering/\n You should replace ", "\n with the following equivalent options and add -accessor categories as appropriate:\\n"])), allOptions.map(function (o) { return JSON.stringify(o); }).join()) + | ||
JSON.stringify(order, undefined, " ")); | ||
return { order: order, alphabetize: false }; // presume allOptions to be string[] | ||
} | ||
return { | ||
order: categoryFromOption(firstOption[OPTION_ORDER]), | ||
alphabetize: firstOption[OPTION_ALPHABETIZE] === true, | ||
order: categoryFromOption(firstOption[OPTION_ORDER]), | ||
}; | ||
@@ -671,2 +718,2 @@ } | ||
} | ||
var templateObject_1, templateObject_2; | ||
var templateObject_1, templateObject_2, templateObject_3; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -64,3 +64,3 @@ "use strict"; | ||
} | ||
return tslib_1.__assign({}, bodySuper, { break: false }); | ||
return tslib_1.__assign(tslib_1.__assign({}, bodySuper), { break: false }); | ||
} | ||
@@ -142,3 +142,3 @@ switch (node.kind) { | ||
if (seenSingle !== undefined) { | ||
return tslib_1.__assign({}, seenSingle, { break: true }); | ||
return tslib_1.__assign(tslib_1.__assign({}, seenSingle), { break: true }); | ||
} | ||
@@ -145,0 +145,0 @@ return childSuper; |
@@ -29,3 +29,3 @@ "use strict"; | ||
Rule.prototype.applyWithProgram = function (sourceFile, program) { | ||
return this.applyWithFunction(sourceFile, walk, ["Promise"].concat(this.ruleArguments), program.getTypeChecker()); | ||
return this.applyWithFunction(sourceFile, walk, tslib_1.__spreadArrays(["Promise"], this.ruleArguments), program.getTypeChecker()); | ||
}; | ||
@@ -32,0 +32,0 @@ /* tslint:disable:object-literal-sort-keys */ |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a; | ||
var utils = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var Lint = require("../index"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b, _c; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b, _c; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -86,4 +86,4 @@ var ts = require("typescript"); | ||
function parseOptions(options) { | ||
return tslib_1.__assign({}, DEFAULT_OPTIONS, options); | ||
return tslib_1.__assign(tslib_1.__assign({}, DEFAULT_OPTIONS), options); | ||
} | ||
var templateObject_1, templateObject_2, templateObject_3; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -39,3 +39,3 @@ var ts = require("typescript"); | ||
: []; | ||
return this.applyWithFunction(sourceFile, walk, { promiseClasses: ["Promise"].concat(promiseClasses) }, program.getTypeChecker()); | ||
return this.applyWithFunction(sourceFile, walk, { promiseClasses: tslib_1.__spreadArrays(["Promise"], promiseClasses) }, program.getTypeChecker()); | ||
}; | ||
@@ -42,0 +42,0 @@ /* tslint:disable:object-literal-sort-keys */ |
@@ -77,2 +77,3 @@ "use strict"; | ||
case ts.SyntaxKind.JSDocAugmentsTag: | ||
case ts.SyntaxKind.JSDocAuthorTag: | ||
// OK | ||
@@ -79,0 +80,0 @@ break; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var utils = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -411,3 +411,3 @@ "use strict"; | ||
var originalOptions = program.getCompilerOptions(); | ||
var options = tslib_1.__assign({}, originalOptions, { noEmit: true, noUnusedLocals: true, noUnusedParameters: originalOptions.noUnusedParameters || checkParameters }); | ||
var options = tslib_1.__assign(tslib_1.__assign({}, originalOptions), { noEmit: true, noUnusedLocals: true, noUnusedParameters: originalOptions.noUnusedParameters || checkParameters }); | ||
var sourceFilesByName = new Map(program | ||
@@ -414,0 +414,0 @@ .getSourceFiles() |
@@ -90,3 +90,3 @@ "use strict"; | ||
var _c = num.split("."), integer = _c[0], _d = _c[1], float = _d === void 0 ? "" : _d; | ||
var matchedNumeric = /(\.)([1-9]*)(0+)/.exec(num); | ||
var matchedNumeric = /(\.)(\d*?)(0+)$/.exec(num); | ||
var _e = Array.isArray(matchedNumeric) | ||
@@ -93,0 +93,0 @@ ? matchedNumeric.slice(1) |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -37,3 +37,3 @@ "use strict"; | ||
hasFix: true, | ||
optionsDescription: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n You may set the `\"import-sources-order\"` option to control the ordering of source\n imports (the `\"foo\"` in `import {A, B, C} from \"foo\"`).\n\n Possible values for `\"import-sources-order\"` are:\n\n * `\"case-insensitive'`: Correct order is `\"Bar\"`, `\"baz\"`, `\"Foo\"`. (This is the default.)\n * `\"lowercase-first\"`: Correct order is `\"baz\"`, `\"Bar\"`, `\"Foo\"`.\n * `\"lowercase-last\"`: Correct order is `\"Bar\"`, `\"Foo\"`, `\"baz\"`.\n * `\"any\"`: Allow any order.\n\n You may set the `\"grouped-imports\"` option to control the grouping of source\n imports (the `\"foo\"` in `import {A, B, C} from \"foo\"`). The grouping used\n is controlled by the `\"groups\"` option.\n\n Possible values for `\"grouped-imports\"` are:\n\n * `false`: Do not enforce grouping. (This is the default.)\n * `true`: Group source imports using default grouping or groups setting.\n\n The value of `\"groups\"` is a list of group rules of the form:\n\n [{\n \"name\": \"optional rule name\",\n \"match\": \"regex string\",\n \"order\": 10\n }, {\n \"name\": \"pkga imports\",\n \"match\": \"^@pkga\",\n \"order\": 20\n }]\n\n there is also a simplified form where you only pass a list of patterns and\n the order is given by the position in the list\n\n [\"^@pkga\", \"^\\.\\.\"]\n\n The first rule in the list to match a given import is the group that is used.\n If no rule in matched then the import will be put in an `unmatched` group\n at the end of all groups. The groups must be ordered based upon the sequential\n value of the `order` value. (ie. order 0 is first)\n\n If no `\"groups\"` options is set, a default grouping is used of third-party,\n parent directories and the current directory. (`\"bar\"`, `\"../baz\"`, `\"./foo\"`.)\n\n You may set the `\"named-imports-order\"` option to control the ordering of named\n imports (the `{A, B, C}` in `import {A, B, C} from \"foo\"`).\n\n Possible values for `\"named-imports-order\"` are:\n\n * `\"case-insensitive'`: Correct order is `{A, b, C}`. (This is the default.)\n * `\"lowercase-first\"`: Correct order is `{b, A, C}`.\n * `\"lowercase-last\"`: Correct order is `{A, C, b}`.\n * `\"any\"`: Allow any order.\n\n You may set the `\"module-source-path\"` option to control the ordering of imports based full path\n or just the module name\n\n Possible values for `\"module-source-path\"` are:\n\n * `\"full'`: Correct order is `\"./a/Foo\"`, `\"./b/baz\"`, `\"./c/Bar\"`. (This is the default.)\n * `\"basename\"`: Correct order is `\"./c/Bar\"`, `\"./b/baz\"`, `\"./a/Foo\"`.\n\n "], ["\n You may set the \\`\"import-sources-order\"\\` option to control the ordering of source\n imports (the \\`\"foo\"\\` in \\`import {A, B, C} from \"foo\"\\`).\n\n Possible values for \\`\"import-sources-order\"\\` are:\n\n * \\`\"case-insensitive'\\`: Correct order is \\`\"Bar\"\\`, \\`\"baz\"\\`, \\`\"Foo\"\\`. (This is the default.)\n * \\`\"lowercase-first\"\\`: Correct order is \\`\"baz\"\\`, \\`\"Bar\"\\`, \\`\"Foo\"\\`.\n * \\`\"lowercase-last\"\\`: Correct order is \\`\"Bar\"\\`, \\`\"Foo\"\\`, \\`\"baz\"\\`.\n * \\`\"any\"\\`: Allow any order.\n\n You may set the \\`\"grouped-imports\"\\` option to control the grouping of source\n imports (the \\`\"foo\"\\` in \\`import {A, B, C} from \"foo\"\\`). The grouping used\n is controlled by the \\`\"groups\"\\` option.\n\n Possible values for \\`\"grouped-imports\"\\` are:\n\n * \\`false\\`: Do not enforce grouping. (This is the default.)\n * \\`true\\`: Group source imports using default grouping or groups setting.\n\n The value of \\`\"groups\"\\` is a list of group rules of the form:\n\n [{\n \"name\": \"optional rule name\",\n \"match\": \"regex string\",\n \"order\": 10\n }, {\n \"name\": \"pkga imports\",\n \"match\": \"^@pkga\",\n \"order\": 20\n }]\n\n there is also a simplified form where you only pass a list of patterns and\n the order is given by the position in the list\n\n [\"^@pkga\", \"^\\\\.\\\\.\"]\n\n The first rule in the list to match a given import is the group that is used.\n If no rule in matched then the import will be put in an \\`unmatched\\` group\n at the end of all groups. The groups must be ordered based upon the sequential\n value of the \\`order\\` value. (ie. order 0 is first)\n\n If no \\`\"groups\"\\` options is set, a default grouping is used of third-party,\n parent directories and the current directory. (\\`\"bar\"\\`, \\`\"../baz\"\\`, \\`\"./foo\"\\`.)\n\n You may set the \\`\"named-imports-order\"\\` option to control the ordering of named\n imports (the \\`{A, B, C}\\` in \\`import {A, B, C} from \"foo\"\\`).\n\n Possible values for \\`\"named-imports-order\"\\` are:\n\n * \\`\"case-insensitive'\\`: Correct order is \\`{A, b, C}\\`. (This is the default.)\n * \\`\"lowercase-first\"\\`: Correct order is \\`{b, A, C}\\`.\n * \\`\"lowercase-last\"\\`: Correct order is \\`{A, C, b}\\`.\n * \\`\"any\"\\`: Allow any order.\n\n You may set the \\`\"module-source-path\"\\` option to control the ordering of imports based full path\n or just the module name\n\n Possible values for \\`\"module-source-path\"\\` are:\n\n * \\`\"full'\\`: Correct order is \\`\"./a/Foo\"\\`, \\`\"./b/baz\"\\`, \\`\"./c/Bar\"\\`. (This is the default.)\n * \\`\"basename\"\\`: Correct order is \\`\"./c/Bar\"\\`, \\`\"./b/baz\"\\`, \\`\"./a/Foo\"\\`.\n\n "]))), | ||
optionsDescription: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n You may set the `\"import-sources-order\"` option to control the ordering of source\n imports (the `\"foo\"` in `import {A, B, C} from \"foo\"`).\n\n Possible values for `\"import-sources-order\"` are:\n\n * `\"case-insensitive'`: Correct order is `\"Bar\"`, `\"baz\"`, `\"Foo\"`. (This is the default.)\n * `\"case-insensitive-legacy'`: Correct order is `\"Bar\"`, `\"baz\"`, `\"Foo\"`.\n * `\"lowercase-first\"`: Correct order is `\"baz\"`, `\"Bar\"`, `\"Foo\"`.\n * `\"lowercase-last\"`: Correct order is `\"Bar\"`, `\"Foo\"`, `\"baz\"`.\n * `\"any\"`: Allow any order.\n\n You may set the `\"grouped-imports\"` option to control the grouping of source\n imports (the `\"foo\"` in `import {A, B, C} from \"foo\"`). The grouping used\n is controlled by the `\"groups\"` option.\n\n Possible values for `\"grouped-imports\"` are:\n\n * `false`: Do not enforce grouping. (This is the default.)\n * `true`: Group source imports using default grouping or groups setting.\n\n The value of `\"groups\"` is a list of group rules of the form:\n\n [{\n \"name\": \"optional rule name\",\n \"match\": \"regex string\",\n \"order\": 10\n }, {\n \"name\": \"pkga imports\",\n \"match\": \"^@pkga\",\n \"order\": 20\n }]\n\n there is also a simplified form where you only pass a list of patterns and\n the order is given by the position in the list\n\n [\"^@pkga\", \"^\\.\\.\"]\n\n The first rule in the list to match a given import is the group that is used.\n If no rule in matched then the import will be put in an `unmatched` group\n at the end of all groups. The groups must be ordered based upon the sequential\n value of the `order` value. (ie. order 0 is first)\n\n If no `\"groups\"` options is set, a default grouping is used of third-party,\n parent directories and the current directory. (`\"bar\"`, `\"../baz\"`, `\"./foo\"`.)\n\n You may set the `\"named-imports-order\"` option to control the ordering of named\n imports (the `{A, B, C}` in `import {A, B, C} from \"foo\"`).\n\n Possible values for `\"named-imports-order\"` are:\n\n * `\"case-insensitive'`: Correct order is `{A, b, C}`. (This is the default.)\n * `\"case-insensitive-legacy'`: Correct order is `\"Bar\"`, `\"baz\"`, `\"Foo\"`.\n * `\"lowercase-first\"`: Correct order is `{b, A, C}`.\n * `\"lowercase-last\"`: Correct order is `{A, C, b}`.\n * `\"any\"`: Allow any order.\n\n You may set the `\"module-source-path\"` option to control the ordering of imports based full path\n or just the module name\n\n Possible values for `\"module-source-path\"` are:\n\n * `\"full'`: Correct order is `\"./a/Foo\"`, `\"./b/baz\"`, `\"./c/Bar\"`. (This is the default.)\n * `\"basename\"`: Correct order is `\"./c/Bar\"`, `\"./b/baz\"`, `\"./a/Foo\"`.\n\n "], ["\n You may set the \\`\"import-sources-order\"\\` option to control the ordering of source\n imports (the \\`\"foo\"\\` in \\`import {A, B, C} from \"foo\"\\`).\n\n Possible values for \\`\"import-sources-order\"\\` are:\n\n * \\`\"case-insensitive'\\`: Correct order is \\`\"Bar\"\\`, \\`\"baz\"\\`, \\`\"Foo\"\\`. (This is the default.)\n * \\`\"case-insensitive-legacy'\\`: Correct order is \\`\"Bar\"\\`, \\`\"baz\"\\`, \\`\"Foo\"\\`.\n * \\`\"lowercase-first\"\\`: Correct order is \\`\"baz\"\\`, \\`\"Bar\"\\`, \\`\"Foo\"\\`.\n * \\`\"lowercase-last\"\\`: Correct order is \\`\"Bar\"\\`, \\`\"Foo\"\\`, \\`\"baz\"\\`.\n * \\`\"any\"\\`: Allow any order.\n\n You may set the \\`\"grouped-imports\"\\` option to control the grouping of source\n imports (the \\`\"foo\"\\` in \\`import {A, B, C} from \"foo\"\\`). The grouping used\n is controlled by the \\`\"groups\"\\` option.\n\n Possible values for \\`\"grouped-imports\"\\` are:\n\n * \\`false\\`: Do not enforce grouping. (This is the default.)\n * \\`true\\`: Group source imports using default grouping or groups setting.\n\n The value of \\`\"groups\"\\` is a list of group rules of the form:\n\n [{\n \"name\": \"optional rule name\",\n \"match\": \"regex string\",\n \"order\": 10\n }, {\n \"name\": \"pkga imports\",\n \"match\": \"^@pkga\",\n \"order\": 20\n }]\n\n there is also a simplified form where you only pass a list of patterns and\n the order is given by the position in the list\n\n [\"^@pkga\", \"^\\\\.\\\\.\"]\n\n The first rule in the list to match a given import is the group that is used.\n If no rule in matched then the import will be put in an \\`unmatched\\` group\n at the end of all groups. The groups must be ordered based upon the sequential\n value of the \\`order\\` value. (ie. order 0 is first)\n\n If no \\`\"groups\"\\` options is set, a default grouping is used of third-party,\n parent directories and the current directory. (\\`\"bar\"\\`, \\`\"../baz\"\\`, \\`\"./foo\"\\`.)\n\n You may set the \\`\"named-imports-order\"\\` option to control the ordering of named\n imports (the \\`{A, B, C}\\` in \\`import {A, B, C} from \"foo\"\\`).\n\n Possible values for \\`\"named-imports-order\"\\` are:\n\n * \\`\"case-insensitive'\\`: Correct order is \\`{A, b, C}\\`. (This is the default.)\n * \\`\"case-insensitive-legacy'\\`: Correct order is \\`\"Bar\"\\`, \\`\"baz\"\\`, \\`\"Foo\"\\`.\n * \\`\"lowercase-first\"\\`: Correct order is \\`{b, A, C}\\`.\n * \\`\"lowercase-last\"\\`: Correct order is \\`{A, C, b}\\`.\n * \\`\"any\"\\`: Allow any order.\n\n You may set the \\`\"module-source-path\"\\` option to control the ordering of imports based full path\n or just the module name\n\n Possible values for \\`\"module-source-path\"\\` are:\n\n * \\`\"full'\\`: Correct order is \\`\"./a/Foo\"\\`, \\`\"./b/baz\"\\`, \\`\"./c/Bar\"\\`. (This is the default.)\n * \\`\"basename\"\\`: Correct order is \\`\"./c/Bar\"\\`, \\`\"./b/baz\"\\`, \\`\"./a/Foo\"\\`.\n\n "]))), | ||
options: { | ||
@@ -66,7 +66,19 @@ type: "object", | ||
type: "string", | ||
enum: ["case-insensitive", "lowercase-first", "lowercase-last", "any"], | ||
enum: [ | ||
"case-insensitive", | ||
"case-insensitive-legacy", | ||
"lowercase-first", | ||
"lowercase-last", | ||
"any", | ||
], | ||
}, | ||
"named-imports-order": { | ||
type: "string", | ||
enum: ["case-insensitive", "lowercase-first", "lowercase-last", "any"], | ||
enum: [ | ||
"case-insensitive", | ||
"case-insensitive-legacy", | ||
"lowercase-first", | ||
"lowercase-last", | ||
"any", | ||
], | ||
}, | ||
@@ -102,3 +114,4 @@ "module-source-path": { | ||
["any", function () { return ""; }], | ||
["case-insensitive", function (x) { return x.toLowerCase(); }], | ||
["case-insensitive", function (x) { return x.toUpperCase(); }], | ||
["case-insensitive-legacy", function (x) { return x.toLowerCase(); }], | ||
["lowercase-first", flipCase], | ||
@@ -295,3 +308,3 @@ ["lowercase-last", function (x) { return x; }], | ||
var addFailingImportDecl = function (decl) { | ||
var groupsMsg = _this.options.groups.slice().sort(function (a, b) { return a.order - b.order; }) | ||
var groupsMsg = tslib_1.__spreadArrays(_this.options.groups).sort(function (a, b) { return a.order - b.order; }) | ||
.map(function (g) { return g.name; }) | ||
@@ -298,0 +311,0 @@ .join(", "); |
@@ -241,3 +241,3 @@ "use strict"; | ||
}); | ||
return Array.from(this.privateModifiableMembers.values()).concat(Array.from(this.privateModifiableStatics.values())); | ||
return tslib_1.__spreadArrays(Array.from(this.privateModifiableMembers.values()), Array.from(this.privateModifiableStatics.values())); | ||
}; | ||
@@ -244,0 +244,0 @@ return ClassScope; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var utils = require("tsutils"); | ||
@@ -80,2 +80,6 @@ var ts = require("typescript"); | ||
var casesSeen = 0; | ||
var elseStatement = node.elseStatement; | ||
if (elseStatement === undefined) { | ||
return false; | ||
} | ||
var couldBeSwitch = everyCase(node, function (expr) { | ||
@@ -82,0 +86,0 @@ casesSeen++; |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a; | ||
var tsutils = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -65,3 +65,3 @@ "use strict"; | ||
} | ||
var returnKindFromType = getReturnKindFromFunction(functionReturningFrom, checker); | ||
var returnKindFromType = getReturnKindFromFunction(functionReturningFrom); | ||
if (returnKindFromType !== undefined && returnKindFromType !== actualReturnKind) { | ||
@@ -73,2 +73,60 @@ ctx.addFailureAtNode(node, returnKindFromType === "void" /* Void */ | ||
} | ||
function getReturnKindFromFunction(node) { | ||
switch (node.kind) { | ||
case ts.SyntaxKind.Constructor: | ||
case ts.SyntaxKind.SetAccessor: | ||
return "void" /* Void */; | ||
case ts.SyntaxKind.GetAccessor: | ||
return "value" /* Value */; | ||
} | ||
// Handle generator functions/methods: | ||
if (node.asteriskToken !== undefined) { | ||
return "void" /* Void */; | ||
} | ||
var contextual = isFunctionExpressionLike(node) && node.type === undefined | ||
? tryGetReturnType(checker.getContextualType(node), checker) | ||
: undefined; | ||
var returnType = contextual !== undefined | ||
? contextual | ||
: tryGetReturnType(checker.getTypeAtLocation(node), checker); | ||
if (returnType === undefined || tsutils_1.isTypeFlagSet(returnType, ts.TypeFlags.Any)) { | ||
return undefined; | ||
} | ||
var effectivelyVoidChecker = tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.AsyncKeyword) | ||
? isEffectivelyVoidPromise | ||
: isEffectivelyVoid; | ||
if (effectivelyVoidChecker(returnType)) { | ||
return "void" /* Void */; | ||
} | ||
return "value" /* Value */; | ||
} | ||
/** True for `void`, `undefined`, Promise<void>, or `void | undefined | Promise<void>`. */ | ||
function isEffectivelyVoidPromise(type) { | ||
// Would need access to `checker.getPromisedTypeOfPromise` to do this properly. | ||
// Assume that the return type is the global Promise (since this is an async function) and get its type argument. | ||
if ( | ||
// tslint:disable-next-line:no-bitwise | ||
tsutils_1.isTypeFlagSet(type, ts.TypeFlags.Void | ts.TypeFlags.Undefined) || | ||
(tsutils_1.isUnionType(type) && type.types.every(isEffectivelyVoidPromise))) { | ||
return true; | ||
} | ||
var typeArguments = getTypeArgumentsOfType(type); | ||
return (typeArguments !== undefined && | ||
typeArguments.length === 1 && | ||
isEffectivelyVoidPromise(typeArguments[0])); | ||
} | ||
function getTypeArgumentsOfType(type) { | ||
if (!tsutils_1.isTypeReference(type)) { | ||
return undefined; | ||
} | ||
// tslint:disable:no-unsafe-any | ||
// Fixes for https://github.com/palantir/tslint/issues/4863 | ||
// type.typeArguments was replaced with checker.getTypeArguments: | ||
// https://github.com/microsoft/TypeScript/commit/250d5a8229e17342f36fe52545bb68140db96a2e | ||
if (checker.getTypeArguments) { | ||
return checker.getTypeArguments(type); | ||
} | ||
return type.typeArguments; | ||
// tslint:enable:no-unsafe-any | ||
} | ||
} | ||
@@ -86,44 +144,2 @@ function getReturnKindFromReturnStatement(node) { | ||
} | ||
function getReturnKindFromFunction(node, checker) { | ||
switch (node.kind) { | ||
case ts.SyntaxKind.Constructor: | ||
case ts.SyntaxKind.SetAccessor: | ||
return "void" /* Void */; | ||
case ts.SyntaxKind.GetAccessor: | ||
return "value" /* Value */; | ||
} | ||
// Handle generator functions/methods: | ||
if (node.asteriskToken !== undefined) { | ||
return "void" /* Void */; | ||
} | ||
var contextual = isFunctionExpressionLike(node) && node.type === undefined | ||
? tryGetReturnType(checker.getContextualType(node), checker) | ||
: undefined; | ||
var returnType = contextual !== undefined | ||
? contextual | ||
: tryGetReturnType(checker.getTypeAtLocation(node), checker); | ||
if (returnType === undefined || tsutils_1.isTypeFlagSet(returnType, ts.TypeFlags.Any)) { | ||
return undefined; | ||
} | ||
var effectivelyVoidChecker = tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.AsyncKeyword) | ||
? isEffectivelyVoidPromise | ||
: isEffectivelyVoid; | ||
if (effectivelyVoidChecker(returnType)) { | ||
return "void" /* Void */; | ||
} | ||
return "value" /* Value */; | ||
} | ||
/** True for `void`, `undefined`, Promise<void>, or `void | undefined | Promise<void>`. */ | ||
function isEffectivelyVoidPromise(type) { | ||
// Would need access to `checker.getPromisedTypeOfPromise` to do this properly. | ||
// Assume that the return type is the global Promise (since this is an async function) and get its type argument. | ||
return ( | ||
// tslint:disable-next-line:no-bitwise | ||
tsutils_1.isTypeFlagSet(type, ts.TypeFlags.Void | ts.TypeFlags.Undefined) || | ||
(tsutils_1.isUnionType(type) && type.types.every(isEffectivelyVoidPromise)) || | ||
(tsutils_1.isTypeReference(type) && | ||
type.typeArguments !== undefined && | ||
type.typeArguments.length === 1 && | ||
isEffectivelyVoidPromise(type.typeArguments[0]))); | ||
} | ||
/** True for `void`, `undefined`, or `void | undefined`. */ | ||
@@ -130,0 +146,0 @@ function isEffectivelyVoid(type) { |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b, _c; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b, _c; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -42,3 +42,3 @@ "use strict"; | ||
function normalize(value) { | ||
return typeof value === "string" ? fillOptions(value) : tslib_1.__assign({}, defaultOptions, value); | ||
return typeof value === "string" ? fillOptions(value) : tslib_1.__assign(tslib_1.__assign({}, defaultOptions), value); | ||
} | ||
@@ -45,0 +45,0 @@ /* tslint:disable:object-literal-sort-keys */ |
@@ -127,3 +127,3 @@ "use strict"; | ||
var parent = _a.parent, parameters = _a.parameters, type = _a.type; | ||
if (parent.kind !== ts.SyntaxKind.CallExpression && !isTypedPropertyDeclaration(parent)) { | ||
if (!isTypedPropertyDeclaration(parent)) { | ||
this.checkTypeAnnotation("arrow-call-signature", parameters, type); | ||
@@ -130,0 +130,0 @@ } |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
@@ -18,5 +18,5 @@ "use strict"; | ||
*/ | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
var tsutils_1 = require("tsutils"); | ||
@@ -23,0 +23,0 @@ var ts = require("typescript"); |
"use strict"; | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var _a, _b; | ||
/** | ||
@@ -6,0 +6,0 @@ * @license |
@@ -146,3 +146,3 @@ "use strict"; | ||
? configFile.linterOptions.format | ||
: "prose"; | ||
: "stylish"; | ||
} | ||
@@ -149,0 +149,0 @@ linter = new linter_1.Linter({ |
@@ -99,4 +99,4 @@ "use strict"; | ||
type: "string", | ||
describe: "output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist, codeFrame)", | ||
description: utils_1.dedent(templateObject_8 || (templateObject_8 = tslib_1.__makeTemplateObject(["\n The formatter to use to format the results of the linter before\n outputting it to stdout or the file passed in --out. The core\n formatters are prose (human readable), json (machine readable)\n and verbose. prose is the default if this option is not used.\n Other built-in options include pmd, msbuild, checkstyle, and vso.\n Additional formatters can be added and used if the --formatters-dir\n option is set."], ["\n The formatter to use to format the results of the linter before\n outputting it to stdout or the file passed in --out. The core\n formatters are prose (human readable), json (machine readable)\n and verbose. prose is the default if this option is not used.\n Other built-in options include pmd, msbuild, checkstyle, and vso.\n Additional formatters can be added and used if the --formatters-dir\n option is set."]))), | ||
describe: "output format (json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist, codeFrame)", | ||
description: utils_1.dedent(templateObject_8 || (templateObject_8 = tslib_1.__makeTemplateObject(["\n The formatter to use to format the results of the linter before\n outputting it to stdout or the file passed in --out. The core\n formatters are stylish (colored and human readable), json (machine\n readable), and verbose (human readable).\n stylish is the default if this option is not used.\n Other built-in options include pmd, prose, msbuild, checkstyle, and vso.\n Additional formatters can be added and used if the --formatters-dir\n option is set."], ["\n The formatter to use to format the results of the linter before\n outputting it to stdout or the file passed in --out. The core\n formatters are stylish (colored and human readable), json (machine\n readable), and verbose (human readable).\n stylish is the default if this option is not used.\n Other built-in options include pmd, prose, msbuild, checkstyle, and vso.\n Additional formatters can be added and used if the --formatters-dir\n option is set."]))), | ||
}, | ||
@@ -103,0 +103,0 @@ { |
@@ -19,2 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var semver = require("semver"); | ||
@@ -182,3 +183,3 @@ var ts = require("typescript"); | ||
if (formatArgs !== undefined) { | ||
message = util_1.format.apply(void 0, [template].concat(formatArgs)); | ||
message = util_1.format.apply(void 0, tslib_1.__spreadArrays([template], formatArgs)); | ||
} | ||
@@ -244,5 +245,5 @@ } | ||
} | ||
return utils_1.flatMap(codeText, function (line, i) { return [ | ||
return utils_1.flatMap(codeText, function (line, i) { return tslib_1.__spreadArrays([ | ||
line | ||
].concat(utils_1.mapDefined(errorLinesForCodeText[i], function (err) { return lines_1.printLine(fileName, err, line); })); }).join("\n"); | ||
], utils_1.mapDefined(errorLinesForCodeText[i], function (err) { return lines_1.printLine(fileName, err, line); })); }).join("\n"); | ||
} | ||
@@ -249,0 +250,0 @@ exports.createMarkupFromErrors = createMarkupFromErrors; |
{ | ||
"name": "tslint", | ||
"version": "5.20.0", | ||
"version": "6.0.0-beta0", | ||
"description": "An extensible static analysis linter for the TypeScript language", | ||
@@ -43,3 +43,3 @@ "bin": { | ||
"semver": "^5.3.0", | ||
"tslib": "^1.8.0", | ||
"tslib": "^1.10.0", | ||
"tsutils": "^2.29.0" | ||
@@ -77,3 +77,3 @@ }, | ||
"tslint-test-config-non-relative": "file:test/external/tslint-test-config-non-relative", | ||
"typescript": "~3.4.0", | ||
"typescript": "~3.6.3", | ||
"yarn-deduplicate": "^1.1.1" | ||
@@ -80,0 +80,0 @@ }, |
@@ -1,3 +0,3 @@ | ||
[![NPM version](https://badge.fury.io/js/tslint.svg)](http://badge.fury.io/js/tslint) | ||
[![Downloads](http://img.shields.io/npm/dm/tslint.svg)](https://npmjs.org/package/tslint) | ||
[![NPM version](https://badge.fury.io/js/tslint.svg)](https://badge.fury.io/js/tslint) | ||
[![Downloads](https://img.shields.io/npm/dm/tslint.svg)](https://npmjs.org/package/tslint) | ||
[![Dependency Status](https://david-dm.org/palantir/tslint.svg)](https://david-dm.org/palantir/tslint) | ||
@@ -4,0 +4,0 @@ [![devDependency Status](https://david-dm.org/palantir/tslint/dev-status.svg)](https://david-dm.org/palantir/tslint/?type=dev) |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1881146
499
37233
1
Updatedtslib@^1.10.0