aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/completed-docs
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/tslint/lib/rules/completed-docs
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/completed-docs')
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/blockExclusion.d.ts26
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/blockExclusion.js42
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/classExclusion.d.ts30
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/classExclusion.js59
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusion.d.ts25
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusion.js33
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.d.ts28
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.js18
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusionFactory.d.ts25
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/exclusionFactory.js60
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/tagExclusion.d.ts34
-rw-r--r--node_modules/tslint/lib/rules/completed-docs/tagExclusion.js82
12 files changed, 0 insertions, 462 deletions
diff --git a/node_modules/tslint/lib/rules/completed-docs/blockExclusion.d.ts b/node_modules/tslint/lib/rules/completed-docs/blockExclusion.d.ts
deleted file mode 100644
index 57eea1745..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/blockExclusion.d.ts
+++ /dev/null
@@ -1,26 +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 * as ts from "typescript";
-import { Visibility } from "../completedDocsRule";
-import { Exclusion } from "./exclusion";
-export interface IBlockExclusionDescriptor {
- visibilities?: Visibility[];
-}
-export declare class BlockExclusion extends Exclusion<IBlockExclusionDescriptor> {
- readonly visibilities: Set<Visibility>;
- excludes(node: ts.Node): boolean;
-}
diff --git a/node_modules/tslint/lib/rules/completed-docs/blockExclusion.js b/node_modules/tslint/lib/rules/completed-docs/blockExclusion.js
deleted file mode 100644
index 99621fa18..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/blockExclusion.js
+++ /dev/null
@@ -1,42 +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 tsutils_1 = require("tsutils");
-var ts = require("typescript");
-var completedDocsRule_1 = require("../completedDocsRule");
-var exclusion_1 = require("./exclusion");
-var BlockExclusion = /** @class */ (function (_super) {
- tslib_1.__extends(BlockExclusion, _super);
- function BlockExclusion() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.visibilities = _this.createSet(_this.descriptor.visibilities);
- return _this;
- }
- BlockExclusion.prototype.excludes = function (node) {
- if (this.visibilities.has(completedDocsRule_1.ALL)) {
- return false;
- }
- if (tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.ExportKeyword)) {
- return !this.visibilities.has(completedDocsRule_1.VISIBILITY_EXPORTED);
- }
- return !this.visibilities.has(completedDocsRule_1.VISIBILITY_INTERNAL);
- };
- return BlockExclusion;
-}(exclusion_1.Exclusion));
-exports.BlockExclusion = BlockExclusion;
diff --git a/node_modules/tslint/lib/rules/completed-docs/classExclusion.d.ts b/node_modules/tslint/lib/rules/completed-docs/classExclusion.d.ts
deleted file mode 100644
index c2661a18d..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/classExclusion.d.ts
+++ /dev/null
@@ -1,30 +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 * as ts from "typescript";
-import { Location, Privacy } from "../completedDocsRule";
-import { Exclusion } from "./exclusion";
-export interface IClassExclusionDescriptor {
- locations?: Location[];
- privacies?: Privacy[];
-}
-export declare class ClassExclusion extends Exclusion<IClassExclusionDescriptor> {
- readonly locations: Set<Location>;
- readonly privacies: Set<Privacy>;
- excludes(node: ts.Node): boolean;
- private shouldLocationBeDocumented;
- private shouldPrivacyBeDocumented;
-}
diff --git a/node_modules/tslint/lib/rules/completed-docs/classExclusion.js b/node_modules/tslint/lib/rules/completed-docs/classExclusion.js
deleted file mode 100644
index 5fffc2e62..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/classExclusion.js
+++ /dev/null
@@ -1,59 +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 tsutils_1 = require("tsutils");
-var ts = require("typescript");
-var completedDocsRule_1 = require("../completedDocsRule");
-var exclusion_1 = require("./exclusion");
-var ClassExclusion = /** @class */ (function (_super) {
- tslib_1.__extends(ClassExclusion, _super);
- function ClassExclusion() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.locations = _this.createSet(_this.descriptor.locations);
- _this.privacies = _this.createSet(_this.descriptor.privacies);
- return _this;
- }
- ClassExclusion.prototype.excludes = function (node) {
- return !(this.shouldLocationBeDocumented(node)
- && this.shouldPrivacyBeDocumented(node));
- };
- ClassExclusion.prototype.shouldLocationBeDocumented = function (node) {
- if (this.locations.has(completedDocsRule_1.ALL)) {
- return true;
- }
- if (tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.StaticKeyword)) {
- return this.locations.has(completedDocsRule_1.LOCATION_STATIC);
- }
- return this.locations.has(completedDocsRule_1.LOCATION_INSTANCE);
- };
- ClassExclusion.prototype.shouldPrivacyBeDocumented = function (node) {
- if (this.privacies.has(completedDocsRule_1.ALL)) {
- return true;
- }
- if (tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.PrivateKeyword)) {
- return this.privacies.has(completedDocsRule_1.PRIVACY_PRIVATE);
- }
- if (tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.ProtectedKeyword)) {
- return this.privacies.has(completedDocsRule_1.PRIVACY_PROTECTED);
- }
- return this.privacies.has(completedDocsRule_1.PRIVACY_PUBLIC);
- };
- return ClassExclusion;
-}(exclusion_1.Exclusion));
-exports.ClassExclusion = ClassExclusion;
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusion.d.ts b/node_modules/tslint/lib/rules/completed-docs/exclusion.d.ts
deleted file mode 100644
index 49c905491..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusion.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.
- */
-import * as ts from "typescript";
-import { All } from "../completedDocsRule";
-import { ExclusionDescriptor } from "./exclusionDescriptors";
-export declare abstract class Exclusion<TDescriptor extends ExclusionDescriptor> {
- protected readonly descriptor: Partial<TDescriptor>;
- constructor(descriptor?: Partial<TDescriptor>);
- abstract excludes(node: ts.Node): boolean;
- protected createSet<T extends All | string>(values?: T[]): Set<T>;
-}
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusion.js b/node_modules/tslint/lib/rules/completed-docs/exclusion.js
deleted file mode 100644
index ff22207c6..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusion.js
+++ /dev/null
@@ -1,33 +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 completedDocsRule_1 = require("../completedDocsRule");
-var Exclusion = /** @class */ (function () {
- function Exclusion(descriptor) {
- if (descriptor === void 0) { descriptor = {}; }
- this.descriptor = descriptor;
- }
- Exclusion.prototype.createSet = function (values) {
- if (values === undefined || values.length === 0) {
- values = [completedDocsRule_1.ALL];
- }
- return new Set(values);
- };
- return Exclusion;
-}());
-exports.Exclusion = Exclusion;
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.d.ts b/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.d.ts
deleted file mode 100644
index 9fa377421..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.d.ts
+++ /dev/null
@@ -1,28 +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 { DocType } from "../completedDocsRule";
-import { IBlockExclusionDescriptor } from "./blockExclusion";
-import { IClassExclusionDescriptor } from "./classExclusion";
-import { ITagExclusionDescriptor } from "./tagExclusion";
-export declare type ExclusionDescriptor = IBlockExclusionDescriptor | IClassExclusionDescriptor | ITagExclusionDescriptor;
-export declare type InputExclusionDescriptor = boolean | ExclusionDescriptor;
-export interface IExclusionDescriptors {
- [type: string]: ExclusionDescriptor;
-}
-export declare type IInputExclusionDescriptors = DocType | {
- [type: string]: InputExclusionDescriptor;
-};
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.js b/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.js
deleted file mode 100644
index 1c258a5da..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusionDescriptors.js
+++ /dev/null
@@ -1,18 +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 });
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.d.ts b/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.d.ts
deleted file mode 100644
index 3148a1ee6..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.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.
- */
-import { DocType } from "../completedDocsRule";
-import { Exclusion } from "./exclusion";
-import { IInputExclusionDescriptors } from "./exclusionDescriptors";
-export declare type ExclusionsMap = Map<DocType, Array<Exclusion<any>>>;
-export declare class ExclusionFactory {
- constructExclusionsMap(ruleArguments: IInputExclusionDescriptors[]): ExclusionsMap;
- private addRequirements;
- private createRequirementsForDocType;
-}
diff --git a/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.js b/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.js
deleted file mode 100644
index 6b8f5f35a..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/exclusionFactory.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 utils_1 = require("../../utils");
-var blockExclusion_1 = require("./blockExclusion");
-var classExclusion_1 = require("./classExclusion");
-var tagExclusion_1 = require("./tagExclusion");
-var ExclusionFactory = /** @class */ (function () {
- function ExclusionFactory() {
- }
- ExclusionFactory.prototype.constructExclusionsMap = function (ruleArguments) {
- var exclusionsMap = new Map();
- for (var _i = 0, ruleArguments_1 = ruleArguments; _i < ruleArguments_1.length; _i++) {
- var ruleArgument = ruleArguments_1[_i];
- this.addRequirements(exclusionsMap, ruleArgument);
- }
- return exclusionsMap;
- };
- ExclusionFactory.prototype.addRequirements = function (exclusionsMap, descriptors) {
- if (typeof descriptors === "string") {
- exclusionsMap.set(descriptors, this.createRequirementsForDocType(descriptors, {}));
- return;
- }
- for (var docType in descriptors) {
- if (utils_1.hasOwnProperty(descriptors, docType)) {
- exclusionsMap.set(docType, this.createRequirementsForDocType(docType, descriptors[docType]));
- }
- }
- };
- ExclusionFactory.prototype.createRequirementsForDocType = function (docType, descriptor) {
- var requirements = [];
- if (docType === "methods" || docType === "properties") {
- requirements.push(new classExclusion_1.ClassExclusion(descriptor));
- }
- else {
- requirements.push(new blockExclusion_1.BlockExclusion(descriptor));
- }
- if (descriptor.tags !== undefined) {
- requirements.push(new tagExclusion_1.TagExclusion(descriptor));
- }
- return requirements;
- };
- return ExclusionFactory;
-}());
-exports.ExclusionFactory = ExclusionFactory;
diff --git a/node_modules/tslint/lib/rules/completed-docs/tagExclusion.d.ts b/node_modules/tslint/lib/rules/completed-docs/tagExclusion.d.ts
deleted file mode 100644
index 57fd0cf8d..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/tagExclusion.d.ts
+++ /dev/null
@@ -1,34 +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 * as ts from "typescript";
-import { Exclusion } from "./exclusion";
-export interface ITagExclusionDescriptor {
- tags?: {
- content: IContentTags;
- existence: string[];
- };
-}
-export interface IContentTags {
- [i: string]: string;
-}
-export declare class TagExclusion extends Exclusion<ITagExclusionDescriptor> {
- private readonly contentTags;
- private readonly existenceTags;
- excludes(node: ts.Node): boolean;
- private getDocumentationNode;
- private parseTagsWithContents;
-}
diff --git a/node_modules/tslint/lib/rules/completed-docs/tagExclusion.js b/node_modules/tslint/lib/rules/completed-docs/tagExclusion.js
deleted file mode 100644
index 78e9babe7..000000000
--- a/node_modules/tslint/lib/rules/completed-docs/tagExclusion.js
+++ /dev/null
@@ -1,82 +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 ts = require("typescript");
-var exclusion_1 = require("./exclusion");
-var TagExclusion = /** @class */ (function (_super) {
- tslib_1.__extends(TagExclusion, _super);
- function TagExclusion() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.contentTags = _this.descriptor.tags === undefined
- ? {}
- : _this.descriptor.tags.content;
- _this.existenceTags = new Set(_this.descriptor.tags !== undefined && _this.descriptor.tags.existence !== undefined
- ? _this.descriptor.tags.existence
- : undefined);
- return _this;
- }
- TagExclusion.prototype.excludes = function (node) {
- var documentationNode = this.getDocumentationNode(node);
- var tagsWithContents = this.parseTagsWithContents(documentationNode.getFullText());
- for (var _i = 0, tagsWithContents_1 = tagsWithContents; _i < tagsWithContents_1.length; _i++) {
- var tagWithContent = tagsWithContents_1[_i];
- if (this.existenceTags.has(tagWithContent[0])) {
- return true;
- }
- var matcherBody = this.contentTags[tagWithContent[0]];
- if (matcherBody === undefined) {
- continue;
- }
- if (new RegExp(matcherBody).test(tagWithContent[1])) {
- return true;
- }
- }
- return false;
- };
- TagExclusion.prototype.getDocumentationNode = function (node) {
- if (node.kind === ts.SyntaxKind.VariableDeclaration) {
- return node.parent;
- }
- return node;
- };
- TagExclusion.prototype.parseTagsWithContents = function (nodeText) {
- if (nodeText === undefined) {
- return [];
- }
- var docMatches = nodeText.match((/\/\*\*\s*\n([^\*]*(\*[^\/])?)*\*\//));
- if (docMatches === null || docMatches.length === 0) {
- return [];
- }
- var lines = docMatches[0].match(/[\r\n\s]*\*\s*@.*[\r\n\s]/g);
- if (lines === null) {
- return [];
- }
- return lines
- .map(function (line) {
- var body = line.substring(line.indexOf("@"));
- var firstSpaceIndex = body.search(/\s/);
- return [
- body.substring(1, firstSpaceIndex),
- body.substring(firstSpaceIndex).trim(),
- ];
- });
- };
- return TagExclusion;
-}(exclusion_1.Exclusion));
-exports.TagExclusion = TagExclusion;