Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sangar-1028 committed Jan 25, 2024
2 parents 958bb70 + 6e2c58d commit 689a144
Show file tree
Hide file tree
Showing 1,632 changed files with 48,663 additions and 80,621 deletions.
51 changes: 50 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const restrictedImportPaths = [
{
name: 'react-native',
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable'],
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', 'Text'],
message: [
'',
"For 'useWindowDimensions', please use 'src/hooks/useWindowDimensions' instead.",
"For 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
"For 'StatusBar', please use 'src/libs/StatusBar' instead.",
"For 'Text', please use '@components/Text' instead.",
].join('\n'),
},
{
Expand All @@ -29,13 +30,45 @@ const restrictedImportPaths = [
importNames: ['CSSProperties'],
message: "Please use 'ViewStyle', 'TextStyle', 'ImageStyle' from 'react-native' instead.",
},
{
name: '@styles/index',
importNames: ['default', 'defaultStyles'],
message: 'Do not import styles directly. Please use the `useThemeStyles` hook or `withThemeStyles` HOC instead.',
},
{
name: '@styles/utils',
importNames: ['default', 'DefaultStyleUtils'],
message: 'Do not import StyleUtils directly. Please use the `useStyleUtils` hook or `withStyleUtils` HOC instead.',
},
{
name: '@styles/theme',
importNames: ['default', 'defaultTheme'],

message: 'Do not import themes directly. Please use the `useTheme` hook or `withTheme` HOC instead.',
},
{
name: '@styles/theme/illustrations',
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
},
];

const restrictedImportPatterns = [
{
group: ['**/assets/animations/**/*.json'],
message: "Do not import animations directly. Please use the 'src/components/LottieAnimations' import instead.",
},
{
group: ['@styles/theme/themes/**'],
message: 'Do not import themes directly. Please use the `useTheme` hook or `withTheme` HOC instead.',
},
{
group: ['@styles/utils/**', '!@styles/utils/FontUtils', '!@styles/utils/types'],
message: 'Do not import style util functions directly. Please use the `useStyleUtils` hook or `withStyleUtils` HOC instead.',
},
{
group: ['@styles/theme/illustrations/themes/**'],
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
},
];

module.exports = {
Expand Down Expand Up @@ -176,10 +209,26 @@ module.exports = {
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/consistent-type-exports': [
'error',
{
fixMixedExportsWithInlineTypeSpecifier: false,
},
],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'es/no-nullish-coalescing-operators': 'off',
'es/no-optional-chaining': 'off',
'valid-jsdoc': 'off',
'jsdoc/no-types': 'error',
'rulesdir/no-default-props': 'error',
'import/no-extraneous-dependencies': 'off',
'rulesdir/prefer-underscore-method': 'off',
'rulesdir/prefer-import-module-contents': 'off',
Expand Down
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
- [ ] If the PR modifies the form input styles:
- [ ] I verified that all the inputs inside a form are aligned with each other.
- [ ] I added `Design` label so the design team can review the changes.
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.

Expand Down
29 changes: 0 additions & 29 deletions .github/actions/composite/buildAndroidAPKDelta/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
name: Build an Android apk
name: Build an Android apk for e2e tests
description: Build an Android apk for an E2E test build and upload it as an artifact

inputs:
ARTIFACT_NAME:
description: The name of the workflow artifact where the APK should be uploaded
required: true
PACKAGE_SCRIPT_NAME:
description: The name of the npm script to run to build the APK
required: true
APP_OUTPUT_PATH:
description: The path to the built APK
required: true
MAPBOX_SDK_DOWNLOAD_TOKEN:
description: The token to use to download the MapBox SDK
required: true

runs:
using: composite
steps:
- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ inputs.MAPBOX_SDK_DOWNLOAD_TOKEN }}
shell: bash

- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "oracle"
java-version: "17"

- uses: ruby/setup-ruby@a05e47355e80e57b9a67566a813648fa67d92011
with:
ruby-version: "2.7"
Expand All @@ -19,11 +38,11 @@ runs:
- uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef

- name: Build APK
run: npm run android-build-e2e
run: npm run ${{ inputs.PACKAGE_SCRIPT_NAME }}
shell: bash

- name: Upload APK
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
with:
name: ${{ inputs.ARTIFACT_NAME }}
path: android/app/build/outputs/apk/e2e/release/app-e2e-release.apk
path: ${{ inputs.APP_OUTPUT_PATH }}
25 changes: 0 additions & 25 deletions .github/actions/composite/configureAwsCredentials/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Category from './Category';
import type Category from './Category';
import newComponent from './newComponentCategory';

const categories: Category[] = [newComponent];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import traverse from '@babel/traverse';
import CONST from '../../../../libs/CONST';
import GithubUtils from '../../../../libs/GithubUtils';
import promiseSome from '../../../../libs/promiseSome';
import Category from './Category';
import type Category from './Category';

type SuperClassType = {superClass: {name?: string; object: {name: string}; property: {name: string}} | null; name: string};

Expand Down
Loading

0 comments on commit 689a144

Please sign in to comment.