Browse Source

Run new prettier config over the codebase

Mathieu Acthernoene 6 years ago
parent
commit
55634b4c80
6 changed files with 167 additions and 176 deletions
  1. 10
    10
      .github/CODE_OF_CONDUCT.md
  2. 7
    7
      .github/ISSUE_TEMPLATE.md
  3. 55
    56
      README.md
  4. 2
    2
      index.js
  5. 40
    44
      lib/permissions.android.js
  6. 53
    57
      lib/permissions.ios.js

+ 10
- 10
.github/CODE_OF_CONDUCT.md View File

@@ -14,21 +14,21 @@ and orientation.
14 14
 Examples of behavior that contributes to creating a positive environment
15 15
 include:
16 16
 
17
-* Using welcoming and inclusive language
18
-* Being respectful of differing viewpoints and experiences
19
-* Gracefully accepting constructive criticism
20
-* Focusing on what is best for the community
21
-* Showing empathy towards other community members
17
+- Using welcoming and inclusive language
18
+- Being respectful of differing viewpoints and experiences
19
+- Gracefully accepting constructive criticism
20
+- Focusing on what is best for the community
21
+- Showing empathy towards other community members
22 22
 
23 23
 Examples of unacceptable behavior by participants include:
24 24
 
25
-* The use of sexualized language or imagery and unwelcome sexual attention or
25
+- The use of sexualized language or imagery and unwelcome sexual attention or
26 26
   advances
27
-* Trolling, insulting/derogatory comments, and personal or political attacks
28
-* Public or private harassment
29
-* Publishing others' private information, such as a physical or electronic
27
+- Trolling, insulting/derogatory comments, and personal or political attacks
28
+- Public or private harassment
29
+- Publishing others' private information, such as a physical or electronic
30 30
   address, without explicit permission
31
-* Other conduct which could reasonably be considered inappropriate in a
31
+- Other conduct which could reasonably be considered inappropriate in a
32 32
   professional setting
33 33
 
34 34
 ## Our Responsibilities

+ 7
- 7
.github/ISSUE_TEMPLATE.md View File

@@ -9,13 +9,13 @@ be closed if it doesn't provide the informations required.
9 9
 
10 10
 ### Describe your environment
11 11
 
12
-* React-Native version
13
-* Platform: iOS, Android, both?
14
-* Device (which one?), simulator?
15
-* OS version
16
-* react-native-permissions version
17
-* Devtools: Xcode? Android Studio version?
18
-* (Android only: buildToolsVersion)
12
+- react-native-permissions version
13
+- react-native version
14
+- Target platform: iOS, Android, both?
15
+- Device (which one?), simulator?
16
+- OS version
17
+- DevTools: Xcode version, Android Studio version
18
+- (Android only: buildToolsVersion)
19 19
 
20 20
 ### How to repeat issue and example
21 21
 

+ 55
- 56
README.md View File

@@ -18,12 +18,12 @@ _Complies with
18 18
 
19 19
 ## ⚠️ Breaking changes in version 1.0.0
20 20
 
21
-* Now using React Native's own JS `PermissionsAndroid` module on Android, which
21
+- Now using React Native's own JS `PermissionsAndroid` module on Android, which
22 22
   is great because we no longer have to do any additional linking on Android
23
-* Updated API to be closer to React Native's `PermissionsAndroid`
24
-* Removed `openSettings()` support on Android (to stay linking-free). There are
23
+- Updated API to be closer to React Native's `PermissionsAndroid`
24
+- Removed `openSettings()` support on Android (to stay linking-free). There are
25 25
   several NPM modules available for this
26
-* `restricted` status now supported on Android, although it means something
26
+- `restricted` status now supported on Android, although it means something
27 27
   different than iOS
28 28
 
29 29
 ## Setup
@@ -60,13 +60,12 @@ react-native link react-native-permissions
60 60
    folder ➜ `Add Files to <...>`
61 61
 2. Go to `node_modules` ➜ `react-native-permissions` ➜ select
62 62
    `ReactNativePermissions.xcodeproj`
63
-3. Add `libReactNativePermissions.a` to `Build Phases` -> `Link Binary With
64
-   Libraries`
63
+3. Add `libReactNativePermissions.a` to `Build Phases` -> `Link Binary With Libraries`
65 64
 
66 65
 ## Using
67 66
 
