Skip to content

Commit c8ab553

Browse files
kwhubergithub-actions[bot]
authored andcommitted
Lint code with ESLint and Prettier
Triggered by fe73dad on branch refs/heads/issue-7262
1 parent fe73dad commit c8ab553

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

specifyweb/frontend/js_src/lib/components/Atoms/Form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ export const Select = wrap<
353353
* the background in dark-mode. This is a fix:
354354
*/
355355
if (props.required !== true && props.multiple === true) {
356-
selected.map((option) => option.classList.add('dark:bg-neutral-500')); // highlights selected object less bright
357-
unselected.map((option) =>
358-
option.classList.remove('dark:bg-neutral-500') // prevents a previously selected option from remaining highlighted
356+
selected.map((option) => option.classList.add('dark:bg-neutral-500')); // Highlights selected object less bright
357+
unselected.map(
358+
(option) => option.classList.remove('dark:bg-neutral-500') // Prevents a previously selected option from remaining highlighted
359359
);
360360
}
361361
const value = (event.target as HTMLSelectElement).value;

specifyweb/frontend/js_src/lib/components/DataModel/businessRules.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { softFail } from '../Errors/Crash';
77
import { isTreeResource } from '../InitialContext/treeRanks';
88
import type { BusinessRuleDefs } from './businessRuleDefs';
99
import { businessRuleDefs } from './businessRuleDefs';
10-
import { backboneFieldSeparator, backendFilter, djangoLookupSeparator } from './helpers';
10+
import {
11+
backboneFieldSeparator,
12+
backendFilter,
13+
djangoLookupSeparator,
14+
} from './helpers';
1115
import type {
1216
AnySchema,
1317
AnyTree,
@@ -316,10 +320,7 @@ export class BusinessRuleManager<SCHEMA extends AnySchema> {
316320
)
317321
);
318322

319-
const stringValuesAreEqual = (
320-
left: string,
321-
right: string
322-
): boolean =>
323+
const stringValuesAreEqual = (left: string, right: string): boolean =>
323324
rule.isDatabaseConstraint
324325
? left.localeCompare(right, undefined, { sensitivity: 'accent' }) === 0
325326
: left === right;

specifyweb/frontend/js_src/lib/components/InitialContext/systemInfo.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function buildStatsLambdaUrl(base: string | null | undefined): string | null {
4444
if (!hasRoute) {
4545
const stage = 'prod';
4646
const route = 'AggrgatedSp7Stats';
47-
u = `${u.replace(/\/$/, '') }/${stage}/${route}`;
47+
u = `${u.replace(/\/$/, '')}/${stage}/${route}`;
4848
}
4949
return u;
5050
}
@@ -58,7 +58,10 @@ export const fetchContext = load<SystemInfo>(
5858
if (systemInfo.stats_url !== null) {
5959
let counts: StatsCounts | null = null;
6060
try {
61-
counts = await load<StatsCounts>('/context/stats_counts.json', 'application/json');
61+
counts = await load<StatsCounts>(
62+
'/context/stats_counts.json',
63+
'application/json'
64+
);
6265
} catch {
6366
// If counts fetch fails, proceed without them.
6467
counts = null;
@@ -102,12 +105,13 @@ export const fetchContext = load<SystemInfo>(
102105

103106
const lambdaUrl = buildStatsLambdaUrl(systemInfo.stats_2_url);
104107
if (lambdaUrl) {
105-
await ping(formatUrl(lambdaUrl, parameters, false), { errorMode: 'silent' })
106-
.catch(softFail);
108+
await ping(formatUrl(lambdaUrl, parameters, false), {
109+
errorMode: 'silent',
110+
}).catch(softFail);
107111
}
108112
}
109113

110114
return systemInfo;
111115
});
112116

113-
export const getSystemInfo = (): SystemInfo => systemInfo;
117+
export const getSystemInfo = (): SystemInfo => systemInfo;

0 commit comments

Comments
 (0)