Skip to content

Commit

Permalink
Merge remote-tracking branch 'react-native-mapbox-gl/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
babeone committed Feb 25, 2022
2 parents 949f4f1 + e28abce commit 02d7cce
Show file tree
Hide file tree
Showing 246 changed files with 5,525 additions and 2,771 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
index.d.ts
scripts/
/plugin/build
71 changes: 70 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parser: 'babel-eslint',
plugins: ['react', 'react-native', 'prettier', 'fp', 'import'],
plugins: ['react', 'react-native', 'fp', 'import', 'prettier'],
env: {
jest: true,
},
Expand Down Expand Up @@ -86,4 +86,73 @@ module.exports = {
],
'fp/no-mutating-methods': 'warn',
},
overrides: [
// Match TypeScript Files
// =================================
{
files: ['**/*.{ts,tsx}'],

// Global ESLint Settings
// =================================
env: {
jest: true,
es6: true,
browser: true,
node: true,
},
globals: {
__DEV__: true,
element: true,
by: true,
waitFor: true, // detox e2e
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
react: {
version: 'detect', // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// default to latest and warns if missing
// It will default to "detect" in the future
},
},

// Parser Settings
parser: '@typescript-eslint/parser',
parserOptions: {
// Lint with Type Information
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
},
sourceType: 'module',
},

// Extend Other Configs
// =================================
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react-native/all',
'eslint:recommended',
'plugin:react/recommended',
'prettier',
],
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
rules: {
// turn these one to check where all the return types are missing
// and where arguments of functions are not typed
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/explicit-module-boundary-types': ['error'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['warn'],
'react/prop-types': 'off',
},
},
],
};
37 changes: 25 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,38 @@ assignees: ''

---


---------