68 67
 ```js
69
-import Permissions from 'react-native-permissions'
68
+import Permissions from "react-native-permissions";
70 69
 // OR const Permissions = require('react-native-permissions').default
71 70
 // if you use CommonJS module system
72 71
 
@@ -77,31 +76,31 @@ export default class extends React.Component {
77 76
 
78 77
   // Check the status of a single permission
79 78
   componentDidMount() {
80
-    Permissions.check('photo').then(response => {
79
+    Permissions.check("photo").then(response => {
81 80
       // Response is one of: 'authorized', 'denied', 'restricted', or 'undetermined'
82
-      this.setState({ photoPermission: response })
83
-    })
81
+      this.setState({ photoPermission: response });
82
+    });
84 83
   }
85 84
 
86 85
   // Request permission to access photos
87 86
   _requestPermission = () => {
88
-    Permissions.request('photo').then(response => {
87
+    Permissions.request("photo").then(response => {
89 88
       // Returns once the user has chosen to 'allow' or to 'not allow' access
90 89
       // Response is one of: 'authorized', 'denied', 'restricted', or 'undetermined'
91
-      this.setState({ photoPermission: response })
92
-    })
93
-  }
90
+      this.setState({ photoPermission: response });
91
+    });
92
+  };
94 93
 
95 94
   // Check the status of multiple permissions
96 95
   _checkCameraAndPhotos = () => {
97
-    Permissions.checkMultiple(['camera', 'photo']).then(response => {
96
+    Permissions.checkMultiple(["camera", "photo"]).then(response => {
98 97
       //response is an object mapping type to permission
99 98
       this.setState({
100 99
         cameraPermission: response.camera,
101 100
         photoPermission: response.photo,
102
-      })
103
-    })
104
-  }
101
+      });
102
+    });
103
+  };
105 104
 
106 105
   // This is a common pattern when asking for permissions.
107 106
   // iOS only gives you once chance to show the permission dialog,
@@ -111,19 +110,19 @@ export default class extends React.Component {
111 110
   // If the user already denied access, we can ask them to enable it from settings.
112 111
   _alertForPhotosPermission() {
113 112
     Alert.alert(
114
-      'Can we access your photos?',
115
-      'We need access so you can set your profile pic',
113
+      "Can we access your photos?",
114
+      "We need access so you can set your profile pic",
116 115
       [
117 116
         {
118
-          text: 'No way',
119
-          onPress: () => console.log('Permission denied'),
120
-          style: 'cancel',
117
+          text: "No way",
118
+          onPress: () => console.log("Permission denied"),
119
+          style: "cancel",
121 120
         },
122
-        this.state.photoPermission == 'undetermined'
123
-          ? { text: 'OK', onPress: this._requestPermission }
124
-          : { text: 'Open Settings', onPress: Permissions.openSettings },
121
+        this.state.photoPermission == "undetermined"
122
+          ? { text: "OK", onPress: this._requestPermission }
123
+          : { text: "Open Settings", onPress: Permissions.openSettings },
125 124
       ],
126
-    )
125
+    );
127 126
   }
128 127
 
129 128
   //...
@@ -139,7 +138,7 @@ Promises resolve into one of these statuses:
139 138
 | Return value   | Notes                                                                                                                                                                                                                                                                  |
140 139
 | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
141 140
 | `authorized`   | User has authorized this permission                                                                                                                                                                                                                                    |
142
-| `denied`       | User has denied this permission at least once. On iOS this means that the user will not be prompted again. Android users can be prompted multiple times until they select 'Never ask me again'                                                                          |
141
+| `denied`       | User has denied this permission at least once. On iOS this means that the user will not be prompted again. Android users can be prompted multiple times until they select 'Never ask me again'                                                                         |
143 142
 | `restricted`   | **iOS** - this means user is not able to grant this permission, either because it's not supported by the device or because it has been blocked by parental controls. **Android** - this means that the user has selected 'Never ask me again' while denying permission |
144 143
 | `undetermined` | User has not yet been prompted with a permission dialog                                                                                                                                                                                                                |
145 144
 
@@ -180,40 +179,39 @@ The current supported permissions are:
180 179
 
181 180
 ### iOS Notes
182 181
 
183
-* Permission type `bluetooth` represents the status of the
182
+- Permission type `bluetooth` represents the status of the
184 183
   `CBPeripheralManager`. Don't use this if only need `CBCentralManager`
185
-* Permission type `location` accepts a second parameter for `request()` and
184
+- Permission type `location` accepts a second parameter for `request()` and
186 185
   `check()`; the second parameter is a string, either `always` or `whenInUse`
187 186
   (default).
188
-* Permission type `notification` accepts a second parameter for `request()`. The
187
+- Permission type `notification` accepts a second parameter for `request()`. The
189 188
   second parameter is an array with the desired alert types. Any combination of
190 189
   `alert`, `badge` and `sound` (default requests all three).
191
-* If you are not requesting mediaLibrary then you can remove MediaPlayer.framework from the xcode project
190
+- If you are not requesting mediaLibrary then you can remove MediaPlayer.framework from the xcode project
192 191
 
193 192
 ```js
