Skip to content

docs(eslint-plugin): remove "Related To" references to TSLint #5188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,3 @@ This rule is not configurable.
## When Not To Use It

If you don't care about the general structure of the code, then you will not need this rule.

## Related To

- TSLint: [adjacent-overload-signatures](https://palantir.github.io/tslint/rules/adjacent-overload-signatures/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/array-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,3 @@ This matrix lists all possible option combinations and their expected results fo
| `generic` | `array` | `Array<number>` | `Array<Foo & Bar>` | `readonly number[]` | `readonly (Foo & Bar)[]` |
| `generic` | `array-simple` | `Array<number>` | `Array<Foo & Bar>` | `readonly number[]` | `ReadonlyArray<Foo & Bar>` |
| `generic` | `generic` | `Array<number>` | `Array<Foo & Bar>` | `ReadonlyArray<number>` | `ReadonlyArray<Foo & Bar>` |

## Related To

- TSLint: [array-type](https://palantir.github.io/tslint/rules/array-type/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/await-thenable.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ This rule is not configurable.

If you want to allow code to `await` non-Promise values.
This is generally not preferred, but can sometimes be useful for visual consistency.

## Related To

- TSLint: ['await-promise'](https://palantir.github.io/tslint/rules/await-promise)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/ban-ts-comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,3 @@ If you want to use all of the TypeScript directives.
## Further Reading

- TypeScript [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html)

## Related To

- TSLint: [ban-ts-ignore](https://palantir.github.io/tslint/rules/ban-ts-ignore/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/ban-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,3 @@ const capitalObj2: { a: string } = { a: 'string' };
const curly1: number = 1;
const curly2: Record<'a', string> = { a: 'string' };
```

## Related To

- TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types)
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,3 @@ const foo = <Foo props={{ ... } as Bar}/>;
## When Not To Use It

If you do not want to enforce consistent type assertions.

## Related To

- TSLint: [no-angle-bracket-type-assertion](https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion/)
- TSLint: [no-object-literal-type-assertion](https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/)
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ type T = { x: number };
## When Not To Use It

If you specifically want to use an interface or type literal for stylistic reasons, you can disable this rule.

## Related To

- TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/)
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,3 @@ If you think defaulting to public is a good default, then you should consider us
## Further Reading

- TypeScript [Accessibility Modifiers](https://www.typescriptlang.org/docs/handbook/classes.html#public-private-and-protected-modifiers)

## Related To

- TSLint: [member-access](http://palantir.github.io/tslint/rules/member-access/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/member-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,3 @@ It is also possible to group different member types at the same rank.
## When Not To Use It

If you don't care about the general order of your members, then you will not need this rule.

## Related To

- TSLint: [member-ordering](https://palantir.github.io/tslint/rules/member-ordering/)
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,3 @@ console.log(void alert('Hello, world!'));
The return type of a function can be inspected by going to its definition or hovering over it in an IDE.
If you don't care about being explicit about the void type in actual code then don't use this rule.
Also, if you prefer concise coding style then also don't use it.

## Related To

- TSLint: ['no-void-expression'](https://palantir.github.io/tslint/rules/no-void-expression/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-dynamic-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,3 @@ Some environments such as older browsers might not support `Map` and `Set`.

Do not consider this rule as performance advice before profiling your code's bottlenecks.
Even repeated minor performance slowdowns likely do not significantly affect your application's general perceived speed.

## Related To

- TSLint: [no-dynamic-delete](https://palantir.github.io/tslint/rules/no-dynamic-delete)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-empty-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,3 @@ This rule accepts a single object option with the following default configuratio
## When Not To Use It

If you don't care about having empty/meaningless interfaces, then you will not need this rule.

## Related To

- TSLint: [no-empty-interface](https://palantir.github.io/tslint/rules/no-empty-interface/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-explicit-any.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,3 @@ and you want to be able to specify `any`.
## Further Reading

- TypeScript [any type](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

## Related To

- TSLint: [no-any](https://palantir.github.io/tslint/rules/no-any/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-extraneous-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,3 @@ class Constants {
## When Not To Use It

You can disable this rule if you are unable -or unwilling- to switch off using classes as namespaces.

## Related To

[`no-unnecessary-class`](https://palantir.github.io/tslint/rules/no-unnecessary-class/) from TSLint
1 change: 0 additions & 1 deletion packages/eslint-plugin/docs/rules/no-floating-promises.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ If you do not use Promise-like values in your codebase, or want to allow them to
## Related To

- [`no-misused-promises`](./no-misused-promises.md)
- TSLint: ['no-floating-promises'](https://palantir.github.io/tslint/rules/no-floating-promises/)
6 changes: 0 additions & 6 deletions packages/eslint-plugin/docs/rules/no-for-in-array.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This rule prohibits iterating over an array with a for-in loop.

## Rule Details

Rationale from TSLint:

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
Expand Down Expand Up @@ -57,7 +55,3 @@ This rule is not configurable.
## When Not To Use It

If you want to iterate through a loop using the indices in an array as strings, you can turn off this rule.

## Related To

- TSLint: ['no-for-in-array'](https://palantir.github.io/tslint/rules/no-for-in-array/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-inferrable-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,3 @@ If you do not want to enforce inferred types.
## Further Reading

TypeScript [Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)

## Related To

TSLint: [no-inferrable-types](https://palantir.github.io/tslint/rules/no-inferrable-types/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-invalid-void-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,3 @@ class Example {

If you don't care about if `void` is used with other types,
or in invalid places, then you don't need this rule.

## Related To

- TSLint: [invalid-void](https://palantir.github.io/tslint/rules/invalid-void/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-misused-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ interface I {
```

This rule is not configurable.

## Related To

- TSLint: [no-misused-new](https://palantir.github.io/tslint/rules/no-misused-new/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,3 @@ If you are using the ES2015 module syntax, then you will not need this rule.
- [Modules](https://www.typescriptlang.org/docs/handbook/modules.html)
- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
- [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)

## Related To

- TSLint: [no-namespace](https://palantir.github.io/tslint/rules/no-namespace/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-non-null-assertion.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,3 @@ This rule is not configurable.
## When Not To Use It

If you don't care about strict null-checking, then you will not need this rule.

## Further Reading

- [`no-non-null-assertion`](https://palantir.github.io/tslint/rules/no-non-null-assertion/) in [TSLint](https://palantir.github.io/tslint/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-parameter-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,3 @@ class Foo {
## When Not To Use It

If you don't care about the using parameter properties in constructors, then you will not need this rule.

## Related To

- TSLint: [no-parameter-properties](https://palantir.github.io/tslint/rules/no-parameter-properties/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-require-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,3 @@ This rule is not configurable.
## When Not To Use It

If you don't care about TypeScript module syntax, then you will not need this rule.

## Related To

- TSLint: [no-require-imports](https://palantir.github.io/tslint/rules/no-require-imports/)
42 changes: 18 additions & 24 deletions packages/eslint-plugin/docs/rules/no-this-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@ This rule prohibits assigning variables to `this`.

## Rule Details

Rationale from TSLint:
Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices
or not managing scope well.

> Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices
> or not managing scope well.
>
> Instead of storing a reference to `this` and using it inside a `function () {`:
>
> ```js
> const self = this;
>
> setTimeout(function () {
> self.doWork();
> });
> ```
>
> Use `() =>` arrow lambdas, as they preserve `this` scope for you:
Instead of storing a reference to `this` and using it inside a `function () {`:

```js
const self = this;
>
> ```js
> setTimeout(() => {
> this.doWork();
> });
> ```
setTimeout(function () {
self.doWork();
});
```

Use `() =>` arrow lambdas, as they preserve `this` scope for you:

```js
setTimeout(() => {
this.doWork();
});
```

Examples of **incorrect** code for this rule:

Expand Down Expand Up @@ -56,7 +54,3 @@ You can pass an object option:
## When Not To Use It

If you need to assign `this` to variables, you shouldn’t use this rule.

## Related To

- TSLint: [`no-this-assignment`](https://palantir.github.io/tslint/rules/no-this-assignment/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-type-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,3 @@ callback, etc. that would cause the code to be unreadable or impractical.
## Further Reading

- [Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html)

## Related To

- TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/)
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,3 @@ if (!(someNullCondition ?? true)) {
| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
| `nullableBooleanVar === false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
| `nullableBooleanVar !== false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |

## Related To

- TSLint: [no-boolean-literal-compare](https://palantir.github.io/tslint/rules/no-boolean-literal-compare)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,3 @@ This rule is not configurable.
## When Not To Use It

If you don't care about having unneeded namespace or enum qualifiers, then you don't need to use this rule.

## Related To

- TSLint: [no-unnecessary-qualifier](https://palantir.github.io/tslint/rules/no-unnecessary-qualifier/)
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,3 @@ class Impl implements I<string> {}
```

This rule is not configurable.

## Related To

- TSLint: [use-default-type-parameter](https://palantir.github.io/tslint/rules/use-default-type-parameter)
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,3 @@ const foo: Foo = 3;
## When Not To Use It

If you don't care about having no-op type assertions in your code, then you can turn off this rule.

## Related To

- TSLint: [`no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/)
1 change: 0 additions & 1 deletion packages/eslint-plugin/docs/rules/no-unsafe-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ This rule is not configurable.
## Related To

- [`no-explicit-any`](./no-explicit-any.md)
- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
1 change: 0 additions & 1 deletion packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ This rule is not configurable.
## Related To

- [`no-explicit-any`](./no-explicit-any.md)
- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
1 change: 0 additions & 1 deletion packages/eslint-plugin/docs/rules/no-unsafe-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ This rule is not configurable.
## Related To

- [`no-explicit-any`](./no-explicit-any.md)
- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ This rule is not configurable.
## Related To

- [`no-explicit-any`](./no-explicit-any.md)
- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
1 change: 0 additions & 1 deletion packages/eslint-plugin/docs/rules/no-unsafe-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ This rule is not configurable.
## Related To

- [`no-explicit-any`](./no-explicit-any.md)
- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/no-var-requires.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,3 @@ This rule is not configurable.
## When Not To Use It

If you don't care about TypeScript module syntax, then you will not need this rule.

## Related To

- TSLint: [no-var-requires](https://palantir.github.io/tslint/rules/no-var-requires/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/parameter-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,3 @@ class Foo {
## When Not To Use It

If you don't care about the using parameter properties in constructors, then you will not need this rule.

## Related To

- TSLint: [no-parameter-properties](https://palantir.github.io/tslint/rules/no-parameter-properties/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/prefer-for-of.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,3 @@ This rule is not configurable.
## When Not To Use It

If you transpile for browsers that do not support for-of loops, you may wish to use traditional for loops that produce more compact code.

## Related To

- TSLint: ['prefer-for-of'](https://palantir.github.io/tslint/rules/prefer-for-of/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/prefer-function-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,3 @@ This rule is not configurable.
## When Not To Use It

If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can disable this rule.

## Further Reading

- TSLint: [`callable-types`](https://palantir.github.io/tslint/rules/callable-types/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ This rule is not configurable.
- [Modules](https://www.typescriptlang.org/docs/handbook/modules.html)
- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
- [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)

## Related To

- TSLint: [no-internal-module](https://palantir.github.io/tslint/rules/no-internal-module/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/prefer-readonly.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,3 @@ class Container {
private neverModifiedPrivate = 'unchanged';
}
```

## Related To

- TSLint: ['prefer-readonly'](https://palantir.github.io/tslint/rules/prefer-readonly)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/promise-function-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,3 @@ In addition, each of the following properties may be provided, and default to `t
]
}
```

## Related To

- TSLint: [promise-function-async](https://palantir.github.io/tslint/rules/promise-function-async)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/restrict-plus-operands.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,3 @@ var fn = (a: any, b: number) => a + b;
"@typescript-eslint/restrict-plus-operands": "error"
}
```

## Related To

- TSLint: [restrict-plus-operands](https://palantir.github.io/tslint/rules/restrict-plus-operands/)
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,4 @@ This rule provides following fixes and suggestions for particular types in boole

## Related To

- TSLint: [strict-boolean-expressions](https://palantir.github.io/tslint/rules/strict-boolean-expressions)
- [no-unnecessary-condition](./no-unnecessary-condition.md) - Similar rule which reports always-truthy and always-falsy values in conditions
5 changes: 0 additions & 5 deletions packages/eslint-plugin/docs/rules/triple-slash-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,3 @@ If you want to ban use of one or all of the triple slash reference directives, o
## When Not To Use It

If you want to use all flavors of triple slash reference directives.

## Related To

- TSLint: [no-reference](http://palantir.github.io/tslint/rules/no-reference/)
- TSLint: [no-reference-import](https://palantir.github.io/tslint/rules/no-reference-import/)
4 changes: 0 additions & 4 deletions packages/eslint-plugin/docs/rules/type-annotation-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,3 @@ If you don't want to enforce spacing for your type annotations, you can safely t

- [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html)
- [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)

## Related To

- TSLint: [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/)
Loading