Skip to content

Commit 1c7975c

Browse files
authored
Release 1.1.0 (#396)
1 parent 67e948c commit 1c7975c

File tree

4 files changed

+92
-3
lines changed

4 files changed

+92
-3
lines changed

src/docs/guide/usage/linter/generated-rules.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The progress of all rule implementations is tracked [here](https://github.com/oxc-project/oxc/issues/481).
44

5-
- Total number of rules: 519
5+
- Total number of rules: 520
66
- Rules turned on by default: 123
77

88
**Legend for 'Fixable?' column:**
@@ -286,14 +286,15 @@ Lints which prevent the use of language and library features. Must not be enable
286286
| [prefer-node-protocol](/docs/guide/usage/linter/rules/unicorn/prefer-node-protocol.html) | unicorn | | 🛠️ |
287287
| [prefer-number-properties](/docs/guide/usage/linter/rules/unicorn/prefer-number-properties.html) | unicorn | | ⚠️🛠️️ |
288288

289-
## Suspicious (33):
289+
## Suspicious (34):
290290

291291
code that is most likely wrong or useless.
292292

293293
| Rule name | Source | Default | Fixable? |
294294
| -------------------------------------------------------------------------------------------------------------------- | ---------- | ------- | -------- |
295295
| [block-scoped-var](/docs/guide/usage/linter/rules/eslint/block-scoped-var.html) | eslint | | |
296296
| [no-extend-native](/docs/guide/usage/linter/rules/eslint/no-extend-native.html) | eslint | | |
297+
| [no-extra-bind](/docs/guide/usage/linter/rules/eslint/no-extra-bind.html) | eslint | | 🚧 |
297298
| [no-new](/docs/guide/usage/linter/rules/eslint/no-new.html) | eslint | | |
298299
| [no-unexpected-multiline](/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.html) | eslint | | ⚠️🛠️️ |
299300
| [no-unneeded-ternary](/docs/guide/usage/linter/rules/eslint/no-unneeded-ternary.html) | eslint | | ⚠️🛠️️ |
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!-- This file is auto-generated by tasks/website/src/linter/rules/doc_page.rs. Do not edit it manually. -->
2+
3+
<script setup>
4+
import { data } from '../version.data.js';
5+
const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_linter/src/rules/eslint/no_extra_bind.rs`;
6+
</script>
7+
8+
# eslint/no-extra-bind <Badge type="info" text="Suspicious" />
9+
10+
<div class="rule-meta">
11+
<Alert class="fix" type="info">
12+
<span class="emoji">🚧</span> An auto-fix is still under development.
13+
</Alert>
14+
</div>
15+
16+
### What it does
17+
18+
Disallow unnecessary calls to .bind()
19+
20+
### Why is this bad?
21+
22+
This rule is aimed at avoiding the unnecessary use of bind()
23+
and as such will warn whenever an immediately-invoked function expression (IIFE) is using bind()
24+
and doesn’t have an appropriate this value.
25+
This rule won’t flag usage of bind() that includes function argument binding.
26+
27+
### Examples
28+
29+
Examples of **incorrect** code for this rule:
30+
31+
```js
32+
const x = function() {
33+
foo();
34+
}.bind(bar);
35+
36+
const z = (() => {
37+
this.foo();
38+
}).bind(this);
39+
```
40+
41+
Examples of **correct** code for this rule:
42+
43+
```js
44+
const x = function() {
45+
this.foo();
46+
}.bind(bar);
47+
const y = function(a) {
48+
return a + 1;
49+
}.bind(foo, bar);
50+
```
51+
52+
## How to use
53+
54+
To **enable** this rule in the CLI or using the config file, you can use:
55+
56+
::: code-group
57+
58+
```bash [CLI]
59+
oxlint --deny no-extra-bind
60+
```
61+
62+
```json [Config (.oxlintrc.json)]
63+
{
64+
"rules": {
65+
"no-extra-bind": "error"
66+
}
67+
}
68+
```
69+
70+
:::
71+
72+
## References
73+
74+
- <a v-bind:href="source" target="_blank" rel="noreferrer">Rule Source</a>

src/docs/guide/usage/linter/rules/react/exhaustive-deps.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ function MyComponent(props) {
4646
}
4747
```
4848

49+
### Options
50+
51+
#### additionalHooks
52+
53+
`{ type: string }`
54+
55+
Optionally provide a regex of additional hooks to check.
56+
57+
Example:
58+
59+
```json
60+
{ "react/exhaustive-deps": ["error", { "additionalHooks": "useSpecialEffect" }] }
61+
```
62+
4963
## How to use
5064

5165
To **enable** this rule in the CLI or using the config file, you can 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 "df7dc74cc90fa27efccf9a988c0f82e883a42302";
3+
return "40ca1ef8d4b2e923caf723ebd190a9d52efeaef5";
44
},
55
};

0 commit comments

Comments
 (0)