Skip to content

Commit c26095d

Browse files
authored
Tradução de lints/gating.md para Português (Brasil) (#1291)
1 parent e73dc17 commit c26095d

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

  • src/content/reference/eslint-plugin-react-hooks/lints

‎src/content/reference/eslint-plugin-react-hooks/lints/gating.md‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,53 @@ title: gating
44

55
<Intro>
66

7-
Validates configuration of [gating mode](/reference/react-compiler/gating).
7+
Valida a configuração do [modo de gating](/reference/react-compiler/gating).
88

99
</Intro>
1010

11-
## Rule Details {/*rule-details*/}
11+
## Detalhes da Regra {/*rule-details*/}
1212

13-
Gating mode lets you gradually adopt React Compiler by marking specific components for optimization. This rule ensures your gating configuration is valid so the compiler knows which components to process.
13+
O modo de gating permite adotar o React Compiler gradualmente, marcando componentes específicos para otimização. Esta regra garante que sua configuração de gating seja válida para que o compilador saiba quais componentes processar.
1414

15-
### Invalid {/*invalid*/}
15+
### Inválido {/*invalid*/}
1616

17-
Examples of incorrect code for this rule:
17+
Exemplos de código incorreto para esta regra:
1818

1919
```js
20-
// ❌ Missing required fields
20+
// ❌ Campos obrigatórios ausentes
2121
module.exports = {
2222
plugins: [
2323
['babel-plugin-react-compiler', {
2424
gating: {
2525
importSpecifierName: '__experimental_useCompiler'
26-
// Missing 'source' field
26+
// Campo 'source' ausente
2727
}
2828
}]
2929
]
3030
};
3131

32-
// ❌ Invalid gating type
32+
// ❌ Tipo de gating inválido
3333
module.exports = {
3434
plugins: [
3535
['babel-plugin-react-compiler', {
36-
gating: '__experimental_useCompiler' // Should be object
36+
gating: '__experimental_useCompiler' // Deveria ser um objeto
3737
}]
3838
]
3939
};
4040
```
4141

42-
### Valid {/*valid*/}
42+
### Válido {/*valid*/}
4343

44-
Examples of correct code for this rule:
44+
Exemplos de código correto para esta regra:
4545

4646
```js
47-
// ✅ Complete gating configuration
47+
// ✅ Configuração de gating completa
4848
module.exports = {
4949
plugins: [
5050
['babel-plugin-react-compiler', {
5151
gating: {
52-
importSpecifierName: 'isCompilerEnabled', // exported function name
53-
source: 'featureFlags' // module name
52+
importSpecifierName: 'isCompilerEnabled', // nome da função exportada
53+
source: 'featureFlags' // nome do módulo
5454
}
5555
}]
5656
]
@@ -61,11 +61,11 @@ export function isCompilerEnabled() {
6161
// ...
6262
}
6363

64-
// ✅ No gating (compile everything)
64+
// ✅ Sem gating (compila tudo)
6565
module.exports = {
6666
plugins: [
6767
['babel-plugin-react-compiler', {
68-
// No gating field - compiles all components
68+
// Sem o campo gating - compila todos os componentes
6969
}]
7070
]
7171
};

0 commit comments

Comments
 (0)