Skip to content

Commit

Permalink
Merge remote-tracking branch 'react-native-webview/master' into gaspa…
Browse files Browse the repository at this point in the history
…rd/merge-upstream3

# Conflicts:
#	.github/workflows/android-ci.yml
#	.github/workflows/detox.yml
#	.github/workflows/ios-ci.yml
#	.github/workflows/macos-ci.yml
#	.github/workflows/windows-ci.yml
#	package.json
#	yarn.lock
  • Loading branch information
sparga committed Aug 27, 2024
2 parents bf3e474 + 492e376 commit 6384f90
Show file tree
Hide file tree
Showing 79 changed files with 173,013 additions and 14,762 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
lib/
babel.config.js
babel.config.js
node_modules
92 changes: 7 additions & 85 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
cache: 'npm'
node-version: 20
- 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: npm ci
shell: bash
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ 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
- name: Setup - Install NPM Dependencies
run: npm ci
- name: Setup - Install CocoaPods CLI
run: sudo gem install cocoapods -v 1.8.4
run: sudo gem install cocoapods -v 1.14.3
- name: Run tests
run: npm run ci
8 changes: 4 additions & 4 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
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: 'npm'
- name: Install npm dependencies
run: npm ci
Expand All @@ -25,7 +25,7 @@ jobs:
working-directory: example/ios
- name: Build iOS test app
run: |
device_name='iPhone 13'
device_name='iPhone 15'
device=$(xcrun simctl list devices "${device_name}" available | grep "${device_name} (")
re='\(([-0-9A-Fa-f]+)\)'
[[ $device =~ $re ]] || exit 1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
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 }}-npm-${{ hashFiles('package-lock.json') }}
node-version: 20
cache: 'npm'
- name: Install npm dependencies
run: npm ci
- name: Install macOS dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
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: 'npm'

- name: Setup MSBuild
Expand Down
9 changes: 4 additions & 5 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -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,
};
Loading

0 comments on commit 6384f90

Please sign in to comment.