mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
Fixes a few biome warnings (#92661)
## About The Pull Request - Fixes an unnecessary fragment in bounty terminal PDA app - Change import to type import in ore silo - Change two instances of string concatenation to templates in vending machines - Removes some now-obsolete suppression comments for eslint, replaces the rest with biome equivalents ## Why It's Good For The Game Less linter warnings, with these fixes the only ones left are warnings about using dangerouslySetInnerHTML ## Changelog N/A
This commit is contained in:
@@ -432,13 +432,14 @@ class ChatRenderer {
|
|||||||
|
|
||||||
const reactRoot = createRoot(childNode);
|
const reactRoot = createRoot(childNode);
|
||||||
|
|
||||||
/* eslint-disable react/no-danger */
|
// biome-ignore-start lint/security/noDangerouslySetInnerHtml: ignore
|
||||||
reactRoot.render(
|
reactRoot.render(
|
||||||
<Element {...outputProps}>
|
<Element {...outputProps}>
|
||||||
<span dangerouslySetInnerHTML={oldHtml} />
|
<span dangerouslySetInnerHTML={oldHtml} />
|
||||||
</Element>,
|
</Element>,
|
||||||
childNode,
|
childNode,
|
||||||
);
|
);
|
||||||
|
// biome-ignore-end lint/security/noDangerouslySetInnerHtml: ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
// Highlight text
|
// Highlight text
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
// Utility functions
|
// Utility functions
|
||||||
var hasOwn = Object.prototype.hasOwnProperty;
|
var hasOwn = Object.prototype.hasOwnProperty;
|
||||||
|
|||||||
@@ -89,9 +89,7 @@ class PaintCanvas extends Component<PaintCanvasProps> {
|
|||||||
if (this.zoom !== this.props.zoom) {
|
if (this.zoom !== this.props.zoom) {
|
||||||
this.prepareCanvas();
|
this.prepareCanvas();
|
||||||
this.syncCanvas();
|
this.syncCanvas();
|
||||||
}
|
} else if (
|
||||||
// eslint-disable-next-line max-len
|
|
||||||
else if (
|
|
||||||
(this.props.value !== undefined &&
|
(this.props.value !== undefined &&
|
||||||
JSON.stringify(this.baseImageData) !==
|
JSON.stringify(this.baseImageData) !==
|
||||||
JSON.stringify(fromDM(this.props.value))) ||
|
JSON.stringify(fromDM(this.props.value))) ||
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export function Evidence(props: Props) {
|
|||||||
{evidence.type === 'photo' ? (
|
{evidence.type === 'photo' ? (
|
||||||
<img className="Evidence__Icon" src={evidence.photo_url} />
|
<img className="Evidence__Icon" src={evidence.photo_url} />
|
||||||
) : (
|
) : (
|
||||||
// eslint-disable-next-line react/no-danger
|
// biome-ignore lint/security/noDangerouslySetInnerHtml: ignore
|
||||||
<div dangerouslySetInnerHTML={{ __html: evidence.text }} />
|
<div dangerouslySetInnerHTML={{ __html: evidence.text }} />
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const MarkdownRenderer = (props: MarkdownRendererProps) => {
|
|||||||
content = sanitizeText(content, /* advHtml = */ false);
|
content = sanitizeText(content, /* advHtml = */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line react/no-danger
|
// biome-ignore lint/security/noDangerouslySetInnerHtml: ignore
|
||||||
return <div dangerouslySetInnerHTML={{ __html: content }} />;
|
return <div dangerouslySetInnerHTML={{ __html: content }} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,13 @@ export const NtosCivCargoHoldTerminal = (props) => {
|
|||||||
<Section
|
<Section
|
||||||
title="Bounty Choice"
|
title="Bounty Choice"
|
||||||
buttons={
|
buttons={
|
||||||
<>
|
<Button
|
||||||
<Button
|
icon={id_bounty_info ? 'recycle' : 'pen'}
|
||||||
icon={id_bounty_info ? 'recycle' : 'pen'}
|
color={id_bounty_info ? 'green' : 'default'}
|
||||||
color={id_bounty_info ? 'green' : 'default'}
|
tooltip={id_bounty_info ? 'Replace Bounty' : 'New Bounty'}
|
||||||
tooltip={id_bounty_info ? 'Replace Bounty' : 'New Bounty'}
|
disabled={!id_inserted}
|
||||||
disabled={!id_inserted}
|
onClick={() => act('bounty')}
|
||||||
onClick={() => act('bounty')}
|
/>
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<LabeledList>
|
<LabeledList>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
VirtualList,
|
VirtualList,
|
||||||
} from 'tgui-core/components';
|
} from 'tgui-core/components';
|
||||||
import { BooleanLike, classes } from 'tgui-core/react';
|
import { type BooleanLike, classes } from 'tgui-core/react';
|
||||||
import { capitalize } from 'tgui-core/string';
|
import { capitalize } from 'tgui-core/string';
|
||||||
|
|
||||||
import { useBackend } from '../backend';
|
import { useBackend } from '../backend';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable react/jsx-no-undef */
|
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable react/jsx-no-undef */
|
|
||||||
import {
|
import {
|
||||||
createContext,
|
createContext,
|
||||||
type Dispatch,
|
type Dispatch,
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ type QuirkListProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type QuirkProps = {
|
type QuirkProps = {
|
||||||
// eslint-disable-next-line react/no-unused-prop-types
|
|
||||||
onClick: (quirkName: string, quirk: Quirk) => void;
|
onClick: (quirkName: string, quirk: Quirk) => void;
|
||||||
randomBodyEnabled: boolean;
|
randomBodyEnabled: boolean;
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
@@ -87,7 +86,6 @@ function QuirkList(props: QuirkProps & QuirkListProps) {
|
|||||||
type QuirkDisplayProps = {
|
type QuirkDisplayProps = {
|
||||||
quirk: Quirk & { failTooltip?: string };
|
quirk: Quirk & { failTooltip?: string };
|
||||||
// bugged
|
// bugged
|
||||||
// eslint-disable-next-line react/no-unused-prop-types
|
|
||||||
quirkKey: string;
|
quirkKey: string;
|
||||||
} & QuirkProps;
|
} & QuirkProps;
|
||||||
|
|
||||||
|
|||||||
@@ -391,11 +391,11 @@ const ProductPrice = (props: ProductPriceProps) => {
|
|||||||
const { data } = useBackend<VendingData>();
|
const { data } = useBackend<VendingData>();
|
||||||
const { displayed_currency_name } = data;
|
const { displayed_currency_name } = data;
|
||||||
const { discount, free, product, redPrice } = props;
|
const { discount, free, product, redPrice } = props;
|
||||||
let standardPrice = product.price + '';
|
let standardPrice = `${product.price}`;
|
||||||
if (free) {
|
if (free) {
|
||||||
standardPrice = 'FREE';
|
standardPrice = 'FREE';
|
||||||
} else if (discount) {
|
} else if (discount) {
|
||||||
standardPrice = redPrice + '';
|
standardPrice = `${redPrice}`;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Stack.Item fontSize={0.85} color={'gold'}>
|
<Stack.Item fontSize={0.85} color={'gold'}>
|
||||||
|
|||||||
Reference in New Issue
Block a user