diff options
Diffstat (limited to 'node_modules/tslint/lib/formatters')
26 files changed, 0 insertions, 1124 deletions
diff --git a/node_modules/tslint/lib/formatters/checkstyleFormatter.d.ts b/node_modules/tslint/lib/formatters/checkstyleFormatter.d.ts deleted file mode 100644 index c47404485..000000000 --- a/node_modules/tslint/lib/formatters/checkstyleFormatter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; - private escapeXml; -} diff --git a/node_modules/tslint/lib/formatters/checkstyleFormatter.js b/node_modules/tslint/lib/formatters/checkstyleFormatter.js deleted file mode 100644 index ae9c0eb84..000000000 --- a/node_modules/tslint/lib/formatters/checkstyleFormatter.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var output = '<?xml version="1.0" encoding="utf-8"?><checkstyle version="4.3">'; - if (failures.length !== 0) { - var failuresSorted = failures.sort(function (a, b) { return a.getFileName().localeCompare(b.getFileName()); }); - var previousFilename = null; - for (var _i = 0, failuresSorted_1 = failuresSorted; _i < failuresSorted_1.length; _i++) { - var failure = failuresSorted_1[_i]; - var severity = failure.getRuleSeverity(); - if (failure.getFileName() !== previousFilename) { - if (previousFilename !== null) { - output += "</file>"; - } - previousFilename = failure.getFileName(); - output += "<file name=\"" + this.escapeXml(failure.getFileName()) + "\">"; - } - output += "<error line=\"" + (failure.getStartPosition().getLineAndCharacter().line + 1) + "\" "; - output += "column=\"" + (failure.getStartPosition().getLineAndCharacter().character + 1) + "\" "; - output += "severity=\"" + severity + "\" "; - output += "message=\"" + this.escapeXml(failure.getFailure()) + "\" "; - // checkstyle parser wants "source" to have structure like <anything>dot<category>dot<type> - output += "source=\"failure.tslint." + this.escapeXml(failure.getRuleName()) + "\" />"; - } - if (previousFilename !== null) { - output += "</file>"; - } - } - output += "</checkstyle>"; - return output; - }; - Formatter.prototype.escapeXml = function (str) { - return str - .replace(/&/g, "&") - .replace(/</g, "<") - .replace(/>/g, ">") - .replace(/'/g, "'") - .replace(/"/g, """); - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "checkstyle", - description: "Formats errors as through they were Checkstyle output.", - descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Imitates the XMLLogger from Checkstyle 4.3. All failures have the 'warning' severity."], ["\n Imitates the XMLLogger from Checkstyle 4.3. All failures have the 'warning' severity."]))), - sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <checkstyle version=\"4.3\">\n <file name=\"myFile.ts\">\n <error line=\"1\" column=\"14\" severity=\"warning\" message=\"Missing semicolon\" source=\"failure.tslint.semicolon\" />\n </file>\n </checkstyle>"], ["\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <checkstyle version=\"4.3\">\n <file name=\"myFile.ts\">\n <error line=\"1\" column=\"14\" severity=\"warning\" message=\"Missing semicolon\" source=\"failure.tslint.semicolon\" />\n </file>\n </checkstyle>"]))), - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1, templateObject_2; diff --git a/node_modules/tslint/lib/formatters/codeFrameFormatter.d.ts b/node_modules/tslint/lib/formatters/codeFrameFormatter.d.ts deleted file mode 100644 index af3160a3f..000000000 --- a/node_modules/tslint/lib/formatters/codeFrameFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/codeFrameFormatter.js b/node_modules/tslint/lib/formatters/codeFrameFormatter.js deleted file mode 100644 index 906bdcde4..000000000 --- a/node_modules/tslint/lib/formatters/codeFrameFormatter.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var codeFrame = require("babel-code-frame"); -var chalk_1 = require("chalk"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - if (typeof failures[0] === "undefined") { - return "\n"; - } - failures = this.sortFailures(failures); - var outputLines = []; - var currentFile; - for (var _i = 0, failures_1 = failures; _i < failures_1.length; _i++) { - var failure = failures_1[_i]; - var fileName = failure.getFileName(); - // Output the name of each file once - if (currentFile !== fileName) { - outputLines.push(""); - outputLines.push(fileName); - currentFile = fileName; - } - var failureString = failure.getFailure(); - failureString = failure.getRuleSeverity() === "warning" ? chalk_1.default.yellow(failureString) : chalk_1.default.red(failureString); - // Rule - var ruleName = failure.getRuleName(); - ruleName = chalk_1.default.gray("(" + ruleName + ")"); - // Frame - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var frame = codeFrame(failure.getRawLines(), lineAndCharacter.line + 1, // babel-code-frame is 1 index - lineAndCharacter.character, { - forceColor: chalk_1.default.enabled, - highlightCode: true, - }); - // Ouput - outputLines.push(failureString + " " + ruleName); - outputLines.push(frame); - outputLines.push(""); - } - // Removes initial blank line - if (outputLines[0] === "") { - outputLines.shift(); - } - return outputLines.join("\n") + "\n"; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "codeFrame", - description: "Framed formatter which creates a frame of error code.", - descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Prints syntax highlighted code in a frame with a pointer to where\n exactly lint error is happening."], ["\n Prints syntax highlighted code in a frame with a pointer to where\n exactly lint error is happening."]))), - sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n src/components/Payment.tsx\n Parentheses are required around the parameters of an arrow function definition (arrow-parens)\n 21 | public componentDidMount() {\n 22 | this.input.focus();\n > 23 | loadStripe().then(Stripe => Stripe.pay());\n | ^\n 24 | }\n 25 |\n 26 | public render() {"], ["\n src/components/Payment.tsx\n Parentheses are required around the parameters of an arrow function definition (arrow-parens)\n 21 | public componentDidMount() {\n 22 | this.input.focus();\n > 23 | loadStripe().then(Stripe => Stripe.pay());\n | ^\n 24 | }\n 25 |\n 26 | public render() {"]))), - consumer: "human", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1, templateObject_2; diff --git a/node_modules/tslint/lib/formatters/fileslistFormatter.d.ts b/node_modules/tslint/lib/formatters/fileslistFormatter.d.ts deleted file mode 100644 index af3160a3f..000000000 --- a/node_modules/tslint/lib/formatters/fileslistFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/fileslistFormatter.js b/node_modules/tslint/lib/formatters/fileslistFormatter.js deleted file mode 100644 index 273edfdb0..000000000 --- a/node_modules/tslint/lib/formatters/fileslistFormatter.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - if (failures.length === 0) { - return ""; - } - var files = []; - var currentFile; - for (var _i = 0, failures_1 = failures; _i < failures_1.length; _i++) { - var failure = failures_1[_i]; - var fileName = failure.getFileName(); - if (fileName !== currentFile) { - files.push(fileName); - currentFile = fileName; - } - } - return files.join("\n") + "\n"; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "filesList", - description: "Lists files containing lint errors.", - sample: "directory/myFile.ts", - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; diff --git a/node_modules/tslint/lib/formatters/index.d.ts b/node_modules/tslint/lib/formatters/index.d.ts deleted file mode 100644 index ea60b24d6..000000000 --- a/node_modules/tslint/lib/formatters/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export { Formatter as JsonFormatter } from "./jsonFormatter"; -export { Formatter as PmdFormatter } from "./pmdFormatter"; -export { Formatter as ProseFormatter } from "./proseFormatter"; -export { Formatter as VerboseFormatter } from "./verboseFormatter"; -export { Formatter as StylishFormatter } from "./stylishFormatter"; -export { Formatter as FileslistFormatter } from "./fileslistFormatter"; -export { Formatter as CodeFrameFormatter } from "./codeFrameFormatter"; -export { Formatter as TapFormatter } from "./tapFormatter"; -export { Formatter as JUnitFormatter } from "./junitFormatter"; diff --git a/node_modules/tslint/lib/formatters/index.js b/node_modules/tslint/lib/formatters/index.js deleted file mode 100644 index fd46be3ad..000000000 --- a/node_modules/tslint/lib/formatters/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var jsonFormatter_1 = require("./jsonFormatter"); -exports.JsonFormatter = jsonFormatter_1.Formatter; -var pmdFormatter_1 = require("./pmdFormatter"); -exports.PmdFormatter = pmdFormatter_1.Formatter; -var proseFormatter_1 = require("./proseFormatter"); -exports.ProseFormatter = proseFormatter_1.Formatter; -var verboseFormatter_1 = require("./verboseFormatter"); -exports.VerboseFormatter = verboseFormatter_1.Formatter; -var stylishFormatter_1 = require("./stylishFormatter"); -exports.StylishFormatter = stylishFormatter_1.Formatter; -var fileslistFormatter_1 = require("./fileslistFormatter"); -exports.FileslistFormatter = fileslistFormatter_1.Formatter; -var codeFrameFormatter_1 = require("./codeFrameFormatter"); -exports.CodeFrameFormatter = codeFrameFormatter_1.Formatter; -var tapFormatter_1 = require("./tapFormatter"); -exports.TapFormatter = tapFormatter_1.Formatter; -var junitFormatter_1 = require("./junitFormatter"); -exports.JUnitFormatter = junitFormatter_1.Formatter; diff --git a/node_modules/tslint/lib/formatters/jsonFormatter.d.ts b/node_modules/tslint/lib/formatters/jsonFormatter.d.ts deleted file mode 100644 index af3160a3f..000000000 --- a/node_modules/tslint/lib/formatters/jsonFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/jsonFormatter.js b/node_modules/tslint/lib/formatters/jsonFormatter.js deleted file mode 100644 index 8959636fa..000000000 --- a/node_modules/tslint/lib/formatters/jsonFormatter.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var failuresJSON = failures.map(function (failure) { return failure.toJson(); }); - return JSON.stringify(failuresJSON); - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "json", - description: "Formats errors as simple JSON.", - sample: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n [\n {\n \"endPosition\": {\n \"character\": 13,\n \"line\": 0,\n \"position\": 13\n },\n \"failure\": \"Missing semicolon\",\n \"fix\": {\n \"innerStart\": 13,\n \"innerLength\": 0,\n \"innerText\": \";\"\n },\n \"name\": \"myFile.ts\",\n \"ruleName\": \"semicolon\",\n \"startPosition\": {\n \"character\": 13,\n \"line\": 0,\n \"position\": 13\n }\n }\n ]"], ["\n [\n {\n \"endPosition\": {\n \"character\": 13,\n \"line\": 0,\n \"position\": 13\n },\n \"failure\": \"Missing semicolon\",\n \"fix\": {\n \"innerStart\": 13,\n \"innerLength\": 0,\n \"innerText\": \";\"\n },\n \"name\": \"myFile.ts\",\n \"ruleName\": \"semicolon\",\n \"startPosition\": {\n \"character\": 13,\n \"line\": 0,\n \"position\": 13\n }\n }\n ]"]))), - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1; diff --git a/node_modules/tslint/lib/formatters/junitFormatter.d.ts b/node_modules/tslint/lib/formatters/junitFormatter.d.ts deleted file mode 100644 index c47404485..000000000 --- a/node_modules/tslint/lib/formatters/junitFormatter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; - private escapeXml; -} diff --git a/node_modules/tslint/lib/formatters/junitFormatter.js b/node_modules/tslint/lib/formatters/junitFormatter.js deleted file mode 100644 index 61b91a655..000000000 --- a/node_modules/tslint/lib/formatters/junitFormatter.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var output = '<?xml version="1.0" encoding="utf-8"?><testsuites package="tslint">'; - if (failures.length !== 0) { - var failuresSorted = failures.sort(function (a, b) { return a.getFileName().localeCompare(b.getFileName()); }); - var previousFilename = null; - for (var _i = 0, failuresSorted_1 = failuresSorted; _i < failuresSorted_1.length; _i++) { - var failure = failuresSorted_1[_i]; - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var message = this.escapeXml(failure.getFailure()); - var rule = this.escapeXml(failure.getRuleName()); - var severity = failure.getRuleSeverity(); - if (failure.getFileName() !== previousFilename) { - if (previousFilename !== null) { - output += "</testsuite>"; - } - previousFilename = failure.getFileName(); - output += "<testsuite name=\"" + this.escapeXml(failure.getFileName()) + "\">"; - } - output += "<testcase name=\"Line " + (lineAndCharacter.line + 1) + ", "; - output += "Column " + (lineAndCharacter.character + 1) + ": " + rule + "\">"; - output += "<failure type=\"" + severity + "\">" + message + "</failure>"; - output += "</testcase>"; - } - if (previousFilename !== null) { - output += "</testsuite>"; - } - } - output += "</testsuites>"; - return output; - }; - Formatter.prototype.escapeXml = function (str) { - return str - .replace(/&/g, "&") - .replace(/</g, "<") - .replace(/>/g, ">") - .replace(/'/g, "'") - .replace(/"/g, """); - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "junit", - description: "Formats errors as through they were JUnit output.", - descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Imitates the JUnit XML Output"], ["\n Imitates the JUnit XML Output"]))), - sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <testsuites package=\"tslint\">\n <testsuite name=\"myFile.ts\">\n <testcase name=\"Line 1, Column 14: semicolon\">\n <failure type=\"warning\">Missing semicolon</failure>\n </testcase>\n </testsuite>\n </testsuites>\n "], ["\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <testsuites package=\"tslint\">\n <testsuite name=\"myFile.ts\">\n <testcase name=\"Line 1, Column 14: semicolon\">\n <failure type=\"warning\">Missing semicolon</failure>\n </testcase>\n </testsuite>\n </testsuites>\n "]))), - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1, templateObject_2; diff --git a/node_modules/tslint/lib/formatters/msbuildFormatter.d.ts b/node_modules/tslint/lib/formatters/msbuildFormatter.d.ts deleted file mode 100644 index 6227c2b8c..000000000 --- a/node_modules/tslint/lib/formatters/msbuildFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/msbuildFormatter.js b/node_modules/tslint/lib/formatters/msbuildFormatter.js deleted file mode 100644 index 9edc2d9c6..000000000 --- a/node_modules/tslint/lib/formatters/msbuildFormatter.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var path = require("path"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var utils_1 = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var outputLines = failures.map(function (failure) { - var fileName = path.normalize(failure.getFileName()); - var failureString = failure.getFailure(); - var camelizedRule = utils_1.camelize(failure.getRuleName()); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionTuple = "(" + (lineAndCharacter.line + 1) + "," + (lineAndCharacter.character + 1) + ")"; - var severity = failure.getRuleSeverity(); - return "" + fileName + positionTuple + ": " + severity + " " + camelizedRule + ": " + failureString; - }); - return outputLines.join("\n") + "\n"; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "msbuild", - description: "Formats errors for consumption by msbuild.", - descriptionDetails: "The output is compatible with both msbuild and Visual Studio.", - sample: "myFile.ts(1,14): warning: Missing semicolon", - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; diff --git a/node_modules/tslint/lib/formatters/pmdFormatter.d.ts b/node_modules/tslint/lib/formatters/pmdFormatter.d.ts deleted file mode 100644 index af3160a3f..000000000 --- a/node_modules/tslint/lib/formatters/pmdFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/pmdFormatter.js b/node_modules/tslint/lib/formatters/pmdFormatter.js deleted file mode 100644 index a8aac2d6e..000000000 --- a/node_modules/tslint/lib/formatters/pmdFormatter.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var output = "<pmd version=\"tslint\">"; - for (var _i = 0, failures_1 = failures; _i < failures_1.length; _i++) { - var failure = failures_1[_i]; - var failureString = failure.getFailure() - .replace(/&/g, "&") - .replace(/</g, "<") - .replace(/>/g, ">") - .replace(/'/g, "'") - .replace(/"/g, """); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var priority = failure.getRuleSeverity() === "warning" ? 4 : 3; - output += "<file name=\"" + failure.getFileName(); - output += "\"><violation begincolumn=\"" + (lineAndCharacter.character + 1); - output += "\" beginline=\"" + (lineAndCharacter.line + 1); - output += "\" priority=\"" + priority + "\""; - output += " rule=\"" + failureString + "\"></violation></file>"; - } - output += "</pmd>"; - return output; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "pmd", - description: "Formats errors as through they were PMD output.", - descriptionDetails: "Imitates the XML output from PMD. All errors have a priority of 1.", - sample: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n <pmd version=\"tslint\">\n <file name=\"myFile.ts\">\n <violation begincolumn=\"14\" beginline=\"1\" priority=\"3\" rule=\"Missing semicolon\"></violation>\n </file>\n </pmd>"], ["\n <pmd version=\"tslint\">\n <file name=\"myFile.ts\">\n <violation begincolumn=\"14\" beginline=\"1\" priority=\"3\" rule=\"Missing semicolon\"></violation>\n </file>\n </pmd>"]))), - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1; diff --git a/node_modules/tslint/lib/formatters/proseFormatter.d.ts b/node_modules/tslint/lib/formatters/proseFormatter.d.ts deleted file mode 100644 index fce71e7e0..000000000 --- a/node_modules/tslint/lib/formatters/proseFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[], fixes?: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/proseFormatter.js b/node_modules/tslint/lib/formatters/proseFormatter.js deleted file mode 100644 index ca73001a3..000000000 --- a/node_modules/tslint/lib/formatters/proseFormatter.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures, fixes) { - if (failures.length === 0 && (fixes === undefined || fixes.length === 0)) { - return "\n"; - } - failures = this.sortFailures(failures); - var fixLines = []; - if (fixes !== undefined) { - var perFileFixes = new Map(); - for (var _i = 0, fixes_1 = fixes; _i < fixes_1.length; _i++) { - var fix = fixes_1[_i]; - var prevFixes = perFileFixes.get(fix.getFileName()); - perFileFixes.set(fix.getFileName(), (prevFixes !== undefined ? prevFixes : 0) + 1); - } - perFileFixes.forEach(function (fixCount, fixedFile) { - fixLines.push("Fixed " + fixCount + " error(s) in " + fixedFile); - }); - fixLines.push(""); // add a blank line between fixes and failures - } - var errorLines = failures.map(function (failure) { - var fileName = failure.getFileName(); - var failureString = failure.getFailure(); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionTuple = "[" + (lineAndCharacter.line + 1) + ", " + (lineAndCharacter.character + 1) + "]"; - return failure.getRuleSeverity().toUpperCase() + ": " + fileName + positionTuple + ": " + failureString; - }); - return fixLines.concat(errorLines).join("\n") + "\n"; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "prose", - description: "The default formatter which outputs simple human-readable messages.", - sample: "ERROR: myFile.ts[1, 14]: Missing semicolon", - consumer: "human", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; diff --git a/node_modules/tslint/lib/formatters/stylishFormatter.d.ts b/node_modules/tslint/lib/formatters/stylishFormatter.d.ts deleted file mode 100644 index 8d5789dca..000000000 --- a/node_modules/tslint/lib/formatters/stylishFormatter.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; - private mapToMessages; - private pad; - private getPositionMaxSize; - private getRuleMaxSize; -} diff --git a/node_modules/tslint/lib/formatters/stylishFormatter.js b/node_modules/tslint/lib/formatters/stylishFormatter.js deleted file mode 100644 index fa039922b..000000000 --- a/node_modules/tslint/lib/formatters/stylishFormatter.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var chalk_1 = require("chalk"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - failures = this.sortFailures(failures); - var outputLines = this.mapToMessages(failures); - // Removes initial blank line - if (outputLines[0] === "") { - outputLines.shift(); - } - return outputLines.join("\n") + "\n"; - }; - Formatter.prototype.mapToMessages = function (failures) { - if (failures.length === 0) { - return []; - } - var outputLines = []; - var positionMaxSize = this.getPositionMaxSize(failures); - var ruleMaxSize = this.getRuleMaxSize(failures); - var currentFile; - for (var _i = 0, failures_1 = failures; _i < failures_1.length; _i++) { - var failure = failures_1[_i]; - var fileName = failure.getFileName(); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionTuple = lineAndCharacter.line + 1 + ":" + (lineAndCharacter.character + 1); - // Output the name of each file once - if (currentFile !== fileName) { - outputLines.push(""); - outputLines.push("" + fileName + chalk_1.default.hidden(":" + positionTuple)); - currentFile = fileName; - } - var failureString = failure.getFailure(); - failureString = chalk_1.default.yellow(failureString); - // Rule - var ruleName = failure.getRuleName(); - ruleName = this.pad(ruleName, ruleMaxSize); - ruleName = chalk_1.default.grey(ruleName); - // Lines - positionTuple = this.pad(positionTuple, positionMaxSize); - positionTuple = failure.getRuleSeverity() === "warning" - ? chalk_1.default.blue(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple) - : chalk_1.default.red(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple); - // Output - var output = positionTuple + " " + ruleName + " " + failureString; - outputLines.push(output); - } - return outputLines; - }; - Formatter.prototype.pad = function (str, len) { - var padder = Array(len + 1).join(" "); - return (str + padder).substring(0, padder.length); - }; - Formatter.prototype.getPositionMaxSize = function (failures) { - var positionMaxSize = 0; - for (var _i = 0, failures_2 = failures; _i < failures_2.length; _i++) { - var failure = failures_2[_i]; - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionSize = (lineAndCharacter.line + 1 + ":" + (lineAndCharacter.character + 1)).length; - if (positionSize > positionMaxSize) { - positionMaxSize = positionSize; - } - } - return positionMaxSize; - }; - Formatter.prototype.getRuleMaxSize = function (failures) { - var ruleMaxSize = 0; - for (var _i = 0, failures_3 = failures; _i < failures_3.length; _i++) { - var failure = failures_3[_i]; - var ruleSize = failure.getRuleName().length; - if (ruleSize > ruleMaxSize) { - ruleMaxSize = ruleSize; - } - } - return ruleMaxSize; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "stylish", - description: "Human-readable formatter which creates stylish messages.", - descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."], ["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."]))), - sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n myFile.ts\n 1:14 semicolon Missing semicolon"], ["\n myFile.ts\n 1:14 semicolon Missing semicolon"]))), - consumer: "human", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1, templateObject_2; diff --git a/node_modules/tslint/lib/formatters/tapFormatter.d.ts b/node_modules/tslint/lib/formatters/tapFormatter.d.ts deleted file mode 100644 index f3b123e11..000000000 --- a/node_modules/tslint/lib/formatters/tapFormatter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright 2017 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; - private mapToMessages; -} diff --git a/node_modules/tslint/lib/formatters/tapFormatter.js b/node_modules/tslint/lib/formatters/tapFormatter.js deleted file mode 100644 index f834f75f9..000000000 --- a/node_modules/tslint/lib/formatters/tapFormatter.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2017 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var output = ["TAP version 13"]; - if (failures.length === 0) { - output = output.concat([ - "1..0 # SKIP No failures", - ]); - } - else { - output = output.concat(["1.." + failures.length]).concat(this.mapToMessages(failures)); - } - return output.join("\n") + "\n"; - }; - Formatter.prototype.mapToMessages = function (failures) { - return failures.map(function (failure, i) { - var fileName = failure.getFileName(); - var failureString = failure.getFailure(); - var ruleName = failure.getRuleName(); - var failureMessage = failure.getFailure(); - var failureSeverity = failure.getRuleSeverity(); - var failureRaw = failure.getRawLines(); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - return Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n not ok ", " - ", "\n ---\n message : ", "\n severity: ", "\n data:\n ruleName: ", "\n fileName: ", "\n line: ", "\n character: ", "\n failureString: ", "\n rawLines: ", "\n ..."], ["\n not ok ", " - ", "\n ---\n message : ", "\n severity: ", "\n data:\n ruleName: ", "\n fileName: ", "\n line: ", "\n character: ", "\n failureString: ", "\n rawLines: ", "\n ..."])), String(i + 1), failureMessage, failureMessage, failureSeverity, ruleName, fileName, String(lineAndCharacter.line), String(lineAndCharacter.character), failureString, failureRaw); - }); - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "tap", - description: "Formats output as TAP stream.", - descriptionDetails: "Provides error messages output in TAP13 format which can be consumed by any TAP formatter.", - sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n TAP version 13\n 1..1\n not ok 1 - Some error\n ---\n message: Variable has any type\n severity: error\n data:\n ruleName: no-any\n fileName: test-file.ts\n line: 10\n character: 10\n failureString: Some error\n rawLines: Some raw output\n ..."], ["\n TAP version 13\n 1..1\n not ok 1 - Some error\n ---\n message: Variable has any type\n severity: error\n data:\n ruleName: no-any\n fileName: test-file.ts\n line: 10\n character: 10\n failureString: Some error\n rawLines: Some raw output\n ..."]))), - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1, templateObject_2; diff --git a/node_modules/tslint/lib/formatters/verboseFormatter.d.ts b/node_modules/tslint/lib/formatters/verboseFormatter.d.ts deleted file mode 100644 index e1f97432d..000000000 --- a/node_modules/tslint/lib/formatters/verboseFormatter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; - private mapToMessages; -} diff --git a/node_modules/tslint/lib/formatters/verboseFormatter.js b/node_modules/tslint/lib/formatters/verboseFormatter.js deleted file mode 100644 index eeea7310b..000000000 --- a/node_modules/tslint/lib/formatters/verboseFormatter.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2013 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - failures = this.sortFailures(failures); - return this.mapToMessages(failures).join("\n") + "\n"; - }; - Formatter.prototype.mapToMessages = function (failures) { - return failures.map(function (failure) { - var fileName = failure.getFileName(); - var failureString = failure.getFailure(); - var ruleName = failure.getRuleName(); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionTuple = "[" + (lineAndCharacter.line + 1) + ", " + (lineAndCharacter.character + 1) + "]"; - return failure.getRuleSeverity().toUpperCase() + ": (" + ruleName + ") " + fileName + positionTuple + ": " + failureString; - }); - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "verbose", - 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", - sample: "ERROR: (semicolon) myFile.ts[1, 14]: Missing semicolon", - consumer: "human", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; diff --git a/node_modules/tslint/lib/formatters/vsoFormatter.d.ts b/node_modules/tslint/lib/formatters/vsoFormatter.d.ts deleted file mode 100644 index 6227c2b8c..000000000 --- a/node_modules/tslint/lib/formatters/vsoFormatter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AbstractFormatter } from "../language/formatter/abstractFormatter"; -import { IFormatterMetadata } from "../language/formatter/formatter"; -import { RuleFailure } from "../language/rule/rule"; -export declare class Formatter extends AbstractFormatter { - static metadata: IFormatterMetadata; - format(failures: RuleFailure[]): string; -} diff --git a/node_modules/tslint/lib/formatters/vsoFormatter.js b/node_modules/tslint/lib/formatters/vsoFormatter.js deleted file mode 100644 index 5ab0d3604..000000000 --- a/node_modules/tslint/lib/formatters/vsoFormatter.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2016 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var Utils = require("../utils"); -var Formatter = /** @class */ (function (_super) { - tslib_1.__extends(Formatter, _super); - function Formatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* tslint:enable:object-literal-sort-keys */ - Formatter.prototype.format = function (failures) { - var outputLines = failures.map(function (failure) { - var fileName = failure.getFileName(); - var failureString = failure.getFailure(); - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var line = lineAndCharacter.line + 1; - var character = lineAndCharacter.character + 1; - var code = failure.getRuleName(); - var properties = "sourcepath=" + fileName + ";linenumber=" + line + ";columnnumber=" + character + ";code=" + code + ";"; - return "##vso[task.logissue type=warning;" + properties + "]" + failureString; - }); - return outputLines.join("\n") + "\n"; - }; - /* tslint:disable:object-literal-sort-keys */ - Formatter.metadata = { - formatterName: "vso", - description: "Formats output as VSO/TFS logging commands.", - descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Integrates with Visual Studio Online and Team Foundation Server by outputting errors\n as 'warning' logging commands."], ["\n Integrates with Visual Studio Online and Team Foundation Server by outputting errors\n as 'warning' logging commands."]))), - sample: "##vso[task.logissue type=warning;sourcepath=myFile.ts;linenumber=1;columnnumber=14;code=semicolon;]Missing semicolon", - consumer: "machine", - }; - return Formatter; -}(abstractFormatter_1.AbstractFormatter)); -exports.Formatter = Formatter; -var templateObject_1; |