Skip to content

Commit b6deff3

Browse files
authored
Release 1.3.0 (#405)
1 parent 3d6cadc commit b6deff3

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/docs/guide/usage/linter/rules/typescript/no-this-alias.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,11 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
1515

1616
### What it does
1717

18-
Disallow unnecessary constraints on generic types.
18+
Disallow aliasing `this`
1919

2020
### Why is this bad?
2121

22-
Generic type parameters (`<T>`) in TypeScript may be "constrained" with
23-
an extends keyword. When no extends is provided, type parameters
24-
default a constraint to unknown. It is therefore redundant to extend
25-
from any or unknown.
26-
27-
the rule doesn't allow `const {allowedName} = this`
28-
this is to keep 1:1 with eslint implementation
29-
sampe with `obj.<allowedName> = this`
22+
Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices or not managing scope well.
3023

3124
````
3225
## How to use
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
22
load() {
3-
return "08e666fc2da750dc6e8659f1e71b0766058516d6";
3+
return "94a418d201eac3e81ee295c2f7a4cebc695c7f34";
44
},
55
};

0 commit comments

Comments
 (0)