diff --git a/.gitignore b/.gitignore index 66385e0bbbb..ec83b7c5002 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ typings/.basedir.ts *.swp docs/_data/rules.json +docs/rules/ diff --git a/docs/rules/adjacent-overload-signatures/index.html b/docs/rules/adjacent-overload-signatures/index.html deleted file mode 100644 index 3506700140c..00000000000 --- a/docs/rules/adjacent-overload-signatures/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: adjacent-overload-signatures -description: Enforces function overloads to be consecutive. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -rationale: Improves readability and organization by grouping naturally related items together. -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: adjacent-overload-signatures' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/align/index.html b/docs/rules/align/index.html deleted file mode 100644 index f42a1421e39..00000000000 --- a/docs/rules/align/index.html +++ /dev/null @@ -1,42 +0,0 @@ ---- -ruleName: align -description: Enforces vertical alignment. -rationale: 'Helps maintain a readable, consistent style in your codebase.' -optionsDescription: |- - - Three arguments may be optionally provided: - - * `"parameters"` checks alignment of function parameters. - * `"arguments"` checks alignment of function call arguments. - * `"statements"` checks alignment of statements. -options: - type: array - items: - type: string - enum: - - arguments - - parameters - - statements - minLength: 1 - maxLength: 3 -optionExamples: - - '[true, "parameters", "statements"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: align' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "arguments", - "parameters", - "statements" - ] - }, - "minLength": 1, - "maxLength": 3 - } ---- \ No newline at end of file diff --git a/docs/rules/array-type/index.html b/docs/rules/array-type/index.html deleted file mode 100644 index 029dfaa19a4..00000000000 --- a/docs/rules/array-type/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -ruleName: array-type -description: 'Requires using either ''T[]'' or ''Array'' for arrays.' -hasFix: true -optionsDescription: |- - - One of the following arguments must be provided: - - * `"array"` enforces use of `T[]` for all types T. - * `"generic"` enforces use of `Array` for all types T. - * `"array-simple"` enforces use of `T[]` if `T` is a simple type (primitive or type reference). -options: - type: string - enum: - - array - - generic - - array-simple -optionExamples: - - '[true, "array"]' - - '[true, "generic"]' - - '[true, "array-simple"]' -type: style -typescriptOnly: true -layout: rule -title: 'Rule: array-type' -optionsJSON: |- - { - "type": "string", - "enum": [ - "array", - "generic", - "array-simple" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/arrow-parens/index.html b/docs/rules/arrow-parens/index.html deleted file mode 100644 index d6bec9d8a20..00000000000 --- a/docs/rules/arrow-parens/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -ruleName: arrow-parens -description: Requires parentheses around the parameters of arrow function definitions. -hasFix: true -rationale: Maintains stylistic consistency with other arrow function definitions. -optionsDescription: |- - - If `ban-single-arg-parens` is specified, then arrow functions with one parameter - must not have parentheses if removing them is allowed by TypeScript. -options: - type: string - enum: - - ban-single-arg-parens -optionExamples: - - 'true' - - '[true, "ban-single-arg-parens"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: arrow-parens' -optionsJSON: |- - { - "type": "string", - "enum": [ - "ban-single-arg-parens" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/arrow-return-shorthand/index.html b/docs/rules/arrow-return-shorthand/index.html deleted file mode 100644 index 69ca43199ca..00000000000 --- a/docs/rules/arrow-return-shorthand/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -ruleName: arrow-return-shorthand -description: 'Suggests to convert `() => { return x; }` to `() => x`.' -hasFix: true -optionsDescription: |- - - If `multiline` is specified, then this will warn even if the function spans multiple lines. -options: - type: string - enum: - - multiline -optionExamples: - - '[true]' - - '[true, "multiline"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: arrow-return-shorthand' -optionsJSON: |- - { - "type": "string", - "enum": [ - "multiline" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/ban/index.html b/docs/rules/ban/index.html deleted file mode 100644 index 8d301eea4dc..00000000000 --- a/docs/rules/ban/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -ruleName: ban -description: Bans the use of specific functions or global methods. -optionsDescription: |- - - A list of `['object', 'method', 'optional explanation here']` or `['globalMethod']` which ban `object.method()` - or respectively `globalMethod()`. -options: - type: list - listType: - type: array - items: - type: string - minLength: 1 - maxLength: 3 -optionExamples: - - |- - [true, ["someGlobalMethod"], ["someObject", "someFunction"], - ["someObject", "otherFunction", "Optional explanation"]] -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: ban' -optionsJSON: |- - { - "type": "list", - "listType": { - "type": "array", - "items": { - "type": "string" - }, - "minLength": 1, - "maxLength": 3 - } - } ---- \ No newline at end of file diff --git a/docs/rules/callable-types/index.html b/docs/rules/callable-types/index.html deleted file mode 100644 index 4c65f626683..00000000000 --- a/docs/rules/callable-types/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -ruleName: callable-types -description: An interface or literal type with just a call signature can be written as a function type. -rationale: style -optionsDescription: Not configurable. -options: null -type: style -typescriptOnly: true -layout: rule -title: 'Rule: callable-types' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/class-name/index.html b/docs/rules/class-name/index.html deleted file mode 100644 index 0ae19d6e8be..00000000000 --- a/docs/rules/class-name/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: class-name -description: Enforces PascalCased class and interface names. -rationale: Makes it easy to differentitate classes from regular variables at a glance. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: class-name' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/comment-format/index.html b/docs/rules/comment-format/index.html deleted file mode 100644 index 65450916bb9..00000000000 --- a/docs/rules/comment-format/index.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -ruleName: comment-format -description: Enforces formatting rules for single-line comments. -rationale: 'Helps maintain a consistent, readable style in your codebase.' -optionsDescription: | - - Three arguments may be optionally provided: - - * `"check-space"` requires that all single-line comments must begin with a space, as in `// comment` - * note that comments starting with `///` are also allowed, for things such as `///` - * `"check-lowercase"` requires that the first non-whitespace character of a comment must be lowercase, if applicable. - * `"check-uppercase"` requires that the first non-whitespace character of a comment must be uppercase, if applicable. - - Exceptions to `"check-lowercase"` or `"check-uppercase"` can be managed with object that may be passed as last argument. - - One of two options can be provided in this object: - - * `"ignoreWords"` - array of strings - words that will be ignored at the beginning of the comment. - * `"ignorePattern"` - string - RegExp pattern that will be ignored at the beginning of the comment. -options: - type: array - items: - anyOf: - - type: string - enum: - - check-space - - check-lowercase - - check-uppercase - - type: object - properties: - ignoreWords: - type: array - items: - type: string - ignorePattern: - type: string - minProperties: 1 - maxProperties: 1 - minLength: 1 - maxLength: 4 -optionExamples: - - '[true, "check-space", "check-uppercase"]' - - '[true, "check-lowercase", {"ignoreWords": ["TODO", "HACK"]}]' - - '[true, "check-lowercase", {"ignorePattern": "STD\w{2,3}\b"}]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: comment-format' -optionsJSON: |- - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string", - "enum": [ - "check-space", - "check-lowercase", - "check-uppercase" - ] - }, - { - "type": "object", - "properties": { - "ignoreWords": { - "type": "array", - "items": { - "type": "string" - } - }, - "ignorePattern": { - "type": "string" - } - }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "minLength": 1, - "maxLength": 4 - } ---- \ No newline at end of file diff --git a/docs/rules/completed-docs/index.html b/docs/rules/completed-docs/index.html deleted file mode 100644 index 0ea545d71e5..00000000000 --- a/docs/rules/completed-docs/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -ruleName: completed-docs -description: Enforces documentation for important items be filled out. -optionsDescription: |- - - Either `true` to enable for all, or any of - `["classes", "functions", "methods", "properties"] - to choose individual ones.` -options: - type: array - items: - type: string - enum: - - classes - - functions - - methods - - properties -optionExamples: - - 'true' - - '[true, "classes", "functions"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: completed-docs' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "classes", - "functions", - "methods", - "properties" - ] - } - } ---- \ No newline at end of file diff --git a/docs/rules/curly/index.html b/docs/rules/curly/index.html deleted file mode 100644 index 5e9075da7fe..00000000000 --- a/docs/rules/curly/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -ruleName: curly -description: Enforces braces for `if`/`for`/`do`/`while` statements. -rationale: |- - - ```ts - if (foo === bar) - foo++; - bar++; - ``` - - In the code above, the author almost certainly meant for both `foo++` and `bar++` - to be executed only if `foo === bar`. However, he forgot braces and `bar++` will be executed - no matter what. This rule could prevent such a mistake. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: curly' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/cyclomatic-complexity/index.html b/docs/rules/cyclomatic-complexity/index.html deleted file mode 100644 index 12ba0162133..00000000000 --- a/docs/rules/cyclomatic-complexity/index.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -ruleName: cyclomatic-complexity -description: Enforces a threshold of cyclomatic complexity. -descriptionDetails: |- - - Cyclomatic complexity is assessed for each function of any type. A starting value of 20 - is assigned and this value is then incremented for every statement which can branch the - control flow within the function. The following statements and expressions contribute - to cyclomatic complexity: - * `catch` - * `if` and `? :` - * `||` and `&&` due to short-circuit evaluation - * `for`, `for in` and `for of` loops - * `while` and `do while` loops -rationale: |- - - Cyclomatic complexity is a code metric which indicates the level of complexity in a - function. High cyclomatic complexity indicates confusing code which may be prone to - errors or difficult to modify. -optionsDescription: |- - - An optional upper limit for cyclomatic complexity can be specified. If no limit option - is provided a default value of $(Rule.DEFAULT_THRESHOLD) will be used. -options: - type: number - minimum: $(Rule.MINIMUM_THRESHOLD) -optionExamples: - - 'true' - - '[true, 20]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: cyclomatic-complexity' -optionsJSON: |- - { - "type": "number", - "minimum": "$(Rule.MINIMUM_THRESHOLD)" - } ---- \ No newline at end of file diff --git a/docs/rules/eofline/index.html b/docs/rules/eofline/index.html deleted file mode 100644 index 985298840d8..00000000000 --- a/docs/rules/eofline/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: eofline -description: Ensures the file ends with a newline. -rationale: 'It is a [standard convention](http://stackoverflow.com/q/729692/3124288) to end files with a newline.' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: eofline' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/file-header/index.html b/docs/rules/file-header/index.html deleted file mode 100644 index 7cc981b6bb8..00000000000 --- a/docs/rules/file-header/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: file-header -description: 'Enforces a certain header comment for all files, matched by a regular expression.' -optionsDescription: Regular expression to match the header. -options: - type: string -optionExamples: - - '[true, "Copyright \\d{4}"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: file-header' -optionsJSON: |- - { - "type": "string" - } ---- \ No newline at end of file diff --git a/docs/rules/forin/index.html b/docs/rules/forin/index.html deleted file mode 100644 index e41a69c1068..00000000000 --- a/docs/rules/forin/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -ruleName: forin -description: Requires a `for ... in` statement to be filtered with an `if` statement. -rationale: |- - - ```ts - for (let key in someObject) { - if (someObject.hasOwnProperty(key)) { - // code here - } - } - ``` - Prevents accidental interation over properties inherited from an object's prototype. - See [MDN's `for...in`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) - documentation for more information about `for...in` loops. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: forin' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/import-blacklist/index.html b/docs/rules/import-blacklist/index.html deleted file mode 100644 index 41ec9639819..00000000000 --- a/docs/rules/import-blacklist/index.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -ruleName: import-blacklist -description: |- - - Disallows importing the specified modules directly via `import` and `require`. - Instead only sub modules may be imported from that module. -rationale: |- - - Some libraries allow importing their submodules instead of the entire module. - This is good practise as it avoids loading unused modules. -optionsDescription: A list of blacklisted modules. -options: - type: array - items: - type: string - minLength: 1 -optionExamples: - - 'true' - - '[true, "rxjs", "lodash"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: import-blacklist' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string" - }, - "minLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/import-spacing/index.html b/docs/rules/import-spacing/index.html deleted file mode 100644 index a95c212b9c2..00000000000 --- a/docs/rules/import-spacing/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: import-spacing -description: Ensures proper spacing between import statement keywords -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: import-spacing' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/indent/index.html b/docs/rules/indent/index.html deleted file mode 100644 index 28d55c314b5..00000000000 --- a/docs/rules/indent/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -ruleName: indent -description: Enforces indentation with tabs or spaces. -rationale: |- - - Using only one of tabs or spaces for indentation leads to more consistent editor behavior, - cleaner diffs in version control, and easier programatic manipulation. -optionsDescription: |- - - One of the following arguments must be provided: - - * `"spaces"` enforces consistent spaces. - * `"tabs"` enforces consistent tabs. -options: - type: string - enum: - - tabs - - spaces -optionExamples: - - '[true, "spaces"]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: indent' -optionsJSON: |- - { - "type": "string", - "enum": [ - "tabs", - "spaces" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/index.html b/docs/rules/index.html deleted file mode 100644 index 537271b7ba2..00000000000 --- a/docs/rules/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: page -title: Rules -permalink: /rules/ -menu: main -order: 2 ---- -

TypeScript Specific

-

These rules find errors related to TypeScript features:

-{% include rule_list.html ruleType="typescript" %} - -

Functionality

-

These rules catch common errors in JS programming or otherwise confusing constructs that are prone to producing bugs:

-{% include rule_list.html ruleType="functionality" %} - -

Maintainability

-

These rules make code maintenance easier:

-{% include rule_list.html ruleType="maintainability" %} - -

Style

-

These rules enforce consistent style across your codebase:

-{% include rule_list.html ruleType="style" %} diff --git a/docs/rules/interface-name/index.html b/docs/rules/interface-name/index.html deleted file mode 100644 index 91375f2a0ec..00000000000 --- a/docs/rules/interface-name/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -ruleName: interface-name -description: Requires interface names to begin with a capital 'I' -rationale: Makes it easy to differentitate interfaces from regular classes at a glance. -optionsDescription: |- - - One of the following two options must be provided: - - * `"always-prefix"` requires interface names to start with an "I" - * `"never-prefix"` requires interface names to not have an "I" prefix -options: - type: string - enum: - - always-prefix - - never-prefix -optionExamples: - - '[true, "always-prefix"]' - - '[true, "never-prefix"]' -type: style -typescriptOnly: true -layout: rule -title: 'Rule: interface-name' -optionsJSON: |- - { - "type": "string", - "enum": [ - "always-prefix", - "never-prefix" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/interface-over-type-literal/index.html b/docs/rules/interface-over-type-literal/index.html deleted file mode 100644 index 3f89916e141..00000000000 --- a/docs/rules/interface-over-type-literal/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -ruleName: interface-over-type-literal -description: 'Prefer an interface declaration over a type literal (`type T = { ... }`)' -rationale: style -optionsDescription: Not configurable. -options: null -type: style -typescriptOnly: true -layout: rule -title: 'Rule: interface-over-type-literal' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/jsdoc-format/index.html b/docs/rules/jsdoc-format/index.html deleted file mode 100644 index 269ceab1b0a..00000000000 --- a/docs/rules/jsdoc-format/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -ruleName: jsdoc-format -description: Enforces basic format rules for JSDoc comments. -descriptionDetails: |- - - The following rules are enforced for JSDoc comments (comments starting with `/**`): - - * each line contains an asterisk and asterisks must be aligned - * each asterisk must be followed by either a space or a newline (except for the first and the last) - * the only characters before the asterisk on each line must be whitespace characters - * one line comments must start with `/** ` and end with `*/` -rationale: 'Helps maintain a consistent, readable style for JSDoc comments.' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: jsdoc-format' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/label-position/index.html b/docs/rules/label-position/index.html deleted file mode 100644 index d82ae64eab8..00000000000 --- a/docs/rules/label-position/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -ruleName: label-position -description: Only allows labels in sensible locations. -descriptionDetails: This rule only allows labels to be on `do/for/while/switch` statements. -rationale: |- - - Labels in JavaScript only can be used in conjunction with `break` or `continue`, - constructs meant to be used for loop flow control. While you can theoretically use - labels on any block statement in JS, it is considered poor code structure to do so. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: label-position' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/linebreak-style/index.html b/docs/rules/linebreak-style/index.html deleted file mode 100644 index 363c990858e..00000000000 --- a/docs/rules/linebreak-style/index.html +++ /dev/null @@ -1,30 +0,0 @@ ---- -ruleName: linebreak-style -description: Enforces a consistent linebreak style. -optionsDescription: |- - - One of the following options must be provided: - - * `"LF"` requires LF (`\n`) linebreaks - * `"CRLF"` requires CRLF (`\r\n`) linebreaks -options: - type: string - enum: - - LF - - CRLF -optionExamples: - - '[true, "LF"]' - - '[true, "CRLF"]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: linebreak-style' -optionsJSON: |- - { - "type": "string", - "enum": [ - "LF", - "CRLF" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/max-classes-per-file/index.html b/docs/rules/max-classes-per-file/index.html deleted file mode 100644 index 985d4d6824a..00000000000 --- a/docs/rules/max-classes-per-file/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -ruleName: max-classes-per-file -description: |- - - A file may not contain more than the specified number of classes -rationale: |- - - Ensures that files have a single responsibility so that that classes each exist in their own files -optionsDescription: |- - - The one required argument is an integer indicating the maximum number of classes that can appear in a file. -options: - type: array - items: - - type: number - minimum: 1 - additionalItems: false - minLength: 1 - maxLength: 2 -optionExamples: - - '[true, 1]' - - '[true, 5]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: max-classes-per-file' -optionsJSON: |- - { - "type": "array", - "items": [ - { - "type": "number", - "minimum": 1 - } - ], - "additionalItems": false, - "minLength": 1, - "maxLength": 2 - } ---- \ No newline at end of file diff --git a/docs/rules/max-file-line-count/index.html b/docs/rules/max-file-line-count/index.html deleted file mode 100644 index 88556799827..00000000000 --- a/docs/rules/max-file-line-count/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -ruleName: max-file-line-count -description: Requires files to remain under a certain number of lines -rationale: |- - - Limiting the number of lines allowed in a file allows files to remain small, - single purpose, and maintainable. -optionsDescription: An integer indicating the maximum number of lines. -options: - type: number - minimum: '1' -optionExamples: - - '[true, 300]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: max-file-line-count' -optionsJSON: |- - { - "type": "number", - "minimum": "1" - } ---- \ No newline at end of file diff --git a/docs/rules/max-line-length/index.html b/docs/rules/max-line-length/index.html deleted file mode 100644 index fdd451fce6a..00000000000 --- a/docs/rules/max-line-length/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -ruleName: max-line-length -description: Requires lines to be under a certain max length. -rationale: |- - - Limiting the length of a line of code improves code readability. - It also makes comparing code side-by-side easier and improves compatibility with - various editors, IDEs, and diff viewers. -optionsDescription: An integer indicating the max length of lines. -options: - type: number - minimum: '1' -optionExamples: - - '[true, 120]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: max-line-length' -optionsJSON: |- - { - "type": "number", - "minimum": "1" - } ---- \ No newline at end of file diff --git a/docs/rules/member-access/index.html b/docs/rules/member-access/index.html deleted file mode 100644 index ae5c4991013..00000000000 --- a/docs/rules/member-access/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -ruleName: member-access -description: Requires explicit visibility declarations for class members. -rationale: Explicit visibility declarations can make code more readable and accessible for those new to TS. -optionsDescription: |- - - Two arguments may be optionally provided: - - * `"check-accessor"` enforces explicit visibility on get/set accessors (can only be public) - * `"check-constructor"` enforces explicit visibility on constructors (can only be public) -options: - type: array - items: - type: string - enum: - - check-accessor - - check-constructor - minLength: 0 - maxLength: 2 -optionExamples: - - 'true' - - '[true, "check-accessor"]' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: member-access' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "check-accessor", - "check-constructor" - ] - }, - "minLength": 0, - "maxLength": 2 - } ---- \ No newline at end of file diff --git a/docs/rules/member-ordering/index.html b/docs/rules/member-ordering/index.html deleted file mode 100644 index 295ced8cb52..00000000000 --- a/docs/rules/member-ordering/index.html +++ /dev/null @@ -1,107 +0,0 @@ ---- -ruleName: member-ordering -description: Enforces member ordering. -rationale: 'A consistent ordering for class members can make classes easier to read, navigate, and edit.' -optionsDescription: |- - - One argument, which is an object, must be provided. It should contain an `order` property. - The `order` property should have a value of one of the following strings: - - * `fields-first` - * `statics-first` - * `instance-sandwich` - - Alternatively, the value for `order` maybe be an array consisting of the following strings: - - * `public-static-field` - * `protected-static-field` - * `private-static-field` - * `public-instance-field` - * `protected-instance-field` - * `private-instance-field` - * `constructor` - * `public-static-method` - * `protected-static-method` - * `private-static-method` - * `public-instance-method` - * `protected-instance-method` - * `private-instance-method` - - This is useful if one of the preset orders does not meet your needs. -options: - type: object - properties: - order: - oneOf: - - type: string - enum: - - fields-first - - statics-first - - instance-sandwich - - type: array - items: - type: string - enum: - - public-static-field - - public-static-method - - protected-static-field - - protected-static-method - - private-static-field - - private-static-method - - public-instance-field - - protected-instance-field - - private-instance-field - - constructor - - public-instance-method - - protected-instance-method - - private-instance-method - maxLength: 13 - additionalProperties: false -optionExamples: - - '[true, { "order": "fields-first" }]' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: member-ordering' -optionsJSON: |- - { - "type": "object", - "properties": { - "order": { - "oneOf": [ - { - "type": "string", - "enum": [ - "fields-first", - "statics-first", - "instance-sandwich" - ] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "public-static-field", - "public-static-method", - "protected-static-field", - "protected-static-method", - "private-static-field", - "private-static-method", - "public-instance-field", - "protected-instance-field", - "private-instance-field", - "constructor", - "public-instance-method", - "protected-instance-method", - "private-instance-method" - ] - }, - "maxLength": 13 - } - ] - } - }, - "additionalProperties": false - } ---- \ No newline at end of file diff --git a/docs/rules/new-parens/index.html b/docs/rules/new-parens/index.html deleted file mode 100644 index 58aa3916f69..00000000000 --- a/docs/rules/new-parens/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: new-parens -description: Requires parentheses when invoking a constructor via the `new` keyword. -rationale: Maintains stylistic consistency with other function calls. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: new-parens' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-angle-bracket-type-assertion/index.html b/docs/rules/no-angle-bracket-type-assertion/index.html deleted file mode 100644 index bb441ed52bd..00000000000 --- a/docs/rules/no-angle-bracket-type-assertion/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -ruleName: no-angle-bracket-type-assertion -description: Requires the use of `as Type` for type assertions instead of ``. -hasFix: true -rationale: |- - - Both formats of type assertions have the same effect, but only `as` type assertions - work in `.tsx` files. This rule ensures that you have a consistent type assertion style - across your codebase. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: true -layout: rule -title: 'Rule: no-angle-bracket-type-assertion' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-any/index.html b/docs/rules/no-any/index.html deleted file mode 100644 index 9e96a7e560a..00000000000 --- a/docs/rules/no-any/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-any -description: Diallows usages of `any` as a type declaration. -rationale: Using `any` as a type declaration nullifies the compile-time benefits of the type system. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-any' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-arg/index.html b/docs/rules/no-arg/index.html deleted file mode 100644 index a49b3401ff5..00000000000 --- a/docs/rules/no-arg/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -ruleName: no-arg -description: Disallows use of `arguments.callee`. -rationale: |- - - Using `arguments.callee` makes various performance optimizations impossible. - See [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee) - for more details on why to avoid `arguments.callee`. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-arg' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-bitwise/index.html b/docs/rules/no-bitwise/index.html deleted file mode 100644 index 9c83ca93d89..00000000000 --- a/docs/rules/no-bitwise/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -ruleName: no-bitwise -description: Disallows bitwise operators. -descriptionDetails: |- - - Specifically, the following bitwise operators are banned: - `&`, `&=`, `|`, `|=`, - `^`, `^=`, `<<`, `<<=`, - `>>`, `>>=`, `>>>`, `>>>=`, and `~`. - This rule does not ban the use of `&` and `|` for intersection and union types. -rationale: |- - - Bitwise operators are often typos - for example `bool1 & bool2` instead of `bool1 && bool2`. - They also can be an indicator of overly clever code which decreases maintainability. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-bitwise' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-boolean-compare/index.html b/docs/rules/no-boolean-compare/index.html deleted file mode 100644 index 1c1a89423b2..00000000000 --- a/docs/rules/no-boolean-compare/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-boolean-compare -description: 'Warns on comparison to a boolean literal, as in `x === true`.' -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: true -layout: rule -title: 'Rule: no-boolean-compare' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-boolean-literal-compare/index.html b/docs/rules/no-boolean-literal-compare/index.html deleted file mode 100644 index 74860ef768f..00000000000 --- a/docs/rules/no-boolean-literal-compare/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -ruleName: no-boolean-literal-compare -description: 'Warns on comparison to a boolean literal, as in `x === true`.' -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: true -requiresTypeInfo: true -layout: rule -title: 'Rule: no-boolean-literal-compare' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-conditional-assignment/index.html b/docs/rules/no-conditional-assignment/index.html deleted file mode 100644 index b7bdc4041ef..00000000000 --- a/docs/rules/no-conditional-assignment/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -ruleName: no-conditional-assignment -description: Disallows any type of assignment in conditionals. -descriptionDetails: 'This applies to `do-while`, `for`, `if`, and `while` statements.' -rationale: |- - - Assignments in conditionals are often typos: - for example `if (var1 = var2)` instead of `if (var1 == var2)`. - They also can be an indicator of overly clever code which decreases maintainability. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-conditional-assignment' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-consecutive-blank-lines/index.html b/docs/rules/no-consecutive-blank-lines/index.html deleted file mode 100644 index 180294b281f..00000000000 --- a/docs/rules/no-consecutive-blank-lines/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -ruleName: no-consecutive-blank-lines -description: Disallows one or more blank lines in a row. -rationale: Helps maintain a readable style in your codebase. -optionsDescription: |- - - An optional number of maximum allowed sequential blanks can be specified. If no value - is provided, a default of $(Rule.DEFAULT_ALLOWED_BLANKS) will be used. -options: - type: number - minimum: $(Rule.MINIMUM_ALLOWED_BLANKS) -optionExamples: - - 'true' - - '[true, 2]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: no-consecutive-blank-lines' -optionsJSON: |- - { - "type": "number", - "minimum": "$(Rule.MINIMUM_ALLOWED_BLANKS)" - } ---- \ No newline at end of file diff --git a/docs/rules/no-console/index.html b/docs/rules/no-console/index.html deleted file mode 100644 index 3a04d5c29f2..00000000000 --- a/docs/rules/no-console/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -ruleName: no-console -description: Bans the use of specified `console` methods. -rationale: 'In general, `console` methods aren''t appropriate for production code.' -optionsDescription: A list of method names to ban. -options: - type: array - items: - type: string -optionExamples: - - '[true, "log", "error"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-console' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string" - } - } ---- \ No newline at end of file diff --git a/docs/rules/no-construct/index.html b/docs/rules/no-construct/index.html deleted file mode 100644 index d7f937db798..00000000000 --- a/docs/rules/no-construct/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -ruleName: no-construct -description: 'Disallows access to the constructors of `String`, `Number`, and `Boolean`.' -descriptionDetails: Disallows constructor use such as `new Number(foo)` but does not disallow `Number(foo)`. -rationale: |- - - There is little reason to use `String`, `Number`, or `Boolean` as constructors. - In almost all cases, the regular function-call version is more appropriate. - [More details](http://stackoverflow.com/q/4719320/3124288) are available on StackOverflow. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-construct' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-debugger/index.html b/docs/rules/no-debugger/index.html deleted file mode 100644 index a3133012e5f..00000000000 --- a/docs/rules/no-debugger/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-debugger -description: Disallows `debugger` statements. -rationale: 'In general, `debugger` statements aren''t appropriate for production code.' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-debugger' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-default-export/index.html b/docs/rules/no-default-export/index.html deleted file mode 100644 index 8e7a279a2a7..00000000000 --- a/docs/rules/no-default-export/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -ruleName: no-default-export -description: Disallows default exports in ES6-style modules. -descriptionDetails: Use named exports instead. -rationale: |- - - Named imports/exports [promote clarity](https://github.com/palantir/tslint/issues/1182#issue-151780453). - In addition, current tooling differs on the correct way to handle default imports/exports. - Avoiding them all together can help avoid tooling bugs and conflicts. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: no-default-export' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-duplicate-variable/index.html b/docs/rules/no-duplicate-variable/index.html deleted file mode 100644 index 3dee824d2ce..00000000000 --- a/docs/rules/no-duplicate-variable/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -ruleName: no-duplicate-variable -description: Disallows duplicate variable declarations in the same block scope. -descriptionDetails: |- - - This rule is only useful when using the `var` keyword - - the compiler will detect redeclarations of `let` and `const` variables. -rationale: |- - - A variable can be reassigned if necessary - - there's no good reason to have a duplicate variable declaration. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-duplicate-variable' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-empty-interface/index.html b/docs/rules/no-empty-interface/index.html deleted file mode 100644 index cd2fcfec4f6..00000000000 --- a/docs/rules/no-empty-interface/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -ruleName: no-empty-interface -description: Forbids empty interfaces. -rationale: 'An empty interface is equivalent to its supertype (or `{}`).' -optionsDescription: Not configurable. -options: null -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-empty-interface' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-empty/index.html b/docs/rules/no-empty/index.html deleted file mode 100644 index 5fe4cc64ff0..00000000000 --- a/docs/rules/no-empty/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -ruleName: no-empty -description: Disallows empty blocks. -descriptionDetails: Blocks with a comment inside are not considered empty. -rationale: Empty blocks are often indicators of missing code. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-empty' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-eval/index.html b/docs/rules/no-eval/index.html deleted file mode 100644 index 63f08fba017..00000000000 --- a/docs/rules/no-eval/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -ruleName: no-eval -description: Disallows `eval` function invocations. -rationale: |- - - `eval()` is dangerous as it allows arbitrary code execution with full privileges. There are - [alternatives](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) - for most of the use cases for `eval()`. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-eval' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-for-in-array/index.html b/docs/rules/no-for-in-array/index.html deleted file mode 100644 index 781e895234f..00000000000 --- a/docs/rules/no-for-in-array/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -ruleName: no-for-in-array -description: Disallows iterating over an array with a for-in loop. -descriptionDetails: | - - A for-in loop (`for (var k in o)`) iterates over the properties of an Object. - - While it is legal to use for-in loops with array types, it is not common. - for-in will iterate over the indices of the array as strings, omitting any "holes" in - the array. - - More common is to use for-of, which iterates over the values of an array. - If you want to iterate over the indices, alternatives include: - - array.forEach((value, index) => { ... }); - for (const [index, value] of array.entries()) { ... } - for (let i = 0; i < array.length; i++) { ... } -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -requiresTypeInfo: true -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-for-in-array' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-inferrable-types/index.html b/docs/rules/no-inferrable-types/index.html deleted file mode 100644 index 4518dc603e5..00000000000 --- a/docs/rules/no-inferrable-types/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -ruleName: no-inferrable-types -description: 'Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.' -rationale: Explicit types where they can be easily infered by the compiler make code more verbose. -optionsDescription: |- - - One argument may be optionally provided: - - * `ignore-params` allows specifying an inferrable type annotation for function params. - This can be useful when combining with the `typedef` rule. -options: - type: array - items: - type: string - enum: - - ignore-params - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "ignore-params"]' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-inferrable-types' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ignore-params" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/no-inferred-empty-object-type/index.html b/docs/rules/no-inferred-empty-object-type/index.html deleted file mode 100644 index aa2a9c3f558..00000000000 --- a/docs/rules/no-inferred-empty-object-type/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-inferred-empty-object-type -description: 'Disallow type inference of {} (empty object type) at function and constructor call sites' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: true -requiresTypeInfo: true -layout: rule -title: 'Rule: no-inferred-empty-object-type' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-interface-constructor/index.html b/docs/rules/no-interface-constructor/index.html deleted file mode 100644 index b2f5778f784..00000000000 --- a/docs/rules/no-interface-constructor/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-interface-constructor -description: Warns on apparent attempts to define constructors for interfaces. -rationale: '`interface I { new(): I }` declares a type where for `x: I`, `new x()` is also of type `I`.' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: true -layout: rule -title: 'Rule: no-interface-constructor' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-internal-module/index.html b/docs/rules/no-internal-module/index.html deleted file mode 100644 index 5092d8ef529..00000000000 --- a/docs/rules/no-internal-module/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-internal-module -description: Disallows internal `module` -rationale: Using `module` leads to a confusion of concepts with external modules. Use the newer `namespace` keyword instead. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-internal-module' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-invalid-this/index.html b/docs/rules/no-invalid-this/index.html deleted file mode 100644 index fb2d3d34ed2..00000000000 --- a/docs/rules/no-invalid-this/index.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -ruleName: no-invalid-this -description: Disallows using the `this` keyword outside of classes. -rationale: 'See [the rule''s author''s rationale here.](https://github.com/palantir/tslint/pull/1105#issue-147549402)' -optionsDescription: |- - - One argument may be optionally provided: - - * `check-function-in-method` disallows using the `this` keyword in functions within class methods. -options: - type: array - items: - type: string - enum: - - check-function-in-method - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "check-function-in-method"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-invalid-this' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "check-function-in-method" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/no-magic-numbers/index.html b/docs/rules/no-magic-numbers/index.html deleted file mode 100644 index 3ebe8bc3ed0..00000000000 --- a/docs/rules/no-magic-numbers/index.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -ruleName: no-magic-numbers -description: |- - - Disallows the use constant number values outside of variable assignments. - When no list of allowed values is specified, -1, 0 and 1 are allowed by default. -rationale: |- - - Magic numbers should be avoided as they often lack documentation, forcing - them to be stored in variables gives them implicit documentation. -optionsDescription: A list of allowed numbers. -options: - type: array - items: - type: number - minLength: 1 -optionExamples: - - 'true' - - '[true, 1, 2, 3]' -type: typescript -typescriptOnly: false -layout: rule -title: 'Rule: no-magic-numbers' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "number" - }, - "minLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/no-mergeable-namespace/index.html b/docs/rules/no-mergeable-namespace/index.html deleted file mode 100644 index ca24c662893..00000000000 --- a/docs/rules/no-mergeable-namespace/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: no-mergeable-namespace -description: Disallows mergeable namespaces in the same file. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: true -layout: rule -title: 'Rule: no-mergeable-namespace' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-misused-new/index.html b/docs/rules/no-misused-new/index.html deleted file mode 100644 index 771e8ed5754..00000000000 --- a/docs/rules/no-misused-new/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: no-misused-new -description: Warns on apparent attempts to define constructors for interfaces or `new` for classes. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: true -layout: rule -title: 'Rule: no-misused-new' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-namespace/index.html b/docs/rules/no-namespace/index.html deleted file mode 100644 index d29ecbf5262..00000000000 --- a/docs/rules/no-namespace/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -ruleName: no-namespace -description: Disallows use of internal `module`s and `namespace`s. -descriptionDetails: 'This rule still allows the use of `declare module ... {}`' -rationale: |- - - ES6-style external modules are the standard way to modularize code. - Using `module {}` and `namespace {}` are outdated ways to organize TypeScript code. -optionsDescription: |- - - One argument may be optionally provided: - - * `allow-declarations` allows `declare namespace ... {}` to describe external APIs. -options: - type: array - items: - type: string - enum: - - allow-declarations - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "allow-declarations"]' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-namespace' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "allow-declarations" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/no-null-keyword/index.html b/docs/rules/no-null-keyword/index.html deleted file mode 100644 index c4c46d69f8d..00000000000 --- a/docs/rules/no-null-keyword/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: no-null-keyword -description: Disallows use of the `null` keyword literal. -rationale: |- - - Instead of having the dual concepts of `null` and`undefined` in a codebase, - this rule ensures that only `undefined` is used. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-null-keyword' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-parameter-properties/index.html b/docs/rules/no-parameter-properties/index.html deleted file mode 100644 index bac7fbb8f6e..00000000000 --- a/docs/rules/no-parameter-properties/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: no-parameter-properties -description: Disallows parameter properties in class constructors. -rationale: |- - - Parameter properties can be confusing to those new to TS as they are less explicit - than other ways of declaring and initializing class members. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: true -layout: rule -title: 'Rule: no-parameter-properties' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-reference/index.html b/docs/rules/no-reference/index.html deleted file mode 100644 index 85ff055965e..00000000000 --- a/docs/rules/no-reference/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: no-reference -description: Disallows `/// ` imports (use ES6-style imports instead). -rationale: |- - - Using `/// ` comments to load other files is outdated. - Use ES6-style imports to reference other files. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: false -layout: rule -title: 'Rule: no-reference' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-require-imports/index.html b/docs/rules/no-require-imports/index.html deleted file mode 100644 index 0791ef11775..00000000000 --- a/docs/rules/no-require-imports/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-require-imports -description: Disallows invocation of `require()`. -rationale: Prefer the newer ES6-style imports over `require()`. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: no-require-imports' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-shadowed-variable/index.html b/docs/rules/no-shadowed-variable/index.html deleted file mode 100644 index c9b41de6420..00000000000 --- a/docs/rules/no-shadowed-variable/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-shadowed-variable -description: Disallows shadowing variable declarations. -rationale: Shadowing a variable masks access to it and obscures to what value an identifier actually refers. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-shadowed-variable' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-string-literal/index.html b/docs/rules/no-string-literal/index.html deleted file mode 100644 index c4472e65b53..00000000000 --- a/docs/rules/no-string-literal/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-string-literal -description: Disallows object access via string literals. -rationale: Encourages using strongly-typed property access. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-string-literal' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-string-throw/index.html b/docs/rules/no-string-throw/index.html deleted file mode 100644 index de7259b8141..00000000000 --- a/docs/rules/no-string-throw/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -ruleName: no-string-throw -description: Flags throwing plain strings or concatenations of strings because only Errors produce proper stack traces. -hasFix: true -options: null -optionsDescription: Not configurable. -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-string-throw' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-switch-case-fall-through/index.html b/docs/rules/no-switch-case-fall-through/index.html deleted file mode 100644 index e6ff8459f6d..00000000000 --- a/docs/rules/no-switch-case-fall-through/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -ruleName: no-switch-case-fall-through -description: Disallows falling through case statements. -descriptionDetails: |- - - For example, the following is not allowed: - - ```ts - switch(foo) { - case 1: - someFunc(foo); - case 2: - someOtherFunc(foo); - } - ``` - - However, fall through is allowed when case statements are consecutive or - a magic `/* falls through */` comment is present. The following is valid: - - ```ts - switch(foo) { - case 1: - someFunc(foo); - /* falls through */ - case 2: - case 3: - someOtherFunc(foo); - } - ``` -rationale: Fall though in switch statements is often unintentional and a bug. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-switch-case-fall-through' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-trailing-whitespace/index.html b/docs/rules/no-trailing-whitespace/index.html deleted file mode 100644 index eef2dc69bf4..00000000000 --- a/docs/rules/no-trailing-whitespace/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: no-trailing-whitespace -description: Disallows trailing whitespace at the end of a line. -rationale: Keeps version control diffs clean as it prevents accidental whitespace from being committed. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: no-trailing-whitespace' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-unnecessary-qualifier/index.html b/docs/rules/no-unnecessary-qualifier/index.html deleted file mode 100644 index 342ca422939..00000000000 --- a/docs/rules/no-unnecessary-qualifier/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -ruleName: no-unnecessary-qualifier -description: Warns when a namespace qualifier (`A.x`) is unnecessary. -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: true -requiresTypeInfo: true -layout: rule -title: 'Rule: no-unnecessary-qualifier' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-unreachable/index.html b/docs/rules/no-unreachable/index.html deleted file mode 100644 index f660c7e3198..00000000000 --- a/docs/rules/no-unreachable/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: no-unreachable -description: 'Disallows unreachable code after `break`, `catch`, `throw`, and `return` statements.' -rationale: Unreachable code is often indication of a logic error. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -optionsJSON: 'null' -layout: rule -title: 'Rule: no-unreachable' ---- \ No newline at end of file diff --git a/docs/rules/no-unsafe-finally/index.html b/docs/rules/no-unsafe-finally/index.html deleted file mode 100644 index 1d6e46900c8..00000000000 --- a/docs/rules/no-unsafe-finally/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -ruleName: no-unsafe-finally -description: |- - - Disallows control flow statements, such as `return`, `continue`, - `break` and `throws` in finally blocks. -descriptionDetails: '' -rationale: |- - - When used inside `finally` blocks, control flow statements, - such as `return`, `continue`, `break` and `throws` - override any other control flow statements in the same try/catch scope. - This is confusing and unexpected behavior. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-unsafe-finally' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-unused-expression/index.html b/docs/rules/no-unused-expression/index.html deleted file mode 100644 index 6856223df77..00000000000 --- a/docs/rules/no-unused-expression/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -ruleName: no-unused-expression -description: Disallows unused expression statements. -descriptionDetails: |- - - Unused expressions are expression statements which are not assignments or function calls - (and thus usually no-ops). -rationale: |- - - Detects potential errors where an assignment or function call was intended. -optionsDescription: |- - - One argument may be optionally provided: - - * `allow-fast-null-checks` allows to use logical operators to perform fast null checks and perform - method or function calls for side effects (e.g. `e && e.preventDefault()`). -options: - type: array - items: - type: string - enum: - - allow-fast-null-checks - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "allow-fast-null-checks"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-unused-expression' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "allow-fast-null-checks" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/no-unused-new/index.html b/docs/rules/no-unused-new/index.html deleted file mode 100644 index 4508b8fb8c6..00000000000 --- a/docs/rules/no-unused-new/index.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -ruleName: no-unused-new -description: Disallows unused 'new' expression statements. -descriptionDetails: |- - - Unused 'new' expressions indicate that a constructor is being invoked solely for its side effects. -rationale: |- - - Detects constructs such as `new SomeClass()`, where a constructor is used solely for its side effects, which is considered - poor style. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-unused-new' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-unused-variable/index.html b/docs/rules/no-unused-variable/index.html deleted file mode 100644 index 8d68ff2ebcd..00000000000 --- a/docs/rules/no-unused-variable/index.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -ruleName: no-unused-variable -deprecationMessage: Use the tsc compiler options --noUnusedParameters and --noUnusedLocals instead. -description: 'Disallows unused imports, variables, functions and private class members.' -hasFix: true -optionsDescription: |- - - Three optional arguments may be optionally provided: - - * `"check-parameters"` disallows unused function and constructor parameters. - * NOTE: this option is experimental and does not work with classes - that use abstract method declarations, among other things. - * `"react"` relaxes the rule for a namespace import named `React` - (from either the module `"react"` or `"react/addons"`). - Any JSX expression in the file will be treated as a usage of `React` - (because it expands to `React.createElement `). - * `{"ignore-pattern": "pattern"}` where pattern is a case-sensitive regexp. - Variable names that match the pattern will be ignored. -options: - type: array - items: - oneOf: - - type: string - enum: - - check-parameters - - react - - type: object - properties: - ignore-pattern: - type: string - additionalProperties: false - minLength: 0 - maxLength: 3 -optionExamples: - - '[true, "react"]' - - '[true, {"ignore-pattern": "^_"}]' -type: functionality -typescriptOnly: true -layout: rule -title: 'Rule: no-unused-variable' -optionsJSON: |- - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "enum": [ - "check-parameters", - "react" - ] - }, - { - "type": "object", - "properties": { - "ignore-pattern": { - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "minLength": 0, - "maxLength": 3 - } ---- \ No newline at end of file diff --git a/docs/rules/no-use-before-declare/index.html b/docs/rules/no-use-before-declare/index.html deleted file mode 100644 index d2c24056758..00000000000 --- a/docs/rules/no-use-before-declare/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: no-use-before-declare -description: Disallows usage of variables before their declaration. -descriptionDetails: |- - - This rule is primarily useful when using the `var` keyword - - the compiler will detect if a `let` and `const` variable is used before it is declared. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-use-before-declare' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-var-keyword/index.html b/docs/rules/no-var-keyword/index.html deleted file mode 100644 index 88b9b544610..00000000000 --- a/docs/rules/no-var-keyword/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -ruleName: no-var-keyword -description: Disallows usage of the `var` keyword. -descriptionDetails: Use `let` or `const` instead. -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-var-keyword' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-var-requires/index.html b/docs/rules/no-var-requires/index.html deleted file mode 100644 index ecbbca8fe5a..00000000000 --- a/docs/rules/no-var-requires/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: no-var-requires -description: Disallows the use of require statements except in import statements. -descriptionDetails: |- - - In other words, the use of forms such as `var module = require("module")` are banned. - Instead use ES6 style imports or `import foo = require('foo')` imports. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: no-var-requires' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/no-void-expression/index.html b/docs/rules/no-void-expression/index.html deleted file mode 100644 index 6722b9d77a0..00000000000 --- a/docs/rules/no-void-expression/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -ruleName: no-void-expression -description: Requires expressions of type `void` to appear in statement position. -optionsDescription: Not configurable. -options: null -requiresTypeInfo: true -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: no-void-expression' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/object-literal-key-quotes/index.html b/docs/rules/object-literal-key-quotes/index.html deleted file mode 100644 index 7f39682b16f..00000000000 --- a/docs/rules/object-literal-key-quotes/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -ruleName: object-literal-key-quotes -description: Enforces consistent object literal property quote style. -descriptionDetails: |- - - Object literal property names can be defined in two ways: using literals or using strings. - For example, these two objects are equivalent: - - var object1 = { - property: true - }; - - var object2 = { - "property": true - }; - - In many cases, it doesn’t matter if you choose to use an identifier instead of a string - or vice-versa. Even so, you might decide to enforce a consistent style in your code. - - This rules lets you enforce consistent quoting of property names. Either they should always - be quoted (default behavior) or quoted only as needed ("as-needed"). -hasFix: true -optionsDescription: |- - - Possible settings are: - - * `"always"`: Property names should always be quoted. (This is the default.) - * `"as-needed"`: Only property names which require quotes may be quoted (e.g. those with spaces in them). - * `"consistent"`: Property names should either all be quoted or unquoted. - * `"consistent-as-needed"`: If any property name requires quotes, then all properties must be quoted. Otherwise, no - property names may be quoted. - - For ES6, computed property names (`{[name]: value}`) and methods (`{foo() {}}`) never need - to be quoted. -options: - type: string - enum: - - always - - as-needed - - consistent - - consistent-as-needed -optionExamples: - - '[true, "as-needed"]' - - '[true, "always"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: object-literal-key-quotes' -optionsJSON: |- - { - "type": "string", - "enum": [ - "always", - "as-needed", - "consistent", - "consistent-as-needed" - ] - } ---- \ No newline at end of file diff --git a/docs/rules/object-literal-shorthand/index.html b/docs/rules/object-literal-shorthand/index.html deleted file mode 100644 index 1a6ca8708e8..00000000000 --- a/docs/rules/object-literal-shorthand/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: object-literal-shorthand -description: Enforces use of ES6 object literal shorthand when possible. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: object-literal-shorthand' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/object-literal-sort-keys/index.html b/docs/rules/object-literal-sort-keys/index.html deleted file mode 100644 index 44dcc1850e8..00000000000 --- a/docs/rules/object-literal-sort-keys/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: object-literal-sort-keys -description: Requires keys in object literals to be sorted alphabetically -rationale: Useful in preventing merge conflicts -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: object-literal-sort-keys' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/one-line/index.html b/docs/rules/one-line/index.html deleted file mode 100644 index 646e89b8d56..00000000000 --- a/docs/rules/one-line/index.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -ruleName: one-line -description: Requires the specified tokens to be on the same line as the expression preceding them. -optionsDescription: |- - - Five arguments may be optionally provided: - - * `"check-catch"` checks that `catch` is on the same line as the closing brace for `try`. - * `"check-finally"` checks that `finally` is on the same line as the closing brace for `catch`. - * `"check-else"` checks that `else` is on the same line as the closing brace for `if`. - * `"check-open-brace"` checks that an open brace falls on the same line as its preceding expression. - * `"check-whitespace"` checks preceding whitespace for the specified tokens. -options: - type: array - items: - type: string - enum: - - check-catch - - check-finally - - check-else - - check-open-brace - - check-whitespace - minLength: 0 - maxLength: 5 -optionExamples: - - '[true, "check-catch", "check-finally", "check-else"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: one-line' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "check-catch", - "check-finally", - "check-else", - "check-open-brace", - "check-whitespace" - ] - }, - "minLength": 0, - "maxLength": 5 - } ---- \ No newline at end of file diff --git a/docs/rules/one-variable-per-declaration/index.html b/docs/rules/one-variable-per-declaration/index.html deleted file mode 100644 index 327b8b59f65..00000000000 --- a/docs/rules/one-variable-per-declaration/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -ruleName: one-variable-per-declaration -description: Disallows multiple variable definitions in the same declaration statement. -optionsDescription: |- - - One argument may be optionally provided: - - * `ignore-for-loop` allows multiple variable definitions in a for loop declaration. -options: - type: array - items: - type: string - enum: - - ignore-for-loop - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "ignore-for-loop"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: one-variable-per-declaration' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ignore-for-loop" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/only-arrow-functions/index.html b/docs/rules/only-arrow-functions/index.html deleted file mode 100644 index bff41cac593..00000000000 --- a/docs/rules/only-arrow-functions/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -ruleName: only-arrow-functions -description: Disallows traditional (non-arrow) function expressions. -rationale: 'Traditional functions don''t bind lexical scope, which can lead to unexpected behavior when accessing ''this''.' -optionsDescription: |- - - Two arguments may be optionally provided: - - * `"allow-declarations"` allows standalone function declarations. - * `"allow-named-functions"` allows the expression `function foo() {}` but not `function() {}`. - -options: - type: array - items: - type: string - enum: - - allow-declarations - - allow-named-functions - minLength: 0 - maxLength: 1 -optionExamples: - - 'true' - - '[true, "allow-declarations", "allow-named-functions"]' -type: typescript -typescriptOnly: false -layout: rule -title: 'Rule: only-arrow-functions' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "allow-declarations", - "allow-named-functions" - ] - }, - "minLength": 0, - "maxLength": 1 - } ---- \ No newline at end of file diff --git a/docs/rules/ordered-imports/index.html b/docs/rules/ordered-imports/index.html deleted file mode 100644 index 607a5097967..00000000000 --- a/docs/rules/ordered-imports/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -ruleName: ordered-imports -description: Requires that import statements be alphabetized. -descriptionDetails: |- - - Enforce a consistent ordering for ES6 imports: - - Named imports must be alphabetized (i.e. "import {A, B, C} from "foo";") - - The exact ordering can be controlled by the named-imports-order option. - - "longName as name" imports are ordered by "longName". - - Import sources must be alphabetized within groups, i.e.: - import * as foo from "a"; - import * as bar from "b"; - - Groups of imports are delineated by blank lines. You can use these to group imports - however you like, e.g. by first- vs. third-party or thematically. -hasFix: true -optionsDescription: |- - - You may set the `"import-sources-order"` option to control the ordering of source - imports (the `"foo"` in `import {A, B, C} from "foo"`). - - Possible values for `"import-sources-order"` are: - - * `"case-insensitive'`: Correct order is `"Bar"`, `"baz"`, `"Foo"`. (This is the default.) - * `"lowercase-first"`: Correct order is `"baz"`, `"Bar"`, `"Foo"`. - * `"lowercase-last"`: Correct order is `"Bar"`, `"Foo"`, `"baz"`. - * `"any"`: Allow any order. - - You may set the `"named-imports-order"` option to control the ordering of named - imports (the `{A, B, C}` in `import {A, B, C} from "foo"`). - - Possible values for `"named-imports-order"` are: - - * `"case-insensitive'`: Correct order is `{A, b, C}`. (This is the default.) - * `"lowercase-first"`: Correct order is `{b, A, C}`. - * `"lowercase-last"`: Correct order is `{A, C, b}`. - * `"any"`: Allow any order. - - -options: - type: object - properties: - import-sources-order: - type: string - enum: - - case-insensitive - - lowercase-first - - lowercase-last - - any - named-imports-order: - type: string - enum: - - case-insensitive - - lowercase-first - - lowercase-last - - any - additionalProperties: false -optionExamples: - - 'true' - - '[true, {"import-sources-order": "lowercase-last", "named-imports-order": "lowercase-first"}]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: ordered-imports' -optionsJSON: |- - { - "type": "object", - "properties": { - "import-sources-order": { - "type": "string", - "enum": [ - "case-insensitive", - "lowercase-first", - "lowercase-last", - "any" - ] - }, - "named-imports-order": { - "type": "string", - "enum": [ - "case-insensitive", - "lowercase-first", - "lowercase-last", - "any" - ] - } - }, - "additionalProperties": false - } ---- \ No newline at end of file diff --git a/docs/rules/prefer-arrow-shorthand-return/index.html b/docs/rules/prefer-arrow-shorthand-return/index.html deleted file mode 100644 index 615e5a844da..00000000000 --- a/docs/rules/prefer-arrow-shorthand-return/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: prefer-arrow-shorthand-return -description: 'Suggests to convert `() => { return x; }` to `() => x`.' -optionsDescription: Not configurable. -options: null -optionExamples: - - '[true]' - - '[true, "multiline"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: prefer-arrow-shorthand-return' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/prefer-const/index.html b/docs/rules/prefer-const/index.html deleted file mode 100644 index 6ff68747269..00000000000 --- a/docs/rules/prefer-const/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: prefer-const -description: Requires that variable declarations use `const` instead of `let` if possible. -descriptionDetails: |- - - If a variable is only assigned to once when it is declared, it should be declared using 'const' -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: prefer-const' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/prefer-for-of/index.html b/docs/rules/prefer-for-of/index.html deleted file mode 100644 index 182c695e16f..00000000000 --- a/docs/rules/prefer-for-of/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: prefer-for-of -description: Recommends a 'for-of' loop over a standard 'for' loop if the index is only used to access the array being iterated. -rationale: A for(... of ...) loop is easier to implement and read when the index is not needed. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: false -layout: rule -title: 'Rule: prefer-for-of' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/prefer-method-signature/index.html b/docs/rules/prefer-method-signature/index.html deleted file mode 100644 index c5b89e93be1..00000000000 --- a/docs/rules/prefer-method-signature/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: prefer-method-signature -description: 'Prefer `foo(): void` over `foo: () => void` in interfaces and types.' -hasFix: true -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: prefer-method-signature' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/promise-function-async/index.html b/docs/rules/promise-function-async/index.html deleted file mode 100644 index 2da06dd6f4a..00000000000 --- a/docs/rules/promise-function-async/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -ruleName: promise-function-async -description: Requires any function or method that returns a promise to be marked async. -rationale: |- - - Ensures that each function is only capable of 1) returning a rejected promise, or 2) - throwing an Error object. In contrast, non-`async` `Promise`-returning functions - are technically capable of either. This practice removes a requirement for consuming - code to handle both cases. - -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: false -requiresTypeInfo: true -layout: rule -title: 'Rule: promise-function-async' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/quotemark/index.html b/docs/rules/quotemark/index.html deleted file mode 100644 index c3c295f2d8e..00000000000 --- a/docs/rules/quotemark/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -ruleName: quotemark -description: Requires single or double quotes for string literals. -hasFix: true -optionsDescription: |- - - Five arguments may be optionally provided: - - * `"single"` enforces single quotes. - * `"double"` enforces double quotes. - * `"jsx-single"` enforces single quotes for JSX attributes. - * `"jsx-double"` enforces double quotes for JSX attributes. - * `"avoid-escape"` allows you to use the "other" quotemark in cases where escaping would normally be required. - For example, `[true, "double", "avoid-escape"]` would not report a failure on the string literal `'Hello "World"'`. -options: - type: array - items: - type: string - enum: - - single - - double - - jsx-single - - jsx-double - - avoid-escape - minLength: 0 - maxLength: 5 -optionExamples: - - '[true, "single", "avoid-escape"]' - - '[true, "single", "jsx-double"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: quotemark' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "single", - "double", - "jsx-single", - "jsx-double", - "avoid-escape" - ] - }, - "minLength": 0, - "maxLength": 5 - } ---- \ No newline at end of file diff --git a/docs/rules/radix/index.html b/docs/rules/radix/index.html deleted file mode 100644 index b3af9ac6b9d..00000000000 --- a/docs/rules/radix/index.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -ruleName: radix -description: Requires the radix parameter to be specified when calling `parseInt`. -rationale: |- - - From [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt): - > Always specify this parameter to eliminate reader confusion and to guarantee predictable behavior. - > Different implementations produce different results when a radix is not specified, usually defaulting the value to 10. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: radix' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/restrict-plus-operands/index.html b/docs/rules/restrict-plus-operands/index.html deleted file mode 100644 index 1a20bb14ee8..00000000000 --- a/docs/rules/restrict-plus-operands/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -ruleName: restrict-plus-operands -description: 'When adding two variables, operands must both be of type number or of type string.' -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -requiresTypeInfo: true -layout: rule -title: 'Rule: restrict-plus-operands' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/semicolon/index.html b/docs/rules/semicolon/index.html deleted file mode 100644 index e42fd34fcf6..00000000000 --- a/docs/rules/semicolon/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -ruleName: semicolon -description: Enforces consistent semicolon usage at the end of every statement. -hasFix: true -optionsDescription: |- - - One of the following arguments must be provided: - - * `"always"` enforces semicolons at the end of every statement. - * `"never"` disallows semicolons at the end of every statement except for when they are necessary. - - The following arguments may be optionaly provided: - - * `"ignore-interfaces"` skips checking semicolons at the end of interface members. - * `"ignore-bound-class-methods"` skips checking semicolons at the end of bound class methods. -options: - type: array - items: - - type: string - enum: - - always - - never - - type: string - enum: - - ignore-interfaces - additionalItems: false -optionExamples: - - '[true, "always"]' - - '[true, "never"]' - - '[true, "always", "ignore-interfaces"]' - - '[true, "always", "ignore-bound-class-methods"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: semicolon' -optionsJSON: |- - { - "type": "array", - "items": [ - { - "type": "string", - "enum": [ - "always", - "never" - ] - }, - { - "type": "string", - "enum": [ - "ignore-interfaces" - ] - } - ], - "additionalItems": false - } ---- \ No newline at end of file diff --git a/docs/rules/space-before-function-paren/index.html b/docs/rules/space-before-function-paren/index.html deleted file mode 100644 index e9a200d58ee..00000000000 --- a/docs/rules/space-before-function-paren/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -description: Require or disallow a space before function parenthesis -hasFix: true -optionExamples: - - 'true' - - '[true, "always"]' - - '[true, "never"]' - - '[true, {"anonymous": "always", "named": "never", "asyncArrow": "always"}]' -options: - properties: - anonymous: &ref_0 - enum: - - always - - never - type: string - asyncArrow: *ref_0 - constructor: *ref_0 - method: *ref_0 - named: *ref_0 - type: object -optionsDescription: |- - - One argument which is an object which may contain the keys `anonymous`, `named`, and `asyncArrow` - These should be set to either `"always"` or `"never"`. - - * `"anonymous"` checks before the opening paren in anonymous functions - * `"named"` checks before the opening paren in named functions - * `"asyncArrow"` checks before the opening paren in async arrow functions - * `"method"` checks before the opening paren in class methods - * `"constructor"` checks before the opening paren in class constructors - -ruleName: space-before-function-paren -type: style -typescriptOnly: false -layout: rule -title: 'Rule: space-before-function-paren' -optionsJSON: |- - { - "properties": { - "anonymous": { - "enum": [ - "always", - "never" - ], - "type": "string" - }, - "asyncArrow": { - "enum": [ - "always", - "never" - ], - "type": "string" - }, - "constructor": { - "enum": [ - "always", - "never" - ], - "type": "string" - }, - "method": { - "enum": [ - "always", - "never" - ], - "type": "string" - }, - "named": { - "enum": [ - "always", - "never" - ], - "type": "string" - } - }, - "type": "object" - } ---- \ No newline at end of file diff --git a/docs/rules/strict-boolean-expressions/index.html b/docs/rules/strict-boolean-expressions/index.html deleted file mode 100644 index a3bf5cbd61c..00000000000 --- a/docs/rules/strict-boolean-expressions/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -ruleName: strict-boolean-expressions -description: |- - Usage of && or || operators should be with boolean operands and - expressions in If, Do, While and For statements should be of type boolean -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: true -requiresTypeInfo: true -layout: rule -title: 'Rule: strict-boolean-expressions' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/switch-default/index.html b/docs/rules/switch-default/index.html deleted file mode 100644 index 4bfa95371fa..00000000000 --- a/docs/rules/switch-default/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: switch-default -description: Require a `default` case in all `switch` statements. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: switch-default' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/trailing-comma/index.html b/docs/rules/trailing-comma/index.html deleted file mode 100644 index d41f07af51b..00000000000 --- a/docs/rules/trailing-comma/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -ruleName: trailing-comma -description: |- - - Requires or disallows trailing commas in array and object literals, destructuring assignments, function and tuple typings, - named imports and function parameters. -hasFix: true -optionsDescription: |- - - One argument which is an object with the keys `multiline` and `singleline`. - Both should be set to either `"always"` or `"never"`. - - * `"multiline"` checks multi-line object literals. - * `"singleline"` checks single-line object literals. - - A array is considered "multiline" if its closing bracket is on a line - after the last array element. The same general logic is followed for - object literals, function and tuple typings, named import statements - and function parameters. -options: - type: object - properties: - multiline: - type: string - enum: - - always - - never - singleline: - type: string - enum: - - always - - never - additionalProperties: false -optionExamples: - - '[true, {"multiline": "always", "singleline": "never"}]' -type: maintainability -typescriptOnly: false -layout: rule -title: 'Rule: trailing-comma' -optionsJSON: |- - { - "type": "object", - "properties": { - "multiline": { - "type": "string", - "enum": [ - "always", - "never" - ] - }, - "singleline": { - "type": "string", - "enum": [ - "always", - "never" - ] - } - }, - "additionalProperties": false - } ---- \ No newline at end of file diff --git a/docs/rules/triple-equals/index.html b/docs/rules/triple-equals/index.html deleted file mode 100644 index 1fdfe98e5b8..00000000000 --- a/docs/rules/triple-equals/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -ruleName: triple-equals -description: Requires `===` and `!==` in place of `==` and `!=`. -optionsDescription: |- - - Two arguments may be optionally provided: - - * `"allow-null-check"` allows `==` and `!=` when comparing to `null`. - * `"allow-undefined-check"` allows `==` and `!=` when comparing to `undefined`. -options: - type: array - items: - type: string - enum: - - allow-null-check - - allow-undefined-check - minLength: 0 - maxLength: 2 -optionExamples: - - 'true' - - '[true, "allow-null-check"]' - - '[true, "allow-undefined-check"]' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: triple-equals' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "allow-null-check", - "allow-undefined-check" - ] - }, - "minLength": 0, - "maxLength": 2 - } ---- \ No newline at end of file diff --git a/docs/rules/typedef-whitespace/index.html b/docs/rules/typedef-whitespace/index.html deleted file mode 100644 index 8fcd3b63087..00000000000 --- a/docs/rules/typedef-whitespace/index.html +++ /dev/null @@ -1,160 +0,0 @@ ---- -ruleName: typedef-whitespace -description: Requires or disallows whitespace for type definitions. -descriptionDetails: Determines if a space is required or not before the colon in a type specifier. -optionsDescription: |- - - Two arguments which are both objects. - The first argument specifies how much space should be to the _left_ of a typedef colon. - The second argument specifies how much space should be to the _right_ of a typedef colon. - Each key should have a value of `"space"` or `"nospace"`. - Possible keys are: - - * `"call-signature"` checks return type of functions. - * `"index-signature"` checks index type specifier of indexers. - * `"parameter"` checks function parameters. - * `"property-declaration"` checks object property declarations. - * `"variable-declaration"` checks variable declaration. -options: - type: array - items: - - &ref_1 - type: object - properties: - call-signature: &ref_0 - type: string - enum: - - nospace - - onespace - - space - index-signature: *ref_0 - parameter: *ref_0 - property-declaration: *ref_0 - variable-declaration: *ref_0 - additionalProperties: false - - *ref_1 - additionalItems: false -optionExamples: - - |- - - [ - true, - { - "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" - } - ] -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: typedef-whitespace' -optionsJSON: |- - { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "call-signature": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "index-signature": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "parameter": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "property-declaration": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "variable-declaration": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - } - }, - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "call-signature": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "index-signature": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "parameter": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "property-declaration": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - }, - "variable-declaration": { - "type": "string", - "enum": [ - "nospace", - "onespace", - "space" - ] - } - }, - "additionalProperties": false - } - ], - "additionalItems": false - } ---- \ No newline at end of file diff --git a/docs/rules/typedef/index.html b/docs/rules/typedef/index.html deleted file mode 100644 index 67ca7f977f2..00000000000 --- a/docs/rules/typedef/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -ruleName: typedef -description: Requires type definitions to exist. -optionsDescription: |- - - Seven arguments may be optionally provided: - - * `"call-signature"` checks return type of functions. - * `"arrow-call-signature"` checks return type of arrow functions. - * `"parameter"` checks type specifier of function parameters for non-arrow functions. - * `"arrow-parameter"` checks type specifier of function parameters for arrow functions. - * `"property-declaration"` checks return types of interface properties. - * `"variable-declaration"` checks variable declarations. - * `"member-variable-declaration"` checks member variable declarations. -options: - type: array - items: - type: string - enum: - - call-signature - - arrow-call-signature - - parameter - - arrow-parameter - - property-declaration - - variable-declaration - - member-variable-declaration - minLength: 0 - maxLength: 7 -optionExamples: - - '[true, "call-signature", "parameter", "member-variable-declaration"]' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: typedef' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "call-signature", - "arrow-call-signature", - "parameter", - "arrow-parameter", - "property-declaration", - "variable-declaration", - "member-variable-declaration" - ] - }, - "minLength": 0, - "maxLength": 7 - } ---- \ No newline at end of file diff --git a/docs/rules/typeof-compare/index.html b/docs/rules/typeof-compare/index.html deleted file mode 100644 index a879dcc2679..00000000000 --- a/docs/rules/typeof-compare/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: typeof-compare -description: Makes sure result of `typeof` is compared to correct string values -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: typeof-compare' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/unified-signatures/index.html b/docs/rules/unified-signatures/index.html deleted file mode 100644 index 39e0a1c7eea..00000000000 --- a/docs/rules/unified-signatures/index.html +++ /dev/null @@ -1,13 +0,0 @@ ---- -ruleName: unified-signatures -description: Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: typescript -typescriptOnly: true -layout: rule -title: 'Rule: unified-signatures' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/use-isnan/index.html b/docs/rules/use-isnan/index.html deleted file mode 100644 index 848ec439738..00000000000 --- a/docs/rules/use-isnan/index.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -ruleName: use-isnan -description: Enforces use of the `isNaN()` function to check for NaN references instead of a comparison to the `NaN` constant. -rationale: |- - - Since `NaN !== NaN`, comparisons with regular operators will produce unexpected results. - So, instead of `if (myVar === NaN)`, do `if (isNaN(myVar))`. -optionsDescription: Not configurable. -options: null -optionExamples: - - 'true' -type: functionality -typescriptOnly: false -layout: rule -title: 'Rule: use-isnan' -optionsJSON: 'null' ---- \ No newline at end of file diff --git a/docs/rules/variable-name/index.html b/docs/rules/variable-name/index.html deleted file mode 100644 index 0808782623f..00000000000 --- a/docs/rules/variable-name/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -ruleName: variable-name -description: Checks variable names for various errors. -optionsDescription: |- - - Five arguments may be optionally provided: - - * `"check-format"`: allows only camelCased or UPPER_CASED variable names - * `"allow-leading-underscore"` allows underscores at the beginning (only has an effect if "check-format" specified) - * `"allow-trailing-underscore"` allows underscores at the end. (only has an effect if "check-format" specified) - * `"allow-pascal-case"` allows PascalCase in addtion to camelCase. - * `"ban-keywords"`: disallows the use of certain TypeScript keywords (`any`, `Number`, `number`, `String`, - `string`, `Boolean`, `boolean`, `undefined`) as variable or parameter names. -options: - type: array - items: - type: string - enum: - - check-format - - allow-leading-underscore - - allow-trailing-underscore - - allow-pascal-case - - ban-keywords - minLength: 0 - maxLength: 5 -optionExamples: - - '[true, "ban-keywords", "check-format", "allow-leading-underscore"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: variable-name' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "check-format", - "allow-leading-underscore", - "allow-trailing-underscore", - "allow-pascal-case", - "ban-keywords" - ] - }, - "minLength": 0, - "maxLength": 5 - } ---- \ No newline at end of file diff --git a/docs/rules/whitespace/index.html b/docs/rules/whitespace/index.html deleted file mode 100644 index c3f685c206a..00000000000 --- a/docs/rules/whitespace/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -ruleName: whitespace -description: Enforces whitespace style conventions. -rationale: 'Helps maintain a readable, consistent style in your codebase.' -optionsDescription: |- - - Eight arguments may be optionally provided: - - * `"check-branch"` checks branching statements (`if`/`else`/`for`/`while`) are followed by whitespace. - * `"check-decl"`checks that variable declarations have whitespace around the equals token. - * `"check-operator"` checks for whitespace around operator tokens. - * `"check-module"` checks for whitespace in import & export statements. - * `"check-separator"` checks for whitespace after separator tokens (`,`/`;`). - * `"check-type"` checks for whitespace before a variable type specification. - * `"check-typecast"` checks for whitespace between a typecast and its target. - * `"check-preblock"` checks for whitespace before the opening brace of a block -options: - type: array - items: - type: string - enum: - - check-branch - - check-decl - - check-operator - - check-module - - check-separator - - check-type - - check-typecast - - check-preblock - minLength: 0 - maxLength: 7 -optionExamples: - - '[true, "check-branch", "check-operator", "check-typecast"]' -type: style -typescriptOnly: false -layout: rule -title: 'Rule: whitespace' -optionsJSON: |- - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "check-branch", - "check-decl", - "check-operator", - "check-module", - "check-separator", - "check-type", - "check-typecast", - "check-preblock" - ] - }, - "minLength": 0, - "maxLength": 7 - } ---- \ No newline at end of file