194 193
 // example
195
-Permissions.check('location', { type: 'always' }).then(response => {
196
-  this.setState({ locationPermission: response })
197
-})
194
+Permissions.check("location", { type: "always" }).then(response => {
195
+  this.setState({ locationPermission: response });
196
+});
198 197
 
199
-Permissions.request('location', { type: 'always' }).then(response => {
200
-  this.setState({ locationPermission: response })
201
-})
198
+Permissions.request("location", { type: "always" }).then(response => {
199
+  this.setState({ locationPermission: response });
200
+});
202 201
 
203
-Permissions.request('notification', { type: ['alert', 'badge'] }).then(
202
+Permissions.request("notification", { type: ["alert", "badge"] }).then(
204 203
   response => {
205
-    this.setState({ notificationPermission: response })
204
+    this.setState({ notificationPermission: response });
206 205
   },
207
-)
206
+);
208 207
 ```
209 208
 
210
-* You cannot request microphone permissions on the simulator.
211
-* With Xcode 8, you now need to add usage descriptions for each permission you
209
+- You cannot request microphone permissions on the simulator.
210
+- With Xcode 8, you now need to add usage descriptions for each permission you
212 211
   will request. Open Xcode ➜ `Info.plist` ➜ Add a key (starting with "Privacy -
213 212
   ...") with your kit specific permission.
214 213
 
215
-Example: If you need Contacts permission you have to add the key `Privacy -
216
-Contacts Usage Description`.
214
+Example: If you need Contacts permission you have to add the key `Privacy - Contacts Usage Description`.
217 215
 
218 216
 <img width="338" alt="3cde3b44-7ffd-11e6-918b-63888e33f983" src="https://cloud.githubusercontent.com/assets/1440796/18713019/271be540-8011-11e6-87fb-c3828c172dfc.png">
219 217
 
@@ -246,6 +244,7 @@ So before submitting your app to the App Store, make sure that in your
246 244
 <key>NSMotionUsageDescription</key>
247 245
 <string>Some description</string>
248 246
 ```
247
+
249 248
 This is required because during the phase of processing in the App Store
250 249
 submission, the system detects that you app contains code to request the
251 250
 permission `X` but don't have the `UsageDescription` key and then it rejects the
@@ -258,32 +257,32 @@ You can find more information about this issue in #46.
258 257
 
259 258
 ### Android Notes
260 259
 
