File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
src/docs/guide/usage/linter/rules Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,11 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
15
15
16
16
### What it does
17
17
18
- Disallow unnecessary constraints on generic types.
18
+ Disallow aliasing ` this `
19
19
20
20
### Why is this bad?
21
21
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.
30
23
31
24
````
32
25
## How to use
Original file line number Diff line number Diff line change 1
1
export default {
2
2
load ( ) {
3
- return "08e666fc2da750dc6e8659f1e71b0766058516d6 " ;
3
+ return "94a418d201eac3e81ee295c2f7a4cebc695c7f34 " ;
4
4
} ,
5
5
} ;
You can’t perform that action at this time.
0 commit comments