Skip to content

Commit

Permalink
Merge pull request #347 from obytes/upgrade-deps
Browse files Browse the repository at this point in the history
Upgrade Dependencies and Development Dependencies
  • Loading branch information
yjose authored Aug 27, 2024
2 parents 7b01a73 + 37942f8 commit b1074da
Show file tree
Hide file tree
Showing 21 changed files with 2,744 additions and 2,582 deletions.
105 changes: 43 additions & 62 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,60 @@
const path = require('path');

module.exports = {
// Configuration for JavaScript files
extends: ['@react-native-community', 'plugin:prettier/recommended'],
plugins: ['unicorn'],
extends: ['expo','plugin:tailwindcss/recommended', 'prettier'],
plugins: [
'unicorn',
'@typescript-eslint',
'unused-imports',
'tailwindcss',
'simple-import-sort',
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'prettier/prettier': [
'unicorn/filename-case': [
'error',
{
singleQuote: true,
endOfLine: 'auto',
case: 'kebabCase',
ignore: ['/android', '/ios'],
},
],
'unicorn/filename-case': [
'max-params': ['error', 3], // Limit the number of parameters in a function to use object instead
'max-lines-per-function': ['error', 70],
'react/display-name': 'off',
'react/no-inline-styles': 'off',
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
'react/require-default-props': 'off', // Allow non-defined react props as undefined
'@typescript-eslint/comma-dangle': 'off', // Avoid conflict rule between Eslint and Prettier
'@typescript-eslint/consistent-type-imports': ['warn', {
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
disallowTypeAnnotations: true,
},
], // Ensure `import type` is used when it's necessary
'import/prefer-default-export': 'off', // Named export is easier to refactor automatically
'tailwindcss/classnames-order': [
'warn',
{
officialSorting: true,
},
], // Follow the same ordering as the official plugin `prettier-plugin-tailwindcss`
'simple-import-sort/imports': 'error', // Import configuration for `eslint-plugin-simple-import-sort`
'simple-import-sort/exports': 'error', // Export configuration for `eslint-plugin-simple-import-sort`
'@typescript-eslint/no-unused-vars': 'off',
'tailwindcss/no-custom-classname': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
case: 'kebabCase',
ignore: ['/android', '/ios'],
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
overrides: [
// Configuration for TypeScript files
{
files: ['**/*.ts', '**/*.tsx', '**/*.js'],
plugins: [
'@typescript-eslint',
'unused-imports',
'tailwindcss',
'simple-import-sort',
],
extends: [
'plugin:tailwindcss/recommended',
'@react-native-community',
'plugin:prettier/recommended',
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
endOfLine: 'auto',
},
],
'max-params': ['error', 3], // Limit the number of parameters in a function to use object instead
'max-lines-per-function': ['error', 70],
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
'react/require-default-props': 'off', // Allow non-defined react props as undefined
'@typescript-eslint/comma-dangle': 'off', // Avoid conflict rule between Eslint and Prettier
'@typescript-eslint/consistent-type-imports': 'error', // Ensure `import type` is used when it's necessary
'import/prefer-default-export': 'off', // Named export is easier to refactor automatically
'tailwindcss/classnames-order': [
'warn',
{
officialSorting: true,
},
], // Follow the same ordering as the official plugin `prettier-plugin-tailwindcss`
'simple-import-sort/imports': 'error', // Import configuration for `eslint-plugin-simple-import-sort`
'simple-import-sort/exports': 'error', // Export configuration for `eslint-plugin-simple-import-sort`
'@typescript-eslint/no-unused-vars': 'off',
'tailwindcss/no-custom-classname': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
// Configuration for translations files (i18next)
{
files: ['src/translations/*.json'],
Expand Down
1 change: 1 addition & 0 deletions env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env node */
/*
* Env file to load and validate env variables
* Be cautious; this file should not be imported into your source folder.
Expand Down
8 changes: 0 additions & 8 deletions index.js

This file was deleted.

4 changes: 2 additions & 2 deletions ios/ObytesApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.obytes.development;
PRODUCT_NAME = "ObytesApp";
PRODUCT_NAME = ObytesApp;
SWIFT_OBJC_BRIDGING_HEADER = "ObytesApp/ObytesApp-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -400,7 +400,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.obytes.development;
PRODUCT_NAME = "ObytesApp";
PRODUCT_NAME = ObytesApp;
SWIFT_OBJC_BRIDGING_HEADER = "ObytesApp/ObytesApp-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
29 changes: 24 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ PODS:
- ExpoModulesCore
- ExpoHead (3.5.23):
- ExpoModulesCore
- ExpoImage (1.12.14):
- ExpoImage (1.12.15):
- ExpoModulesCore
- libavif/libdav1d
- SDWebImage (~> 5.19.1)
Expand Down Expand Up @@ -1258,9 +1258,28 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-mmkv (2.6.3):
- MMKV (>= 1.2.13)
- react-native-mmkv (2.12.2):
- DoubleConversion
- glog
- hermes-engine
- MMKV (>= 1.3.3)
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-restart (0.0.27):
- React-Core
- react-native-safe-area-context (4.10.5):
Expand Down Expand Up @@ -1857,7 +1876,7 @@ SPEC CHECKSUMS:
ExpoFileSystem: 80bfe850b1f9922c16905822ecbf97acd711dc51
ExpoFont: e7f2275c10ca8573c991e007329ad6bf98086485
ExpoHead: fcb28a68ed4ba28f177394d2dfb8a0a8824cd103
ExpoImage: 3c5df709b5cbefd000bad6fe5dcf2172faee838e
ExpoImage: f77df382153d716f332f974438a803c4527f60b0
ExpoKeepAwake: 3b8815d9dd1d419ee474df004021c69fdd316d08
ExpoLocalization: f04eeec2e35bed01ab61c72ee1768ec04d093d01
ExpoModulesCore: d15ce10fea70ab650230feb69f45bb208d3a6596
Expand Down Expand Up @@ -1898,7 +1917,7 @@ SPEC CHECKSUMS:
React-logger: 257858bd55f3a4e1bc0cf07ddc8fb9faba6f8c7c
React-Mapbuffer: 6c1cacdbf40b531f549eba249e531a7d0bfd8e7f
react-native-keyboard-controller: c75b089682989b812d2d077665befac3f36fb70b
react-native-mmkv: 2e5bf67513cc8deed86fcffe87e12b8cc250dfab
react-native-mmkv: 8c9a677e64a1ac89b0c6cf240feea528318b3074
react-native-restart: 7595693413fe3ca15893702f2c8306c62a708162
react-native-safe-area-context: a240ad4b683349e48b1d51fed1611138d1bdad97
React-nativeconfig: ba9a2e54e2f0882cf7882698825052793ed4c851
Expand Down
2 changes: 2 additions & 0 deletions setup.ts → jest-setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@testing-library/react-native/extend-expect';

// react-hook form setup for testing
// @ts-ignore
global.window = {};
Expand Down
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: [
'@testing-library/react-native/extend-expect',
'<rootDir>/setup.ts',
'<rootDir>/jest-setup.ts',
],
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
collectCoverageFrom: [
Expand Down
2 changes: 2 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-env node */

const { getDefaultConfig } = require('expo/metro-config');
const { withNativeWind } = require('nativewind/metro');

Expand Down
50 changes: 23 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,73 +39,70 @@
},
"dependencies": {
"@expo/metro-runtime": "^3.2.3",
"@gorhom/bottom-sheet": "^4.6.3",
"@hookform/resolvers": "^2.9.11",
"@react-navigation/bottom-tabs": "^6.5.20",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@gorhom/bottom-sheet": "4.6.3",
"@hookform/resolvers": "^3.9.0",
"@shopify/flash-list": "1.6.4",
"@tanstack/react-query": "^5.37.1",
"@tanstack/react-query": "^5.52.1",
"app-icon-badge": "^0.0.15",
"axios": "^1.7.1",
"axios": "^1.7.5",
"expo": "~51.0.31",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.25",
"expo-font": "~12.0.9",
"expo-image": "~1.12.14",
"expo-image": "~1.12.15",
"expo-linking": "~6.3.1",
"expo-localization": "~15.0.3",
"expo-router": "~3.5.23",
"expo-splash-screen": "0.27.5",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"i18next": "^22.5.1",
"i18next": "^23.14.0",
"lodash.memoize": "^4.1.2",
"moti": "^0.28.1",
"nativewind": "^4.0.36",
"moti": "^0.29.0",
"nativewind": "^4.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.51.4",
"react-i18next": "^12.3.1",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.53.0",
"react-i18next": "^15.0.1",
"react-native": "0.74.5",
"react-native-flash-message": "^0.4.2",
"react-native-gesture-handler": "~2.16.2",
"react-native-keyboard-controller": "^1.13.2",
"react-native-mmkv": "2.6.3",
"react-native-mmkv": "~2.12.2",
"react-native-reanimated": "~3.10.1",
"react-native-restart": "0.0.27",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "~3.31.1",
"react-native-svg": "15.2.0",
"react-native-web": "~0.19.11",
"react-native-svg": "~15.2.0",
"react-native-web": "~0.19.12",
"react-query-kit": "^3.3.0",
"tailwind-variants": "^0.1.20",
"tailwind-variants": "^0.2.1",
"zod": "^3.23.8",
"zustand": "^4.5.2"
"zustand": "^4.5.5"
},
"devDependencies": {
"@babel/core": "^7.24.5",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@dev-plugins/react-navigation": "^0.0.6",
"@dev-plugins/react-query": "^0.0.6",
"@dev-plugins/react-query": "^0.0.7",
"@expo/config": "~9.0.2",
"@react-native-community/eslint-config": "^3.2.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react-native": "^12.5.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react-native": "^12.6.0",
"@types/i18n-js": "^3.8.9",
"@types/jest": "^29.5.12",
"@types/lodash.memoize": "^4.1.9",
"@types/react": "~18.2.79",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"babel-plugin-module-resolver": "^5.0.2",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-expo": "^7.1.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-i18n-json": "^4.0.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tailwindcss": "^3.15.2",
"eslint-plugin-testing-library": "^6.2.2",
Expand All @@ -119,8 +116,7 @@
"lint-staged": "^13.3.0",
"metro-babel-register": "^0.73.10",
"np": "^7.7.0",
"prettier": "^2.8.8",
"react-test-renderer": "^18.3.1",
"prettier": "^3.3.3",
"tailwindcss": "3.3.2",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
Expand Down
Loading

0 comments on commit b1074da

Please sign in to comment.