261
-* Uses React Native's own
260
+- Uses React Native's own
262 261
   [`PermissionsAndroid` JS API](http://facebook.github.io/react-native/docs/permissionsandroid.html).
263
-* All required permissions also need to be included in the `AndroidManifest.xml`
262
+- All required permissions also need to be included in the `AndroidManifest.xml`
264 263
   file before they can be requested. Otherwise `request()` will immediately
265 264
   return `denied`.
266
-* You can request write access to any of these types by also including the
265
+- You can request write access to any of these types by also including the
267 266
   appropriate write permission in the `AndroidManifest.xml` file. Read more
268 267
   [here](https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous).
269 268
 
270
-* The optional rationale argument will show a dialog prompt.
269
+- The optional rationale argument will show a dialog prompt.
271 270
 
272 271
 ```js
273 272
 // example
274
-Permissions.request('camera', {
273
+Permissions.request("camera", {
275 274
   rationale: {
276
-    title: 'Cool Photo App Camera Permission',
275
+    title: "Cool Photo App Camera Permission",
277 276
     message:
278
-      'Cool Photo App needs access to your camera ' +
279
-      'so you can take awesome pictures.',
277
+      "Cool Photo App needs access to your camera " +
278
+      "so you can take awesome pictures.",
280 279
   },
281 280
 }).then(response => {
282
-  this.setState({ cameraPermission: response })
283
-})
281
+  this.setState({ cameraPermission: response });
282
+});
284 283
 ```
285 284
 
286
-* Permissions are automatically accepted for **targetSdkVersion < 23** but you
285
+- Permissions are automatically accepted for **targetSdkVersion < 23** but you
287 286
   can still use `check()` to check if the user has disabled them from Settings.
288 287
 
289 288
 You might need to elevate the **targetSdkVersion** version in your

+ 2
- 2
index.js View File

@@ -1,4 +1,4 @@
1 1
 // @flow
2 2
 
3
-import Permissions from './lib/permissions'
4
-export default Permissions
3
+import Permissions from "./lib/permissions";
4
+export default Permissions;

+ 40
- 44
lib/permissions.android.js View File

@@ -1,11 +1,11 @@
1 1
 // @flow
2 2
 
3
-import { AsyncStorage, NativeModules, PermissionsAndroid } from 'react-native'
3
+import { AsyncStorage, NativeModules, PermissionsAndroid } from "react-native";
4 4
 
5
-type Status = 'authorized' | 'denied' | 'restricted' | 'undetermined'
6
-type Rationale = { title: string, message: string }
7
-type CheckOptions = string | { type: string }
8
-type RequestOptions = string | { type: string, rationale?: Rationale }
5
+type Status = "authorized" | "denied" | "restricted" | "undetermined";
6
+type Rationale = { title: string, message: string };
7
+type CheckOptions = string | { type: string };
8
+type RequestOptions = string | { type: string, rationale?: Rationale };
9 9
 
10 10
 const permissionTypes = {
11 11
   location: PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
@@ -18,75 +18,71 @@ const permissionTypes = {
18 18
   callPhone: PermissionsAndroid.PERMISSIONS.CALL_PHONE,
19 19
   readSms: PermissionsAndroid.PERMISSIONS.READ_SMS,
20 20
   receiveSms: PermissionsAndroid.PERMISSIONS.RECEIVE_SMS,
21
-}
21
+};
22 22
 
23 23
 const RESULTS = {
24
-  [PermissionsAndroid.RESULTS.GRANTED]: 'authorized',
25
-  [PermissionsAndroid.RESULTS.DENIED]: 'denied',
26
-  [PermissionsAndroid.RESULTS.NEVER_ASK_AGAIN]: 'restricted',
27
-}
24
+  [PermissionsAndroid.RESULTS.GRANTED]: "authorized",
25
+  [PermissionsAndroid.RESULTS.DENIED]: "denied",
26
+  [PermissionsAndroid.RESULTS.NEVER_ASK_AGAIN]: "restricted",
27
+};
28 28
 
29
-const STORAGE_KEY = '@RNPermissions:didAskPermission:'
29
+const STORAGE_KEY = "@RNPermissions:didAskPermission:";
30 30
 
31 31
 const setDidAskOnce = (permission: string) =>
32
-  AsyncStorage.setItem(STORAGE_KEY + permission, 'true')
32
+  AsyncStorage.setItem(STORAGE_KEY + permission, "true");
33 33
 
34 34
 const getDidAskOnce = (permission: string) =>
35
-  AsyncStorage.getItem(STORAGE_KEY + permission).then(item => !!item)
35
+  AsyncStorage.getItem(STORAGE_KEY + permission).then(item => !!item);
36 36
 
37 37
 class ReactNativePermissions {
38
-  canOpenSettings: () => Promise<boolean> = () => Promise.resolve(false)
38
+  canOpenSettings: () => Promise<boolean> = () => Promise.resolve(false);
39 39
 
40 40
   openSettings: () => Promise<*> = () =>
41
-    Promise.reject(new Error("'openSettings' is deprecated on android"))
41
+    Promise.reject(new Error("'openSettings' is deprecated on android"));
42 42
 
43
-  getTypes: () => Array<string> = () => Object.keys(permissionTypes)
43
+  getTypes: () => Array<string> = () => Object.keys(permissionTypes);
44 44
 
45 45
   check = (permission: string, options?: CheckOptions): Promise<Status> => {
46 46
     if (!permissionTypes[permission]) {
47 47
       const error = new Error(
48
-        `ReactNativePermissions: ${
49
-          permission
50
-        } is not a valid permission type on Android`,
51
-      )
48
+        `ReactNativePermissions: ${permission} is not a valid permission type on Android`,
49
+      );
52 50
 
53
-      return Promise.reject(error)
51
+      return Promise.reject(error);
54 52
     }
55 53
 
56 54
     return PermissionsAndroid.check(permissionTypes[permission]).then(
57 55
       isAuthorized => {
58 56
         if (isAuthorized) {
59
-          return 'authorized'
57
+          return "authorized";
60 58
         }
61 59
 
62 60
         return getDidAskOnce(permission).then(didAsk => {
63 61
           if (didAsk) {
64 62
             return NativeModules.PermissionsAndroid.shouldShowRequestPermissionRationale(
65 63
               permissionTypes[permission],
66
-            ).then(shouldShow => (shouldShow ? 'denied' : 'restricted'))
64
+            ).then(shouldShow => (shouldShow ? "denied" : "restricted"));
67 65
           }
68 66
 
69
-          return 'undetermined'
70
-        })
67
+          return "undetermined";
68
+        });
71 69
       },