🚨🚨🚨
* Please respect and fill out the issue template
* Before you report, please make sure you tested on a physical device
* For build issues: Can you reproduce it on a clean install of the example app? Please include full steps to reproduce from `react-native init`
* Please include standalone code sample - a single component with one MapView in it. Use [one of our example](https://github.com/react-native-mapbox-gl/maps/blob/master/example/src/examples/PointInMapView.js) screens as a starging point.
* Use gitter and/or stack overflow for questions.
* Use [discussions](https://github.com/react-native-mapbox-gl/maps/discussions) or gitter and/or stack overflow for questions.

If you want others to spend time on your issue, please make sure to first spend some time on the ticket.

Not following the above will lead to the ticket being closed.
Thanks for understanding. Please understand that the project is run by volunteers on their own free time.
Thanks for understanding.
Please understand that the project is run by volunteers on their own free time.

🚨🚨🚨
🚨🚨🚨

---------


**Describe the bug**
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
**To Reproduce**
Steps to reproduce the behavior.

Please include a single standalone React Native component. Use [one of our example](https://github.com/react-native-mapbox-gl/maps/blob/master/example/src/examples/BugReportTemplate.js) screens as a starting point.
Please simplify the example as much as possible.
Please include a single standalone React Native component.
Use [our BugReportTemplate](https://github.com/react-native-mapbox-gl/maps/blob/master/example/src/examples/BugReportTemplate.js) screens as a starting point.
Please simplify the example as much as possible!

Chances that a bug report will be investiagete and worked on are exponetially higher with a complete and _working_ repro BugTemplate!

Example:
```js
Expand Down Expand Up @@ -76,19 +84,24 @@ npm install react-native-mapbox-gl/maps#master --save
react-native run-android
```

**Expected behavior**
**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
**Actual behavior**
A clear and concise description of what is currently happening.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Versions (please complete the following information):**
**Versions (please complete the following information):**
- Platform: [e.g. Android, iOS]
- Platform OS: [e.g. Android 9, iOS 10]
- Device: [e.g. iPhone6]
- Emulator/ Simulator: [yes/ no]
- OS: [e.g. iOS8.1]
- Dev OS: [e.g. OSX 11.0.1, Win10]
- react-native-mapbox-gl Version [e.g. 7.0.9]
- Mapbox GL version [e.g. 6.3.0]
- React Native Version [e.g. 0.59]

**Additional context**
**Additional context**
Add any other context about the problem here.
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:
# root
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
labels:
- "🤖 dependabot 🤖"
open-pull-requests-limit: 99
pull-request-branch-name:
separator: "-"
ignore: # ignore updates for react-native deps, think about updating, once react-native is updated
- dependency-name: "@babel/core"
- dependency-name: "@babel/runtime"
- dependency-name: "@react-native-community/eslint-config"
- dependency-name: "eslint"
- dependency-name: "jest"
- dependency-name: "metro-react-native-babel-preset"
- dependency-name: "react-test-renderer"
- dependency-name: "react"
- dependency-name: "react-native"
- dependency-name: "jest-cli"
# example
- package-ecosystem: "npm"
directory: "/example"
schedule:
interval: "monthly"
labels:
- "🤖 dependabot 🤖"
open-pull-requests-limit: 99
pull-request-branch-name:
separator: "-"
# gh-actions workflow files
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
pull-request-branch-name:
separator: "-"
labels:
- "🤖 dependabot 🤖"
28 changes: 15 additions & 13 deletions .github/label-actions.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Configuration for Label Actions - https://github.com/dessant/label-actions
"Needs: Issue Template":
comment: >
:wave: @{issue-author}, please respect our issue template<br>required fields are missing.
# Close the issue
close: true
"question":
comment: >
:thinking: @{issue-author}, this is rather a question than an issue<br>please use our [discussions](https://github.com/react-native-mapbox-gl/maps/discussions) or [gitter](https://gitter.im/react-native-mapbox-gl/Lobby) or stackoverflow for this.
# Close the issue
close: true
"stale":
comment: >
:thinking: @{issue-author}, closing the issue for lack of activity, if the issue still persist, pls open a new one with steps to reproduce on recent versions
# Close the issue
close: true

issues:
actions:
# our issue template is not respected - required fields are missing
"Needs: Issue Template":
comment: >
:wave: @{issue-author}, please respect our issue template<br>required fields are missing.
# Close the issue
close: true
"question":
comment: >
:thinking: @{issue-author}, this is rather a question than an issue<br>please use our [gitter](https://gitter.im/react-native-mapbox-gl/Lobby) or stackoverflow for this.
# Close the issue
close: true
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Hi there and thank you for your change proposal!
Please fill out the following template to make the review process
as quick and smooth as possible.
-->

## Description

Fixes #<issue-number>

<!-- OR, if you're implementing a new feature: -->

Added `your feature` that allows ...

## Checklist

<!-- Check completed item: [X] -->

- [ ] I have tested this on a device/simulator for each compatible OS
- [ ] I formatted JS and TS files with running `yarn lint:fix` in the root folder
- [ ] I updated the documentation with running `yarn generate` in the root folder
- [ ] I mentioned this change in `CHANGELOG.md`
- [ ] I updated the typings files (`index.d.ts`)
- [ ] I added/ updated a sample (`/example`)

## Screenshot OR Video

<!-- If it's a visual PR, we appreciate a screenshot or video -->
40 changes: 40 additions & 0 deletions .github/workflows/android-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Android Build

on:
workflow_call:
inputs:
NVMRC:
required: true
type: string
secrets:
MAPBOX_ACCESS_TOKEN:
required: true

jobs:
build_example:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup node ${{ inputs.NVMRC }}
uses: actions/[email protected]
with:
node-version: ${{ inputs.NVMRC }}

- name: Setup JDK zulu 11
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '11'

- run: echo $MAPBOX_ACCESS_TOKEN > ./accesstoken
working-directory: example
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}

- run: yarn install --network-timeout 1000000
working-directory: example

- run: ./gradlew assemble
working-directory: example/android
51 changes: 51 additions & 0 deletions .github/workflows/ios-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: iOS Build & Detox

on:
workflow_call:
inputs:
NVMRC:
required: true
type: string
secrets:
MAPBOX_ACCESS_TOKEN:
required: true

jobs:
build:
runs-on: macos-latest
timeout-minutes: 25

defaults:
run:
working-directory: ./example

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Access Token
run: echo $MAPBOX_ACCESS_TOKEN > ./accesstoken
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}

- name: Setup node ${{ inputs.NVMRC }}
uses: actions/[email protected]
with:
node-version: ${{ inputs.NVMRC }}

- name: Install Yarn Dependencies
run: yarn install --network-timeout 1000000

- name: Install Pod Dependencies
run: cd ios && pod install

- name: Install Detox Dependencies
run: |
brew tap wix/brew
brew install applesimutils
- name: Build for detox
run: yarn detox build

- name: Test with detox
run: yarn detox test --debug-synchronization 200
17 changes: 17 additions & 0 deletions .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configuration for Label Actions - https://github.com/dessant/label-actions

name: "Label Actions"

on:
issues:
types: labeled

permissions:
contents: read
issues: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
Loading

0 comments on commit 02d7cce

Please sign in to comment.