Skip to content

Commit

Permalink
chore(react-native): remove unnecessary eslint rule suppressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed Oct 7, 2024
1 parent fb08bc0 commit 2256f0b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const loadAmplifyPushNotification = () => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
const module = require('@aws-amplify/rtn-push-notification')?.module;
if (module) {
return module as PushNotificationModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const loadAmplifyWebBrowser = () => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
const module = require('@aws-amplify/rtn-web-browser')?.module;
if (module) {
return module as WebBrowserModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const loadAsyncStorage = (): AsyncStorageStatic => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
const module = require('@react-native-async-storage/async-storage')
?.default as AsyncStorageStatic;
if (module) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const loadGetRandomValues = () => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('react-native-get-random-values');
} catch (e) {
// The error parsing logic cannot be extract as with metro the `require`
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/src/moduleLoaders/loadNetInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const loadNetInfo = (): NetInfoModule => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
const module = require('@react-native-community/netinfo')
?.default as NetInfoModule;
if (module) {
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const loadUrlPolyfill = () => {
try {
// metro bundler requires static string for loading module.
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('react-native-url-polyfill/auto');
} catch (e) {
// The error parsing logic cannot be extract as with metro the `require`
Expand Down

0 comments on commit 2256f0b

Please sign in to comment.