Skip to content

Commit fd0770d

Browse files
authored
Merge branch 'rnmapbox:main' into master
2 parents 02d7cce + 97459e2 commit fd0770d

739 files changed

Lines changed: 51218 additions & 17363 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 23 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
root: true,
3-
parser: 'babel-eslint',
4-
plugins: ['react', 'react-native', 'fp', 'import', 'prettier'],
3+
parser: '@babel/eslint-parser',
4+
plugins: ['react', 'react-native', 'import'],
55
env: {
66
jest: true,
77
},
@@ -38,8 +38,9 @@ module.exports = {
3838
extends: [
3939
'eslint:recommended',
4040
'plugin:react/recommended',
41-
'prettier',
41+
'plugin:jest/recommended',
4242
'@react-native-community',
43+
'prettier',
4344
],
4445
rules: {
4546
'react/no-deprecated': 'warn',
@@ -59,7 +60,7 @@ module.exports = {
5960
'no-console': [0],
6061
'import/prefer-default-export': 'off',
6162
'jsx-a11y/href-no-hash': 'off',
62-
'react/prop-types': [2],
63+
'react/prop-types': [0],
6364
quotes: [2, 'single'],
6465
'eol-last': [0],
6566
'no-continue': [1],
@@ -73,85 +74,37 @@ module.exports = {
7374
'no-underscore-dangle': [0],
7475
'no-await-in-loop': 0,
7576
'no-restricted-syntax': 0,
76-
'no-use-before-define': ['error', {functions: false}],
77-
'no-unused-expressions': ['error', {allowTaggedTemplates: true}],
78-
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
79-
'prettier/prettier': [
80-
'error',
81-
{
82-
singleQuote: true,
83-
trailingComma: 'all',
84-
bracketSpacing: false,
85-
},
86-
],
87-
'fp/no-mutating-methods': 'warn',
77+
'no-use-before-define': ['error', { functions: false }],
78+
'no-unused-expressions': ['error', { allowTaggedTemplates: true }],
79+
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
80+
'react-native/no-inline-styles': 0,
81+
'@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
8882
},
83+
ignorePatterns: ['**/rnmapbox.web.symlink', 'plugin/build/'],
8984
overrides: [
90-
// Match TypeScript Files
91-
// =================================
9285
{
86+
// Match TypeScript Files
9387
files: ['**/*.{ts,tsx}'],
9488

95-
// Global ESLint Settings
96-
// =================================
97-
env: {
98-
jest: true,
99-
es6: true,
100-
browser: true,
101-
node: true,
102-
},
103-
globals: {
104-
__DEV__: true,
105-
element: true,
106-
by: true,
107-
waitFor: true, // detox e2e
108-
},
109-
settings: {
110-
'import/resolver': {
111-
node: {
112-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
113-
},
114-
},
115-
react: {
116-
version: 'detect', // React version. "detect" automatically picks the version you have installed.
117-
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
118-
// default to latest and warns if missing
119-
// It will default to "detect" in the future
120-
},
121-
},
122-
123-
// Parser Settings
124-
parser: '@typescript-eslint/parser',
12589
parserOptions: {
126-
// Lint with Type Information
127-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
128-
tsconfigRootDir: __dirname,
129-
project: './tsconfig.json',
130-
ecmaFeatures: {
131-
experimentalObjectRestSpread: true,
132-
jsx: true,
133-
},
134-
sourceType: 'module',
90+
project: [
91+
'./tsconfig.json',
92+
'./example/tsconfig.json',
93+
'./plugin/src/__tests__/tsconfig.eslint.json',
94+
],
13595
},
136-
137-
// Extend Other Configs
138-
// =================================
96+
plugins: ['@typescript-eslint'],
13997
extends: [
140-
'plugin:@typescript-eslint/recommended',
141-
'plugin:react-native/all',
14298
'eslint:recommended',
14399
'plugin:react/recommended',
100+
'@react-native-community',
101+
'plugin:@typescript-eslint/recommended',
144102
'prettier',
145103
],
146-
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
147104
rules: {
148-
// turn these one to check where all the return types are missing
149-
// and where arguments of functions are not typed
150-
'@typescript-eslint/explicit-function-return-type': ['error'],
151-
'@typescript-eslint/explicit-module-boundary-types': ['error'],
152-
'no-use-before-define': 'off',
153-
'@typescript-eslint/no-use-before-define': ['warn'],
154-
'react/prop-types': 'off',
105+
'no-shadow': 'off',
106+
'import/named': 'off',
107+
'react-native/no-inline-styles': 0,
155108
},
156109
},
157110
],

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 107 deletions
This file was deleted.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Bug Report
2+
description: This template should be used for reporting bugs and defects.
3+
title: "[Bug]: "
4+
labels: 'bug :beetle:'
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: dropdown
11+
id: mapbox-implementation
12+
attributes:
13+
label: Mapbox Implementation
14+
description: |-
15+
Check `RNMapboxMapsImpl` in your Podfile/gradle files. Defaults to `Maplibre`.
16+
options:
17+
- Mapbox
18+
- Mapbox GL
19+
- Maplibre
20+
validations:
21+
required: true
22+
- type: input
23+
id: mapbox-version
24+
attributes:
25+
label: Mapbox Version
26+
description: |-
27+
Check `RNMapboxMapsVersion` in your Podfile/gradle files, set to `default` if you don't cusomize the version
28+
placeholder: 10.7.0
29+
validations:
30+
required: true
31+
- type: dropdown
32+
id: platform
33+
attributes:
34+
label: Platform
35+
multiple: true
36+
description: |-
37+
The platform where you experience the issue
38+
options:
39+
- iOS
40+
- Android
41+
validations:
42+
required: true
43+
- type: input
44+
id: rnmapbox-version
45+
attributes:
46+
label: "`@rnmapbox/maps` version"
47+
description: |-
48+
The version of `@rnmapbox/maps`, such as `#main`, `10.0.0-beta.32`
49+
value: 10.0.0-beta.11
50+
validations:
51+
required: true
52+
- type: textarea
53+
attributes:
54+
label: Standalone component to reproduce
55+
description: |-
56+
- Use [our BugReportTemplate](https://github.com/rnmapbox/maps/blob/main/example/src/examples/BugReportExample.js) screens as a starting point.
57+
- Component should be self contained - no extra libraries, external data, no parameters
58+
- Do not include setAccessToken or access token istelf.
59+
value: |-
60+
```javascript
61+
import React from 'react';
62+
import {
63+
MapView,
64+
ShapeSource,
65+
LineLayer,
66+
Camera,
67+
} from '@rnmapbox/maps';
68+
69+
const aLine = {
70+
type: 'LineString',
71+
coordinates: [
72+
[-74.00597, 40.71427],
73+
[-74.00697, 40.71527],
74+
],
75+
};
76+
77+
class BugReportExample extends React.Component {
78+
render() {
79+
return (
80+
<MapView style={{flex: 1}}>
81+
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
82+
<ShapeSource id="idStreetLayer" shape={aLine}>
83+
<LineLayer id="idStreetLayer" />
84+
</ShapeSource>
85+
</MapView>
86+
);
87+
}
88+
}
89+
```
90+
validations:
91+
required: true
92+
- type: textarea
93+
attributes:
94+
label: Observed behavior and steps to reproduce
95+
description: |-
96+
- Please include as much evidence as possible (traces, videos, screenshots etc.)
97+
- type: textarea
98+
attributes:
99+
label: Expected behavior
100+
description: |-
101+
- Please include the expected behavior and any resources supporting this expected behavior.
102+
- type: textarea
103+
attributes:
104+
label: Notes / preliminary analysis
105+
description: |-
106+
- include your initial analysis, if available
107+
- type: textarea
108+
attributes:
109+
label: Additional links and references
110+
description: |-
111+
- Links to traces, videos et
112+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Setup/installation error
3+
about: This template should be used for reporting bugs and defects with project setup
4+
labels: 'bug-setup :beetle:'
5+
assignees: ''
6+
---
7+
8+
9+
## Environment
10+
- Dev OS: [e.g. OSX 11.0.1, Win10]
11+
12+
## Steps to reproduce
13+
14+
<!--- We don't troubleshoot existing projects, please reproduce the issue in a brand new project. If you can't then create a new working project and compare with the one you're having trouble with. --->
15+
16+
```sh
17+
react-native init sample --version react-native@0.60.5
18+
cd sample
19+
npm install rnmapbox/maps#main --save
20+
# or released version `npm install @rnmapbox/maps@8.0.0-rc1 --save`
21+
react-native run-android
22+
```
23+

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Feature Request
3+
about: To request a new feature, please provide detail on the outcome desired, solutions attempted and any suggested approaches.
4+
title: ''
5+
labels: 'feature :green apple:'
6+
assignees: ''
7+
8+
---
9+
10+
## New Feature
11+
<- Description of the feature being requested and any outcomes desired, an example use case, and any suggestions for solution ->
12+
13+
## Why
14+
<- 1-2 sentence description of why you're requesting this feature. What problem does it solve? Why is it valuable? ->
15+

0 commit comments

Comments
 (0)