Skip to content

Commit 01e0982

Browse files
committed
Fix linting
1 parent 34a9983 commit 01e0982

File tree

11 files changed

+42
-44
lines changed

11 files changed

+42
-44
lines changed

src/service/lib/event-handlers/blueprints.js

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class Blueprints {
2727
if (!engineer) console.log('Failed to lookup engineer', engineerName)
2828
}
2929

30-
//console.log( blueprint.engineers)
31-
3230
return {
3331
symbol: blueprint.symbol,
3432
name: name,

src/service/lib/event-handlers/inventory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Inventory {
8989
const counts = {
9090
goods: 0,
9191
components: 0,
92-
data: 0,
92+
data: 0
9393
}
9494

9595
inventoryItems.filter(i => i.type === 'Goods').forEach(item => counts.goods += item.count)

src/service/lib/event-handlers/nav-route.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class NavRoute {
1111

1212
async getNavRoute () {
1313
const currentSystem = await this.system.getSystem()
14-
14+
1515
let inSystemOnRoute = false
1616
let jumpsToDestination = null
1717

@@ -21,12 +21,11 @@ class NavRoute {
2121
// Replaced logic as currentSystem.position (and hence distanceToHop)
2222
// is not known. Using the name like this should work, although there may
2323
// be edge cases where the names don't match, may have to watch for that.
24-
//const isCurrentSystem = (distanceToHop === 0)
24+
// const isCurrentSystem = (distanceToHop === 0)
2525
const isCurrentSystem = (system?.StarSystem?.toLowerCase() === currentSystem?.name?.toLowerCase())
2626

27-
if (isCurrentSystem)
28-
inSystemOnRoute = true
29-
27+
if (isCurrentSystem) { inSystemOnRoute = true }
28+
3029
if (isCurrentSystem) {
3130
jumpsToDestination = 0
3231
} else {

src/web/components/header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default function Header ({ connected, active }) {
140140
disabled={button.path === currentPath}
141141
className={button.path === currentPath ? 'button--active' : ''}
142142
onClick={() => router.push(button.path)}
143-
style={{fontSize: '1.5rem'}}
143+
style={{ fontSize: '1.5rem' }}
144144
>
145145
<span className='visible-small'>{button.abbr}</span>
146146
<span className='hidden-small'>{button.name}</span>

src/web/components/panels/nav/navigation-system-map-panel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default function NavigationSystemMapPanel ({ system, systemObject, setSys
7272
: 'Current location'}
7373
</h3>}
7474
{system.isCurrentLocation === true && cmdrStatus?.flags?.fsdJump === true &&
75-
<h3 className='text-blink-slow text-primary' style={{background: 'transparent'}}>Frame Shift Drive Active</h3>}
75+
<h3 className='text-blink-slow text-primary' style={{ background: 'transparent' }}>Frame Shift Drive Active</h3>}
7676
</div>
7777
<div className='system-map__info fx-fade-in'>
7878
<div className='system-map__info-contents'>

src/web/components/panels/nav/system-map.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const factionStates = {
4343
},
4444
pirateAttack: {
4545
description: 'Pirate attack, support & bounty missions'
46-
},
46+
}
4747
}
4848

4949
export default function SystemMap ({ system, setSystemObject }) {
@@ -65,7 +65,7 @@ export default function SystemMap ({ system, setSystemObject }) {
6565
<div className='system-map'>
6666
<div className='system-map__title'>
6767
<h1>
68-
<span className='fx-animated-text' data-fx-order='1' style={{paddingRight: '1rem'}}>
68+
<span className='fx-animated-text' data-fx-order='1' style={{ paddingRight: '1rem' }}>
6969
<i className='icon icarus-terminal-system-orbits' />
7070
<CopyOnClick>{system.name}</CopyOnClick>
7171
</span>
@@ -76,7 +76,7 @@ export default function SystemMap ({ system, setSystemObject }) {
7676
{system.detail.bodies.length} {system.detail.bodies.length === 1 ? 'body found in system' : 'bodies found in system'}
7777
</span>
7878
</h3>}
79-
{system.state && system.state !== 'Unknown' && system.state !== 'None' && factionStateDescription &&
79+
{system.state && system.state !== 'Unknown' && system.state !== 'None' && factionStateDescription &&
8080
<h3 className='text-info'>
8181
<span className='fx-animated-text' data-fx-order='3'>
8282
{factionStateDescription}

src/web/components/panels/ship/ship-modules-panel.js

+17-16
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function ShipModulesPanel ({ ship, selectedModule, setSelectedMod
2626
</h3>
2727
</div>
2828
<div className='ship-panel__ship-pips text-uppercase visible-medium'>
29-
<h4 className='text-muted' style={{marginBottom: '1rem'}}>Power Distribution</h4>
29+
<h4 className='text-muted' style={{ marginBottom: '1rem' }}>Power Distribution</h4>
3030
<div className='ship-panel__ship-pip'>
3131
<progress value={ship.onBoard ? ship?.pips?.systems : 0} max={8} />
3232
<label className={(ship.onBoard && ship?.pips?.systems) > 0 ? 'text-primary' : 'text-primary text-muted'}>SYS</label>
@@ -50,9 +50,10 @@ export default function ShipModulesPanel ({ ship, selectedModule, setSelectedMod
5050
position: 'relative',
5151
border: '.2rem solid var(--color-primary-dark)',
5252
padding: '.25rem .5rem',
53-
background:'var(--color-background-panel-translucent)'
54-
}}>
55-
<h4 className='text-muted text-center' style={{margin: '.5rem 0'}}>Power Distribution</h4>
53+
background: 'var(--color-background-panel-translucent)'
54+
}}
55+
>
56+
<h4 className='text-muted text-center' style={{ margin: '.5rem 0' }}>Power Distribution</h4>
5657
<div className='ship-panel__ship-pips text-uppercase'>
5758
<div className='ship-panel__ship-pip'>
5859
<progress value={ship.onBoard ? ship?.pips?.systems : 0} max={8} />
@@ -126,31 +127,31 @@ export default function ShipModulesPanel ({ ship, selectedModule, setSelectedMod
126127
<tbody>
127128
<tr>
128129
<td>
129-
<label className='checkbox'>
130-
<span className='checkbox__text'>Ship Lights</span>
131-
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.lightsOn} />
132-
<span class='checkbox__control'/>
133-
</label>
130+
<label className='checkbox'>
131+
<span className='checkbox__text'>Ship Lights</span>
132+
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.lightsOn} />
133+
<span class='checkbox__control' />
134+
</label>
134135
</td>
135136
<td>
136-
<label className='checkbox'>
137-
<span className='checkbox__text'>Night Vision</span>
138-
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.nightVision} />
139-
<span class='checkbox__control'/>
140-
</label>
137+
<label className='checkbox'>
138+
<span className='checkbox__text'>Night Vision</span>
139+
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.nightVision} />
140+
<span class='checkbox__control' />
141+
</label>
141142
</td>
142143
<td>
143144
<label className='checkbox'>
144145
<span className='checkbox__text'>Hardpoints</span>
145146
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.hardpointsDeployed} />
146-
<span class='checkbox__control'/>
147+
<span class='checkbox__control' />
147148
</label>
148149
</td>
149150
<td>
150151
<label className='checkbox'>
151152
<span className='checkbox__text'>Landing Gear</span>
152153
<input type='checkbox' checked={ship.onBoard && cmdrStatus?.flags?.landingGearDown} />
153-
<span class='checkbox__control'/>
154+
<span class='checkbox__control' />
154155
</label>
155156
</td>
156157
</tr>

src/web/components/panels/ship/ship-modules.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export default function ShipModules ({ name, modules, selectedModule, setSelecte
44
<div className='tabs' style={{ margin: '1rem 0 .25rem 0' }}>
55
<h4 className='tab'>{name}</h4>
66
</div>
7-
{modules.length === 0 &&
8-
<p className='text-muted text-uppercase' style={{margin: '1rem 0'}}>
7+
{modules.length === 0 &&
8+
<p className='text-muted text-uppercase' style={{ margin: '1rem 0' }}>
99
No {name.toLowerCase()} installed
1010
</p>}
1111
<table className='ship-panel_modules-table table--flex-inline table--interactive table--animated'>

src/web/pages/eng/blueprints.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function EngineeringMaterialsPage () {
2020

2121
useEffect(async () => {
2222
if (!connected || !router.isReady) return
23-
23+
2424
if (!blueprints) {
2525
const newBlueprints = await sendEvent('getBlueprints')
2626
setBlueprints(newBlueprints)
@@ -147,9 +147,9 @@ export default function EngineeringMaterialsPage () {
147147
>
148148
<td>
149149
<span className='text-info'>{module.class}{module.rating} {module.name}</span>
150-
<span className='visible-medium'><br/>{module.slotName}</span>
150+
<span className='visible-medium'><br />{module.slotName}</span>
151151
</td>
152-
<td className='hidden-medium' style={{width: '12rem'}}>
152+
<td className='hidden-medium' style={{ width: '12rem' }}>
153153
<span>{module.slotName}</span>
154154
</td>
155155
<td className='text-info text-no-wrap' style={{ minWidth: '3rem' }}>
@@ -184,20 +184,20 @@ export default function EngineeringMaterialsPage () {
184184
<div className='tabs'>
185185
<h4 className='tab' style={{ marginTop: '1rem' }}>Engineers</h4>
186186
</div>
187-
<table className='table--animated' style={{tableLayout: 'fixed'}}>
187+
<table className='table--animated' style={{ tableLayout: 'fixed' }}>
188188
<tbody className='fx-fade-in'>
189189
{Object.keys(selectedBlueprint?.engineers ?? []).map(engineer => (
190190
<tr key={`engineer_${engineer}`}>
191191
<td>
192192
<span className='text-info'>
193193
<CopyOnClick>{engineer}</CopyOnClick>
194194
<span className='visible-medium text-primary'>
195-
<br/>
196-
{
195+
<br />
196+
{
197197
Math.min(...selectedBlueprint?.engineers?.[engineer]?.grades) !== Math.max(...selectedBlueprint?.engineers?.[engineer]?.grades) &&
198198
`Grade ${Math.min(...selectedBlueprint?.engineers?.[engineer]?.grades)}${Math.max(...selectedBlueprint?.engineers?.[engineer]?.grades)}`
199199
}
200-
{
200+
{
201201
Math.min(...selectedBlueprint?.engineers?.[engineer]?.grades) === Math.max(...selectedBlueprint?.engineers?.[engineer]?.grades) &&
202202
`Grade ${Math.min(...selectedBlueprint?.engineers?.[engineer]?.grades)}`
203203
}
@@ -220,7 +220,7 @@ export default function EngineeringMaterialsPage () {
220220
</span>
221221
{(currentSystem?.position && selectedBlueprint?.engineers[engineer]?.location) &&
222222
<span className='text-muted text-no-transform'>
223-
<span className='visible-medium'><br/></span>
223+
<span className='visible-medium'><br /></span>
224224
{' '}
225225
{distance(currentSystem.position, selectedBlueprint?.engineers[engineer]?.location).toLocaleString(undefined, { maximumFractionDigits: 0 })} Ly
226226
</span>}

src/web/pages/nav/route.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export default function NavListPage () {
8787
<p className='text-primary text-uppercase text-center' style={{ margin: '1rem 0' }}>
8888
{navRoute.destination.distance.toLocaleString(undefined, { maximumFractionDigits: 2 })} Ly
8989
{' '}
90-
{navRoute.inSystemOnRoute &&
91-
<>({navRoute.jumpsToDestination === 1 ? `${navRoute.jumpsToDestination} jump` : `${navRoute.jumpsToDestination} jumps`})</>}
90+
{navRoute.inSystemOnRoute &&
91+
<>({navRoute.jumpsToDestination === 1 ? `${navRoute.jumpsToDestination} jump` : `${navRoute.jumpsToDestination} jumps`})</>}
9292
{' '}to destination
9393
</p>}
9494
{navRoute?.inSystemOnRoute === false &&

src/web/pages/ship/inventory.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function LockerItems ({ heading, items, count = false, max = false }) {
5454
{heading}
5555
</h4>
5656
{count !== false &&
57-
<h4 className='float-right text-primary' style={{paddingTop: '.75rem'}}>
57+
<h4 className='float-right text-primary' style={{ paddingTop: '.75rem' }}>
5858
<span className='float-left' style={{ display: 'inline-block', padding: '.25rem .5rem .25rem 0' }}>
5959
<span className={`${count > 0 ? '' : 'text-muted'}`}>{count}</span>
6060
<span className='text-muted'>/1000</span>
@@ -67,7 +67,7 @@ function LockerItems ({ heading, items, count = false, max = false }) {
6767
/>
6868
</h4>}
6969
</div>
70-
70+
7171
<table className='table--animated fx-fade-in'>
7272
{items.length === 0 &&
7373
<tbody><tr><td colSpan={3} style={{ paddingTop: '1rem', paddingBottom: '1rem' }} className='text-center text-muted'>No {heading}</td></tr></tbody>}
@@ -99,7 +99,7 @@ function LockerItems ({ heading, items, count = false, max = false }) {
9999
</tbody>
100100
</>}
101101
</table>
102-
<hr className='small' style={{margin: '0 0 .5rem 0'}}/>
102+
<hr className='small' style={{ margin: '0 0 .5rem 0' }} />
103103
</>
104104
)
105105
}

0 commit comments

Comments
 (0)