You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/eslint-plugin-react-hooks/lints/config.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,44 @@ title: config
4
4
5
5
<Intro>
6
6
7
-
Validates the compiler [configuration options](/reference/react-compiler/configuration).
7
+
Valida as [opções de configuração](/reference/react-compiler/configuration) do compilador.
8
8
9
9
</Intro>
10
10
11
-
## Rule Details {/*rule-details*/}
11
+
## Detalhes da Regra {/*rule-details*/}
12
12
13
-
React Compiler accepts various [configuration options](/reference/react-compiler/configuration) to control its behavior. This rule validates that your configuration uses correct option names and value types, preventing silent failures from typos or incorrect settings.
13
+
O React Compiler aceita várias [opções de configuração](/reference/react-compiler/configuration)para controlar seu comportamento. Esta regra valida que sua configuração usa nomes de opções e tipos de valor corretos, prevenindo falhas silenciosas por erros de digitação ou configurações incorretas.
14
14
15
-
### Invalid {/*invalid*/}
15
+
### Inválido {/*invalid*/}
16
16
17
-
Examples of incorrect code for this rule:
17
+
Exemplos de código incorreto para esta regra:
18
18
19
19
```js
20
-
// ❌ Unknown option name
20
+
// ❌ Nome de opção desconhecido
21
21
module.exports= {
22
22
plugins: [
23
23
['babel-plugin-react-compiler', {
24
-
compileMode:'all'//Typo: should be compilationMode
24
+
compileMode:'all'//Erro de digitação: deveria ser compilationMode
25
25
}]
26
26
]
27
27
};
28
28
29
-
// ❌ Invalid option value
29
+
// ❌ Valor de opção inválido
30
30
module.exports= {
31
31
plugins: [
32
32
['babel-plugin-react-compiler', {
33
-
compilationMode:'everything'//Invalid: use 'all' or 'infer'
33
+
compilationMode:'everything'//Inválido: use 'all' ou 'infer'
34
34
}]
35
35
]
36
36
};
37
37
```
38
38
39
-
### Valid {/*valid*/}
39
+
### Válido {/*valid*/}
40
40
41
-
Examples of correct code for this rule:
41
+
Exemplos de código correto para esta regra:
42
42
43
43
```js
44
-
// ✅ Valid compiler configuration
44
+
// ✅ Configuração de compilador válida
45
45
module.exports= {
46
46
plugins: [
47
47
['babel-plugin-react-compiler', {
@@ -52,39 +52,39 @@ module.exports = {
52
52
};
53
53
```
54
54
55
-
## Troubleshooting {/*troubleshooting*/}
55
+
## Solução de Problemas {/*troubleshooting*/}
56
56
57
-
### Configuration not working as expected {/*config-not-working*/}
57
+
### Configuração não funciona como esperado {/*config-not-working*/}
58
58
59
-
Your compiler configuration might have typos or incorrect values:
59
+
Sua configuração do compilador pode ter erros de digitação ou valores incorretos:
60
60
61
61
```js
62
-
// ❌ Wrong: Common configuration mistakes
62
+
// ❌ Errado: Erros comuns de configuração
63
63
module.exports= {
64
64
plugins: [
65
65
['babel-plugin-react-compiler', {
66
-
//Typo in option name
66
+
//Erro de digitação no nome da opção
67
67
compilationMod:'all',
68
-
//Wrong value type
68
+
//Tipo de valor incorreto
69
69
panicThreshold:true,
70
-
//Unknown option
70
+
//Opção desconhecida
71
71
optimizationLevel:'max'
72
72
}]
73
73
]
74
74
};
75
75
```
76
76
77
-
Check the [configuration documentation](/reference/react-compiler/configuration)for valid options:
77
+
Verifique a [documentação de configuração](/reference/react-compiler/configuration)para opções válidas:
0 commit comments