mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +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);
|
||||
|
||||
/* eslint-disable react/no-danger */
|
||||
// biome-ignore-start lint/security/noDangerouslySetInnerHtml: ignore
|
||||
reactRoot.render(
|
||||
<Element {...outputProps}>
|
||||
<span dangerouslySetInnerHTML={oldHtml} />
|
||||
</Element>,
|
||||
childNode,
|
||||
);
|
||||
// biome-ignore-end lint/security/noDangerouslySetInnerHtml: ignore
|
||||
}
|
||||
|
||||
// Highlight text
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable */
|
||||
|
||||
(function () {
|
||||
// Utility functions
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -89,9 +89,7 @@ class PaintCanvas extends Component<PaintCanvasProps> {
|
||||
if (this.zoom !== this.props.zoom) {
|
||||
this.prepareCanvas();
|
||||
this.syncCanvas();
|
||||
}
|
||||
// eslint-disable-next-line max-len
|
||||
else if (
|
||||
} else if (
|
||||
(this.props.value !== undefined &&
|
||||
JSON.stringify(this.baseImageData) !==
|
||||
JSON.stringify(fromDM(this.props.value))) ||
|
||||
|
||||
@@ -170,7 +170,7 @@ export function Evidence(props: Props) {
|
||||
{evidence.type === 'photo' ? (
|
||||
<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 }} />
|
||||
)}
|
||||
</Box>
|
||||
|
||||
@@ -34,7 +34,7 @@ export const MarkdownRenderer = (props: MarkdownRendererProps) => {
|
||||
content = sanitizeText(content, /* advHtml = */ false);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/no-danger
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: ignore
|
||||
return <div dangerouslySetInnerHTML={{ __html: content }} />;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,15 +26,13 @@ export const NtosCivCargoHoldTerminal = (props) => {
|
||||
<Section
|
||||
title="Bounty Choice"
|
||||
buttons={
|
||||
<>
|
||||
<Button
|
||||
icon={id_bounty_info ? 'recycle' : 'pen'}
|
||||
color={id_bounty_info ? 'green' : 'default'}
|
||||
tooltip={id_bounty_info ? 'Replace Bounty' : 'New Bounty'}
|
||||
disabled={!id_inserted}
|
||||
onClick={() => act('bounty')}
|
||||
/>
|
||||
</>
|
||||
<Button
|
||||
icon={id_bounty_info ? 'recycle' : 'pen'}
|
||||
color={id_bounty_info ? 'green' : 'default'}
|
||||
tooltip={id_bounty_info ? 'Replace Bounty' : 'New Bounty'}
|
||||
disabled={!id_inserted}
|
||||
onClick={() => act('bounty')}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<LabeledList>
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
Tooltip,
|
||||
VirtualList,
|
||||
} 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 { useBackend } from '../backend';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/jsx-no-undef */
|
||||
import { useContext } from 'react';
|
||||
import {
|
||||
Button,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/jsx-no-undef */
|
||||
import {
|
||||
createContext,
|
||||
type Dispatch,
|
||||
|
||||
@@ -50,7 +50,6 @@ type QuirkListProps = {
|
||||
};
|
||||
|
||||
type QuirkProps = {
|
||||
// eslint-disable-next-line react/no-unused-prop-types
|
||||
onClick: (quirkName: string, quirk: Quirk) => void;
|
||||
randomBodyEnabled: boolean;
|
||||
selected: boolean;
|
||||
@@ -87,7 +86,6 @@ function QuirkList(props: QuirkProps & QuirkListProps) {
|
||||
type QuirkDisplayProps = {
|
||||
quirk: Quirk & { failTooltip?: string };
|
||||
// bugged
|
||||
// eslint-disable-next-line react/no-unused-prop-types
|
||||
quirkKey: string;
|
||||
} & QuirkProps;
|
||||
|
||||
|
||||
@@ -391,11 +391,11 @@ const ProductPrice = (props: ProductPriceProps) => {
|
||||
const { data } = useBackend<VendingData>();
|
||||
const { displayed_currency_name } = data;
|
||||
const { discount, free, product, redPrice } = props;
|
||||
let standardPrice = product.price + '';
|
||||
let standardPrice = `${product.price}`;
|
||||
if (free) {
|
||||
standardPrice = 'FREE';
|
||||
} else if (discount) {
|
||||
standardPrice = redPrice + '';
|
||||
standardPrice = `${redPrice}`;
|
||||
}
|
||||
return (
|
||||
<Stack.Item fontSize={0.85} color={'gold'}>
|
||||
|
||||
Reference in New Issue
Block a user