72
-    )
73
-  }
70
+    );
71
+  };
74 72
 
75 73
   request = (permission: string, options?: RequestOptions): Promise<Status> => {
76 74
     if (!permissionTypes[permission]) {
77 75
       const error = new Error(
78
-        `ReactNativePermissions: ${
79
-          permission
80
-        } is not a valid permission type on Android`,
81
-      )
76
+        `ReactNativePermissions: ${permission} is not a valid permission type on Android`,
77
+      );
82 78
 
83
-      return Promise.reject(error)
79
+      return Promise.reject(error);
84 80
     }
85 81
 
86
-    let rationale
82
+    let rationale;
87 83
 
88 84
     if (options && options.rationale) {
89
-      rationale = options.rationale
85
+      rationale = options.rationale;
90 86
     }
91 87
 
92 88
     return PermissionsAndroid.request(
@@ -95,23 +91,23 @@ class ReactNativePermissions {
95 91
     ).then(result => {
96 92
       // PermissionsAndroid.request() to native module resolves to boolean
97 93
       // rather than string if running on OS version prior to Android M
98
-      if (typeof result === 'boolean') {
99
-        return result ? 'authorized' : 'denied'
94
+      if (typeof result === "boolean") {
95
+        return result ? "authorized" : "denied";
100 96
       }
101 97
 
102
-      return setDidAskOnce(permission).then(() => RESULTS[result])
103
-    })
104
-  }
98
+      return setDidAskOnce(permission).then(() => RESULTS[result]);
99
+    });
100
+  };
105 101
 
106 102
   checkMultiple = (permissions: Array<string>): Promise<{ [string]: string }> =>
107 103
     Promise.all(permissions.map(permission => this.check(permission))).then(
108 104
       result =>
109 105
         result.reduce((acc, value, index) => {
110
-          const name = permissions[index]
111
-          acc[name] = value
112
-          return acc
106
+          const name = permissions[index];
107
+          acc[name] = value;
108
+          return acc;
113 109
         }, {}),
114
-    )
110
+    );
115 111
 }
116 112
 
117
-export default new ReactNativePermissions()
113
+export default new ReactNativePermissions();

+ 53
- 57
lib/permissions.ios.js View File

@@ -1,109 +1,105 @@
1 1
 // @flow
2 2
 
3
-import { NativeModules } from 'react-native'
4
-const PermissionsIOS = NativeModules.ReactNativePermissions
3
+import { NativeModules } from "react-native";
4
+const PermissionsIOS = NativeModules.ReactNativePermissions;
5 5
 
6
-type Status = 'authorized' | 'denied' | 'restricted' | 'undetermined'
7
-type Rationale = { title: string, message: string }
8
-type CheckOptions = string | { type: string }
9
-type RequestOptions = string | { type: string, rationale?: Rationale }
6
+type Status = "authorized" | "denied" | "restricted" | "undetermined";
7
+type Rationale = { title: string, message: string };
8
+type CheckOptions = string | { type: string };
9
+type RequestOptions = string | { type: string, rationale?: Rationale };
10 10
 
