chore(suite-native): keep no-extraneous-dependencies rule enabled but allow devDependencies where needed

This commit is contained in:
Matej Kriz
2025-12-12 17:24:47 +01:00
committed by Matěj Kříž
parent f3f84f02de
commit b4b66eef76
5 changed files with 23 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
import { eslint, globalNoExtraneousDependenciesDevDependencies } from '@trezor/eslint';
export default [
...eslint,
{
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
...globalNoExtraneousDependenciesDevDependencies,
'**/metro.config.js',
'**/useRozenitePlugins.ts',
],
},
],
},
},
];

View File

@@ -1,6 +1,5 @@
/* eslint-disable require-await */
// eslint-disable-next-line import/no-extraneous-dependencies
const { withRozenite } = require('@rozenite/metro');
const { withRozeniteReduxDevTools } = require('@rozenite/redux-devtools-plugin/metro');
const { getSentryExpoConfig } = require('@sentry/react-native/metro');

View File

@@ -133,6 +133,7 @@
"react-native-ble-plx": "patch:react-native-ble-plx@npm%3A3.5.0#~/.yarn/patches/react-native-ble-plx-npm-3.5.0-c98fd0ae25.patch",
"react-native-edge-to-edge": "1.7.0",
"react-native-gesture-handler": "2.29.0",
"react-native-get-random-values": "^2.0.0",
"react-native-keyboard-controller": "1.19.2",
"react-native-launch-arguments": "^4.1.1",
"react-native-mmkv": "~4.0.0",
@@ -174,8 +175,8 @@
"@suite-native/storybook": "workspace:*",
"@suite-native/test-utils": "workspace:*",
"@trezor/connect-mobile": "workspace:^",
"@trezor/eslint": "workspace:*",
"@types/node": "22.13.10",
"@types/react-native-get-random-values": "1.8.2",
"babel-jest": "29.7.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-preset-expo": "~54.0.6",
@@ -184,7 +185,6 @@
"expo-atlas": "0.4.3",
"jest": "29.7.0",
"jest-junit": "^16.0.0",
"react-native-get-random-values": "^1.11.0",
"react-native-performance": "^5.1.4",
"ts-jest": "29.4.1",
"ts-node": "^10.9.2",

View File

@@ -1,6 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
//This rule has to be disabled, because we are importing rozenite plugins that are present only in package devDependencies.
import 'react-native-get-random-values';
import { MMKV } from 'react-native-mmkv';

View File

@@ -109,7 +109,8 @@
{ "path": "../test-utils" },
{
"path": "../../packages/connect-mobile"
}
},
{ "path": "../../packages/eslint" }
],
"include": [".", "**/*.json"]
}