Skip to content

Commit

Permalink
style: prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jan 9, 2025
1 parent b019863 commit 6bbbd04
Show file tree
Hide file tree
Showing 14 changed files with 1,056 additions and 358 deletions.
1,374 changes: 1,036 additions & 338 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
},
"dependencies": {
"@aws-amplify/core": "6.9.0",
"@aws-sdk/credential-provider-cognito-identity": "3.721.0",
"@aws-sdk/credential-provider-cognito-identity": "3.723.0",
"@aws/amazon-location-utilities-auth-helper": "1.2.1",
"@bifravst/rsrp-bar": "8.0.6",
"@hello.nrfcloud.com/proto-map": "16.1.33",
"@sentry/react": "8.47.0",
"@sentry/react": "8.48.0",
"@sentry/tracing": "7.114.0",
"compare-versions": "6.1.1",
"date-fns": "4.1.0",
Expand All @@ -47,7 +47,7 @@
"svg-country-flags": "1.2.10"
},
"devDependencies": {
"@bifravst/eslint-config-typescript": "6.1.19",
"@bifravst/eslint-config-typescript": "6.1.20",
"@bifravst/prettier-config": "1.1.4",
"@commitlint/config-conventional": "19.6.0",
"@nordicsemiconductor/from-env": "3.0.1",
Expand All @@ -68,7 +68,7 @@
},
"engines": {
"node": ">=22",
"npm": ">=11"
"npm": ">=10"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Provider as DevicesProvider } from './context/Devices.js'
import { Provider as LwM2MProvider } from './context/LwM2M.js'
import { Provider as MapProvider } from './context/Map.js'
import { Provider as MemfaultProvider } from './memfault/Context.js'
import { Provider as SettingsProvider } from './context/Settings.js'
import { Provider as VisibleDevicesProvider } from './context/VisibleDevices.js'
import { Provider as WebsocketProvider } from './context/WebsocketConnection.js'
import { Dashboard } from './Dashboard.js'
import { Provider as MemfaultProvider } from './memfault/Context.js'
import { FakeTracker } from './test-device/FakeTracker.js'
import { WithMapAuthHelper as MapAuthHelperProvider } from './WithMapAuthHelper.js'

Expand Down
2 changes: 1 addition & 1 deletion src/ConfigureCode.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Check, X } from 'lucide-preact'
import { useState } from 'preact/hooks'
import { useSettings } from './context/Settings.js'
import { cancelEvent } from './cancelEvent.js'
import { useSettings } from './context/Settings.js'

export const ConfigureCode = ({
device,
Expand Down
4 changes: 2 additions & 2 deletions src/LocationInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { GeoLocationAge } from './GeoLocationAge.js'
import { locationSourceColors } from './colors.js'
import type { Device } from './context/Devices.js'
import { LocationSourceLabels } from './context/LocationSourceLabels.js'
import { sortLocations } from './sortLocations.js'
import { removeOldLocation } from './removeOldLocation.js'
import { useMap } from './context/Map.js'
import { removeOldLocation } from './removeOldLocation.js'
import { sortLocations } from './sortLocations.js'

const LocationSource = styled.span`
font-weight: var(--monospace-font-weight-bold);
Expand Down
4 changes: 2 additions & 2 deletions src/PinTile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PinIcon, PinOffIcon } from 'lucide-preact'
import { useSettings } from './context/Settings.js'
import { colors } from './colors.js'
import { withCancel } from './cancelEvent.js'
import { colors } from './colors.js'
import { useSettings } from './context/Settings.js'

export const PinTile = ({ device }: { device: { id: string } }) => {
const {
Expand Down
2 changes: 1 addition & 1 deletion src/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChevronUp, Settings2, Star, StarOff } from 'lucide-preact'
import { styled } from 'styled-components'
import { colors } from './colors.js'
import { useDevices } from './context/Devices.js'
import { useSettings } from './context/Settings.js'
import { colors } from './colors.js'

const SettingsPanel = styled.aside`
font-family: 'Inter', sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion src/context/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { locationSourceColors } from '../colors.js'
import { geoJSONPolygonFromCircle } from '../map/geoJSONPolygonFromCircle.js'
import { mapStyle } from '../map/style.js'
import { captureMessage } from '../sentry.js'
import type { AuthHelper } from '../WithMapAuthHelper.js'
import { GeoLocationSource, type GeoLocation } from './Devices.js'
import { LocationSourceLabels } from './LocationSourceLabels.js'
import type { AuthHelper } from '../WithMapAuthHelper.js'

export const MapContext = createContext<DeviceMap>(undefined as any)

Expand Down
6 changes: 3 additions & 3 deletions src/context/WebsocketConnection.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createContext, type ComponentChildren } from 'preact'
import { useContext, useEffect, useRef, useState } from 'preact/hooks'
import type { Reboot } from '../memfault/Context.js'
import {
GeoLocationSource,
useDevices,
type DeviceType,
type GeoLocation,
type Reported,
type Summary,
GeoLocationSource,
DeviceType,
} from './Devices.js'
import type { Reboot } from '../memfault/Context.js'

export const WebsocketContext = createContext<{
connected: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/map/DeviceLocations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useEffect } from 'preact/hooks'
import {
useDevices,
type Device,
type Location,
type GeoLocation,
type Location,
} from '../context/Devices.js'
import { useMap } from '../context/Map.js'
import { useVisibleDevices } from '../context/VisibleDevices.js'
Expand Down
2 changes: 1 addition & 1 deletion src/memfault/Context.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isEqual } from 'lodash-es'
import { createContext, type ComponentChildren } from 'preact'
import { useContext, useEffect, useState } from 'preact/hooks'
import { isEqual } from 'lodash-es'
import { MessageContext, useWebsocket } from '../context/WebsocketConnection.js'

export type Reboot = {
Expand Down
2 changes: 1 addition & 1 deletion src/memfault/Reboots.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BombIcon } from 'lucide-preact'
import { styled } from 'styled-components'
import { ShowWhenHot } from '../ShowWhenHot.js'
import type { Device } from '../context/Devices.js'
import { Memfault } from '../icons/Memfault.js'
import { useMemfault, type Reboot } from './Context.js'
import { BombIcon } from 'lucide-preact'

const Hot = styled.span`
color: var(--color-nordic-pink);
Expand Down
2 changes: 1 addition & 1 deletion src/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Sentry from '@sentry/react'
import { browserTracingIntegration } from '@sentry/browser'
import * as Sentry from '@sentry/react'

const enableSentry =
SENTRY_DSN !== undefined && import.meta.env.PROD !== undefined
Expand Down
2 changes: 1 addition & 1 deletion src/test-device/FakeTracker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FakeDevice } from './FakeDevice.js'
import type { Reported, Summary } from '../context/Devices.js'
import { FakeDevice } from './FakeDevice.js'

export const FakeTracker = () => (
<FakeDevice fakeState={fakeTrackerState} fakeHistory={fakeTrackerHistory} />
Expand Down

0 comments on commit 6bbbd04

Please sign in to comment.