1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

fixed eslint error & integrated with prettier as well as formatted the whole codebase (#3450)

This commit is contained in:
Nguyen Viet Hung
2020-02-05 13:28:27 +13:00
committed by GitHub
parent 051ce9e208
commit 592aca1539
186 changed files with 9233 additions and 5565 deletions

View File

@@ -22,7 +22,7 @@ if (!getSendEventCond()) {
})
}
function convertPlatformName (platformName) {
function convertPlatformName(platformName) {
if (platformName === 'darwin') {
return 'MacOS'
} else if (platformName === 'win32') {
@@ -34,16 +34,16 @@ function convertPlatformName (platformName) {
}
}
function getSendEventCond () {
function getSendEventCond() {
const isDev = process.env.NODE_ENV !== 'production'
const isDisable = !ConfigManager.default.get().amaEnabled
const isOffline = !window.navigator.onLine
return isDev || isDisable || isOffline
}
function initAwsMobileAnalytics () {
function initAwsMobileAnalytics() {
if (getSendEventCond()) return
AWS.config.credentials.get((err) => {
AWS.config.credentials.get(err => {
if (!err) {
recordDynamicCustomEvent('APP_STARTED')
recordStaticCustomEvent()
@@ -51,7 +51,7 @@ function initAwsMobileAnalytics () {
})
}
function recordDynamicCustomEvent (type, options = {}) {
function recordDynamicCustomEvent(type, options = {}) {
if (getSendEventCond()) return
try {
mobileAnalyticsClient.recordEvent(type, options)
@@ -62,7 +62,7 @@ function recordDynamicCustomEvent (type, options = {}) {
}
}
function recordStaticCustomEvent () {
function recordStaticCustomEvent() {
if (getSendEventCond()) return
try {
mobileAnalyticsClient.recordEvent('UI_COLOR_THEME', {