Skip to content

Commit 92debc9

Browse files
Fix ESLint config
1 parent e24b97b commit 92debc9

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed
File renamed without changes.

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/demo/
2-
/.eslintrc.js
2+
/.eslintrc.cjs

demo/App.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React, {useState, useEffect} from 'react';
2-
import {
3-
SafeAreaView,
4-
View,
5-
Text,
6-
Switch,
7-
StyleSheet,
8-
} from 'react-native';
2+
import {SafeAreaView, View, Text, Switch, StyleSheet} from 'react-native';
93
import UserReport from '@audienceproject/react-native-userreport-sdk';
104

115
UserReport.setDebug(true);
@@ -41,7 +35,7 @@ const App = () => {
4135
</>
4236
);
4337

44-
const renderSection = (number) => (
38+
const renderSection = number => (
4539
<>
4640
<Text style={styles.subheaderText}>Application → Section {number}</Text>
4741

@@ -65,7 +59,7 @@ const App = () => {
6559
<Text style={styles.switchText}>Anonymous Tracking</Text>
6660
<Switch
6761
value={dnt}
68-
onValueChange={() => setDnt((previousValue) => !previousValue)}
62+
onValueChange={() => setDnt(previousValue => !previousValue)}
6963
/>
7064
</View>
7165
</SafeAreaView>

react-native-userreport-sdk.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ReactNative from 'react-native';
2-
import ReactNativeDeviceInfo from 'react-native-device-info';
1+
import ReactNative from 'react-native'; // eslint-disable-line import/no-unresolved
2+
import ReactNativeDeviceInfo from 'react-native-device-info'; // eslint-disable-line import/no-unresolved
33

44
/* debug */
55

@@ -37,7 +37,7 @@ export const setIdfaDialog = (value) => {
3737

3838
const loadIdfa = async () => {
3939
const nativeModule = ReactNative.NativeModules.RNAdvertisingId;
40-
const nativeMethod = ReactNative.Platform.OS !=='ios' || useIdfaDialog
40+
const nativeMethod = ReactNative.Platform.OS !== 'ios' || useIdfaDialog
4141
? nativeModule.getAdvertisingId : nativeModule.getAdvertisingIdLegacy;
4242

4343
try {
@@ -101,7 +101,7 @@ const fireTrackingPixel = async (trackingCode, consentString) => {
101101
const deviceResolution = `${screenWidth}x${screenHeight}`;
102102

103103
const path = `https://${domain}/hit.gif`;
104-
const params = `?t=${encodeURIComponent(trackingCode)}`
104+
const params = `?t=${encodeURIComponent(trackingCode)}` // eslint-disable-line prefer-template
105105
+ `&r=${random}`
106106
+ (!useAnonymousTracking && idfa ? `&d=${encodeURIComponent(idfa)}` : '')
107107
+ (!useAnonymousTracking && idfv ? `&idfv=${encodeURIComponent(idfv)}` : '')

0 commit comments

Comments
 (0)