i have three different js linters and one says that the other is wrong.

This commit is contained in:
SandPoot
2022-02-02 18:51:26 -03:00
parent 8acb800301
commit 0fca5f80eb
@@ -1,3 +1,4 @@
/* eslint-disable react/jsx-closing-tag-location */
import { useBackend } from '../backend'; import { useBackend } from '../backend';
import { Box, Button, Flex, Icon, LabeledList, Modal, Section, Table, Tooltip } from '../components'; import { Box, Button, Flex, Icon, LabeledList, Modal, Section, Table, Tooltip } from '../components';
import { Window } from '../layouts'; import { Window } from '../layouts';
@@ -54,21 +55,21 @@ export const CustomShuttleConsole = (props, context) => {
{docked_location} {docked_location}
</LabeledList.Item> </LabeledList.Item>
<LabeledList.Item label="Shuttle Mass"> <LabeledList.Item label="Shuttle Mass">
{shuttle_mass / 10}ton{shuttle_mass != 1 ? "s" : null} {shuttle_mass / 10}ton{shuttle_mass !== 1 ? "s" : null}
</LabeledList.Item> </LabeledList.Item>
<LabeledList.Item label="Engine Force"> <LabeledList.Item label="Engine Force">
{engine_force}Kn ({engines} engine{engines != 1 ? "s" : null}) {engine_force}Kn ({engines} engine{engines !== 1 ? "s" : null})
</LabeledList.Item> </LabeledList.Item>
<LabeledList.Item label="Sublight speed"> <LabeledList.Item label="Sublight speed">
{calculated_speed}ms{<sup>-1</sup>} {calculated_speed < 1 ? <Tooltip content="INSUFFICIENT ENGINE POWER"><Icon name="exclamation-triangle" color="yellow" /></Tooltip> : null} {calculated_speed}ms{<sup>-1</sup>} {calculated_speed < 1 ? <Tooltip content="INSUFFICIENT ENGINE POWER"><Icon name="exclamation-triangle" color="yellow" /></Tooltip> : null}
</LabeledList.Item> </LabeledList.Item>
{calculated_non_operational_thrusters.len {calculated_non_operational_thrusters.len
? <LabeledList.Item label="Warning"> ? <LabeledList.Item label="Warning">
{calculated_non_operational_thrusters} thruster{calculated_non_operational_thrusters != 1 ? "s are" : " is"} not operational. {calculated_non_operational_thrusters} thruster{calculated_non_operational_thrusters !== 1 ? "s are" : " is"} not operational.
</LabeledList.Item> </LabeledList.Item>
: null} : null}
<LabeledList.Item label="Fuel Consumption"> <LabeledList.Item label="Fuel Consumption">
{calculated_consumption} unit{calculated_consumption != 1 ? "s" : null} per travel {calculated_consumption} unit{calculated_consumption !== 1 ? "s" : null} per travel
</LabeledList.Item> </LabeledList.Item>
<LabeledList.Item label="Engine Cooldown"> <LabeledList.Item label="Engine Cooldown">
{calculated_cooldown}s {calculated_cooldown}s
@@ -82,23 +83,23 @@ export const CustomShuttleConsole = (props, context) => {
color="bad"> color="bad">
No valid destinations No valid destinations
</Box> </Box>
) || ( ) || (
<Table> <Table>
{locations.map(location => ( {locations.map(location => (
<tr class='Table__row candystripe'> <tr class="Table__row candystripe" key={location.id}>
{location.name} <td>({location.dist}m)</td> {location.name} <td>({location.dist}m)</td>
<td> <td>
<Button <Button
icon="crosshairs" icon="crosshairs"
selected={location.id === destination} selected={location.id === destination}
onClick={() => act("setloc", { onClick={() => act("setloc", {
setloc: location.id, setloc: location.id,
})} /> })} />
</td> </td>
</tr> </tr>
))} ))}
</Table> </Table>
)} )}
</Section> </Section>
<Section> <Section>
<Button <Button