11 11
 const permissionTypes = [
12
-  'location',
13
-  'camera',
14
-  'microphone',
15
-  'photo',
16
-  'contacts',
17
-  'event',
18
-  'reminder',
19
-  'bluetooth',
20
-  'notification',
21
-  'backgroundRefresh',
22
-  'speechRecognition',
23
-  'mediaLibrary',
24
-  'motion'
25
-]
12
+  "location",
13
+  "camera",
14
+  "microphone",
15
+  "photo",
16
+  "contacts",
17
+  "event",
18
+  "reminder",
19
+  "bluetooth",
20
+  "notification",
21
+  "backgroundRefresh",
22
+  "speechRecognition",
23
+  "mediaLibrary",
24
+  "motion",
25
+];
26 26
 
27 27
 const DEFAULTS = {
28
-  location: 'whenInUse',
29
-  notification: ['alert', 'badge', 'sound'],
30
-}
28
+  location: "whenInUse",
29
+  notification: ["alert", "badge", "sound"],
30
+};
31 31
 
32 32
 class ReactNativePermissions {
33 33
   canOpenSettings: () => Promise<boolean> = () =>
34
-    PermissionsIOS.canOpenSettings()
34
+    PermissionsIOS.canOpenSettings();
35 35
 
36
-  openSettings: () => Promise<*> = () => PermissionsIOS.openSettings()
36
+  openSettings: () => Promise<*> = () => PermissionsIOS.openSettings();
37 37
 
38
-  getTypes: () => Array<string> = () => permissionTypes
38
+  getTypes: () => Array<string> = () => permissionTypes;
39 39
 
40 40
   check = (permission: string, options?: CheckOptions): Promise<Status> => {
41 41
     if (!permissionTypes.includes(permission)) {
42 42
       const error = new Error(
43
-        `ReactNativePermissions: ${
44
-          permission
45
-        } is not a valid permission type on iOS`,
46
-      )
43
+        `ReactNativePermissions: ${permission} is not a valid permission type on iOS`,
44
+      );
47 45
 
48
-      return Promise.reject(error)
46
+      return Promise.reject(error);
49 47
     }
50 48
 
51
-    let type
49
+    let type;
52 50
 
53
-    if (typeof options === 'string') {
54
-      type = options
51
+    if (typeof options === "string") {
52
+      type = options;
55 53
     } else if (options && options.type) {
56
-      type = options.type
54
+      type = options.type;
57 55
     }
58 56
 
59 57
     return PermissionsIOS.getPermissionStatus(
60 58
       permission,
61 59
       type || DEFAULTS[permission],
62
-    )
63
-  }
60
+    );
61
+  };
64 62
 
65 63
   request = (permission: string, options?: RequestOptions): Promise<Status> => {
66 64
     if (!permissionTypes.includes(permission)) {
67 65
       const error = new Error(
68
-        `ReactNativePermissions: ${
69
-          permission
70
-        } is not a valid permission type on iOS`,
71
-      )
66
+        `ReactNativePermissions: ${permission} is not a valid permission type on iOS`,
67
+      );
72 68
 
73
-      return Promise.reject(error)
69
+      return Promise.reject(error);
74 70
     }
75 71
 
76
-    if (permission == 'backgroundRefresh') {
72
+    if (permission == "backgroundRefresh") {
77 73
       const error = new Error(
78
-        'ReactNativePermissions: You cannot request backgroundRefresh',
79
-      )
74
+        "ReactNativePermissions: You cannot request backgroundRefresh",
75
+      );
80 76
 
81
-      return Promise.reject(error)
77
+      return Promise.reject(error);
82 78
     }
83 79
 
84
-    let type
80
+    let type;
85 81
 
86
-    if (typeof options === 'string') {
87
-      type = options
82
+    if (typeof options === "string") {
83
+      type = options;
88 84
     } else if (options && options.type) {
89
-      type = options.type
85
+      type = options.type;
90 86
     }
91 87
 
92 88
     return PermissionsIOS.requestPermission(
93 89
       permission,
94 90
       type || DEFAULTS[permission],
95
-    )
96
-  }
91
+    );
92
+  };
97 93
 
98 94
   checkMultiple = (permissions: Array<string>): Promise<{ [string]: string }> =>
99 95
     Promise.all(permissions.map(permission => this.check(permission))).then(
100 96
       result =>
101 97
         result.reduce((acc, value, index) => {
102
-          const name = permissions[index]
103
-          acc[name] = value
104
-          return acc
98
+          const name = permissions[index];
99
+          acc[name] = value;
100
+          return acc;
105 101
         }, {}),
106
-    )
102
+    );
107 103
 }
108 104
 
109
-export default new ReactNativePermissions()
105
+export default new ReactNativePermissions();