File tree 3 files changed +4
-4
lines changed
packages/eslint-plugin-react-native
src/rules/i18n-avoid-global-imports
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ module.exports = {
27
27
plugins: ['@getluko/react-native'],
28
28
rules: {
29
29
'@getluko/react-native/lower-dash-case-test-id': 1,
30
- '@getluko/react-native/i18n-avoid-global-imports: 1 ,
30
+ '@getluko/react-native/i18n-avoid-global-imports: 2 ,
31
31
}
32
32
```
33
33
Original file line number Diff line number Diff line change @@ -18,10 +18,9 @@ const MyComponent = () => {
18
18
` ,
19
19
`
20
20
import i18n from '@locales/i18n';
21
- const getTabData = () => [
21
+ const getData = () => [
22
22
{
23
- title: stringCapitalize(i18n.t('home.electricity.hours')),
24
- scene: <DebugChart temporality="daily" />,
23
+ title: i18n.t('home.electricity.hours'),
25
24
},
26
25
]
27
26
` ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const hasTranslatePropertyIdentifier = (
19
19
return (
20
20
"parent" in node &&
21
21
"property" in node . parent &&
22
+ "name" in node . parent . property &&
22
23
node . parent . property . name === "t"
23
24
) ;
24
25
} ;
You can’t perform that action at this time.
0 commit comments