Skip to content

Commit f23182f

Browse files
committed
chore: remove inline require-import eslint suppressions
1 parent 864e730 commit f23182f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,11 @@ export default defineConfig(
4141
"vitest/valid-describe-callback": "off",
4242
"vitest/no-done-callback": "warn"
4343
}
44+
},
45+
{
46+
files: ["packages/react-native/src/plugins/ReactNativeEnvironmentInfoPlugin.ts"],
47+
rules: {
48+
"@typescript-eslint/no-require-imports": "off"
49+
}
4450
}
4551
);

packages/react-native/src/plugins/ReactNativeEnvironmentInfoPlugin.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export class ReactNativeEnvironmentInfoPlugin implements IEventPlugin {
3636

3737
// Attempt to load expo-device info (optional dependency)
3838
try {
39-
// eslint-disable-next-line @typescript-eslint/no-require-imports
4039
const Device = require("expo-device") as typeof import("expo-device");
4140
if (Device) {
4241
if (Device.modelName) {
@@ -56,7 +55,6 @@ export class ReactNativeEnvironmentInfoPlugin implements IEventPlugin {
5655

5756
// Attempt to load expo-application info (optional dependency)
5857
try {
59-
// eslint-disable-next-line @typescript-eslint/no-require-imports
6058
const Application = require("expo-application") as typeof import("expo-application");
6159
if (Application) {
6260
(info.data as Record<string, unknown>).appName = Application.applicationName;
@@ -72,7 +70,6 @@ export class ReactNativeEnvironmentInfoPlugin implements IEventPlugin {
7270

7371
// Attempt to load expo-constants info (optional dependency)
7472
try {
75-
// eslint-disable-next-line @typescript-eslint/no-require-imports
7673
const Constants = require("expo-constants") as { default: (typeof import("expo-constants"))["default"] };
7774
const manifest = Constants.default?.expoConfig;
7875
if (manifest) {

0 commit comments

Comments
 (0)