Skip to content

Commit

Permalink
chore: Bump example app to 0.73 and use babel to build (#3347)
Browse files Browse the repository at this point in the history
* chore: Bump example app to 0.73 and use babel to build

Using babel enables new arch static view config to be properly generated

* Update android-ci.yml

* bump ci things

* wip

* Update detox.yml

* Update react-native.config.js

* lint tests

* clean

* Update jest.config.js

* Update WebView.android.tsx

* update lint to match create library
  • Loading branch information
Titozzz committed Mar 22, 2024
1 parent 5da785d commit b989bd6
Show file tree
Hide file tree
Showing 39 changed files with 157,209 additions and 7,271 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
@@ -1,2 +1,3 @@
lib/
babel.config.js
babel.config.js
node_modules
92 changes: 7 additions & 85 deletions .eslintrc.js
@@ -1,93 +1,15 @@
module.exports = {
// Airbnb is the base, prettier is here so that eslint doesn't conflict with prettier
extends: ['airbnb', 'prettier', 'prettier/react', 'plugin:react-hooks/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-native', 'import', '@typescript-eslint'],
extends: ['@react-native', 'prettier'],
rules: {
'no-console': 'off',
// Lines will be broken before binary operators
'operator-linebreak': ['error', 'before'],
// Allow imports from dev and peer dependencies
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true, peerDependencies: true },
],
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
// This rule doesn't play nice with Prettier
'react/jsx-one-expression-per-line': 'off',
// This rule doesn't play nice with Prettier
'react/jsx-wrap-multilines': 'off',
// Remove this rule because we only destructure props, but never state
'react/destructuring-assignment': 'off',
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'react/static-property-placement': 'off',
'react/state-in-constructor': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': [
'error',
{
default: 'array',
},
],
'@typescript-eslint/generic-type-naming': ['error', '^[a-zA-Z]+$'],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
},
],
'@typescript-eslint/no-parameter-properties': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/triple-slash-reference': [
'error',
{ path: 'never', types: 'never', lib: 'never' },
],
'@typescript-eslint/no-type-alias': [
'prettier/prettier': [
'error',
{
allowAliases: 'always',
allowCallbacks: 'always',
allowMappedTypes: 'always',
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
'@typescript-eslint/consistent-type-definitions': [
'error',
'interface',
],
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: [
'.js',
'.android.js',
'.ios.js',
'.jsx',
'.android.jsx',
'.ios.jsx',
'.tsx',
'.ts',
'.android.tsx',
'.android.ts',
'.ios.tsx',
'.ios.ts',
],
},
},
},
};
10 changes: 5 additions & 5 deletions .github/workflows/android-ci.yml
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
- name: Install npm dependencies
run: yarn --frozen-lockfile
shell: bash
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/detox.yml
Expand Up @@ -6,15 +6,16 @@ jobs:
name: 'Running tests'
runs-on: 'macOS-latest'
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: 'yarn'
- name: Setup - Install Yarn
run: YARN_GPG=NO curl -o- -L https://yarnpkg.com/install.sh | bash
- name: Setup - Install NPM Dependencies
run: yarn --frozen-lockfile
- name: Setup - Install CocoaPods CLI
run: sudo gem install cocoapods -v 1.8.4
- name: Run tests
run: yarn ci
6 changes: 3 additions & 3 deletions .github/workflows/ios-ci.yml
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Install npm dependencies
run: yarn --frozen-lockfile
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/macos-ci.yml
Expand Up @@ -9,16 +9,12 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2.5.1
uses: actions/setup-node@v4
with:
node-version: 16
- name: Cache /node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
node-version: 20
cache: 'yarn'
- name: Install npm dependencies
run: yarn --frozen-lockfile
- name: Install macOS dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-ci.yml
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: windows-2022

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout Code

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '^14'
node-version: '20'
cache: 'yarn'

- name: Setup MSBuild
Expand Down
9 changes: 4 additions & 5 deletions .prettierrc.js
@@ -1,10 +1,9 @@
// https://prettier.io/docs/en/options.html

module.exports = {
// Enables semicolons at the end of statements
semi: true,
// Formats strings with single quotes ('') instead of quotes ("")
quoteProps: 'consistent',
singleQuote: true,
// Adds a trailing comma at the end of all lists (including function arguments)
trailingComma: 'all',
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
};

0 comments on commit b989bd6

Please sign in to comment.