Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Clean up dependencies of apps dependent on the common-app #6923

Merged
merged 17 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/example-android-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [apps/fabric-example]
fail-fast: false
env:
WORKING_DIRECTORY: apps/fabric-example
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
group: android-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
Expand All @@ -50,5 +48,5 @@ jobs:
run: yarn install --immutable

- name: Build app
working-directory: ${{ matrix.working-directory }}/android
working-directory: ${{ env.WORKING_DIRECTORY }}/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a
12 changes: 5 additions & 7 deletions .github/workflows/example-ios-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: macos-14
strategy:
matrix:
working-directory: [apps/fabric-example]
fail-fast: false
env:
WORKING_DIRECTORY: apps/fabric-example
concurrency:
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
group: ios-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
Expand All @@ -51,11 +49,11 @@ jobs:
run: yarn install --immutable
# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install Pods
working-directory: ${{ matrix.working-directory }}/ios
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
run: |
bundle install
bundle exec pod install

- name: Build app
working-directory: ${{ matrix.working-directory }}
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn react-native run-ios --no-packager
4 changes: 3 additions & 1 deletion .github/workflows/example-macos-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:

- name: Install Pods
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
run: bundle install && bundle exec pod update # There's some bug on the macOS runners for pod installation and this is the workaround.
run: |
bundle install
bundle exec pod install

- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/example-typescript-check-and-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Example Typescript check and lint
env:
YARN_ENABLE_HARDENED_MODE: 0
TYPE_CHECK_DIRECTORIES: >-
apps/common-app
apps/tvos-example
MatiPl01 marked this conversation as resolved.
Show resolved Hide resolved
on:
pull_request:
merge_group:
Expand Down Expand Up @@ -47,14 +50,11 @@ jobs:

- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory != 'apps/web-example' }}
if: ${{ contains(env.TYPE_CHECK_DIRECTORIES, matrix.working-directory) }}
run: yarn tsc --noEmit
- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory == 'apps/web-example' }}
MatiPl01 marked this conversation as resolved.
Show resolved Hide resolved
run: yarn tsc --noEmit --baseUrl ../..
- name: Lint
working-directory: ${{ matrix.working-directory }}
if: ${{ contains(env.TYPE_CHECK_DIRECTORIES, matrix.working-directory) }}
run: yarn lint
- name: Build WebExample
working-directory: ${{ matrix.working-directory }}
Expand Down

This file was deleted.

86 changes: 46 additions & 40 deletions apps/common-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,58 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:perfectionist/recommended-natural',
'prettier',
],
parser: '@typescript-eslint/parser',
overrides: [
{
extends: [
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/member-ordering': [
'error',
{ default: ['signature', 'method', 'constructor', 'field'] },
],
'@typescript-eslint/naming-convention': [
2,
{
format: ['PascalCase'],
selector: 'enumMember',
},
],
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreIIFE: true,
ignoreVoid: true,
},
],
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/prefer-nullish-coalescing': [
'error',
{
ignoreConditionalTests: true,
ignoreMixedLogicalExpressions: true,
},
],
},
},
],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 2021,
},
plugins: [
'react',
Expand All @@ -27,40 +69,10 @@ module.exports = {
'simple-import-sort',
'no-relative-import-paths',
'perfectionist',
'@typescript-eslint',
'prettier',
],
root: true,
rules: {
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/member-ordering': [
'error',
{ default: ['signature', 'method', 'constructor', 'field'] },
],
'@typescript-eslint/naming-convention': [
2,
{
format: ['PascalCase'],
selector: 'enumMember',
},
],
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreIIFE: true,
ignoreVoid: true,
},
],
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/prefer-nullish-coalescing': [
'error',
{
ignoreConditionalTests: true,
ignoreMixedLogicalExpressions: true,
},
],
camelcase: [
'error',
{
Expand Down Expand Up @@ -179,12 +191,6 @@ module.exports = {
'no-regex-spaces': ['error'],
'no-relative-import-paths/no-relative-import-paths': [
'warn',
{
allowSameFolder: true,
allowedDepth: 1,
prefix: '~',
rootDir: 'src/apps',
},
{ allowSameFolder: true, allowedDepth: 1, prefix: '@', rootDir: 'src' },
],
'no-return-assign': ['error', 'except-parens'],
Expand Down
Loading
Loading