From 2256f0b8fca47ddecfbee9a85e14ce244609a865 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Mon, 7 Oct 2024 08:28:45 -0700 Subject: [PATCH] chore(react-native): remove unnecessary eslint rule suppressing comments --- .../src/moduleLoaders/loadAmplifyPushNotification.ts | 1 - packages/react-native/src/moduleLoaders/loadAmplifyWebBrowser.ts | 1 - packages/react-native/src/moduleLoaders/loadAsyncStorage.ts | 1 - packages/react-native/src/moduleLoaders/loadGetRandomValues.ts | 1 - packages/react-native/src/moduleLoaders/loadNetInfo.ts | 1 - packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts | 1 - 6 files changed, 6 deletions(-) diff --git a/packages/react-native/src/moduleLoaders/loadAmplifyPushNotification.ts b/packages/react-native/src/moduleLoaders/loadAmplifyPushNotification.ts index 68ef2bd92a3..a86697e4e8c 100644 --- a/packages/react-native/src/moduleLoaders/loadAmplifyPushNotification.ts +++ b/packages/react-native/src/moduleLoaders/loadAmplifyPushNotification.ts @@ -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; diff --git a/packages/react-native/src/moduleLoaders/loadAmplifyWebBrowser.ts b/packages/react-native/src/moduleLoaders/loadAmplifyWebBrowser.ts index 7db6d24054d..2c98a39f8f6 100644 --- a/packages/react-native/src/moduleLoaders/loadAmplifyWebBrowser.ts +++ b/packages/react-native/src/moduleLoaders/loadAmplifyWebBrowser.ts @@ -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; diff --git a/packages/react-native/src/moduleLoaders/loadAsyncStorage.ts b/packages/react-native/src/moduleLoaders/loadAsyncStorage.ts index f2ebe41fad6..ae5de3ec2bd 100644 --- a/packages/react-native/src/moduleLoaders/loadAsyncStorage.ts +++ b/packages/react-native/src/moduleLoaders/loadAsyncStorage.ts @@ -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) { diff --git a/packages/react-native/src/moduleLoaders/loadGetRandomValues.ts b/packages/react-native/src/moduleLoaders/loadGetRandomValues.ts index 97b3d3ec973..53d3320b99b 100644 --- a/packages/react-native/src/moduleLoaders/loadGetRandomValues.ts +++ b/packages/react-native/src/moduleLoaders/loadGetRandomValues.ts @@ -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` diff --git a/packages/react-native/src/moduleLoaders/loadNetInfo.ts b/packages/react-native/src/moduleLoaders/loadNetInfo.ts index 22a59c5dd3d..def2c04c602 100644 --- a/packages/react-native/src/moduleLoaders/loadNetInfo.ts +++ b/packages/react-native/src/moduleLoaders/loadNetInfo.ts @@ -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) { diff --git a/packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts b/packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts index 974f4d5f3d8..39393732d06 100644 --- a/packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts +++ b/packages/react-native/src/moduleLoaders/loadUrlPolyfill.ts @@ -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`