mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-30 17:39:58 -07:00
Fix eslint issues
This commit is contained in:
committed by
Will Greenberg
parent
97cbe62f42
commit
5e328b889b
@@ -1,11 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import {
|
||||
EventType,
|
||||
parse_finished_report,
|
||||
Severity,
|
||||
type QualitativeWarning,
|
||||
} from './analysis.svelte';
|
||||
import { parse_ndjson, type NewlineDeliminatedJson } from './ndjson';
|
||||
import { EventType, parse_finished_report, Severity } from './analysis.svelte';
|
||||
import { type NewlineDeliminatedJson } from './ndjson';
|
||||
|
||||
const SAMPLE_REPORT_NDJSON: NewlineDeliminatedJson = [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { get_report, type AnalysisReport } from './analysis.svelte';
|
||||
import type { Manifest, ManifestEntry } from './manifest.svelte';
|
||||
import { req } from './utils.svelte';
|
||||
|
||||
export enum AnalysisStatus {
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { AnalysisStatus } from '$lib/analysisManager.svelte';
|
||||
import {
|
||||
EventType,
|
||||
type AnalyzerMetadata,
|
||||
type ReportMetadata,
|
||||
type AnalysisRow,
|
||||
type AnalysisReport,
|
||||
} from '$lib/analysis.svelte';
|
||||
import type { ManifestEntry } from '$lib/manifest.svelte';
|
||||
import { EventType, type AnalysisReport } from '$lib/analysis.svelte';
|
||||
let {
|
||||
report,
|
||||
}: {
|
||||
@@ -48,7 +40,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each report.rows as row, row_idx}
|
||||
{#each report.rows as row}
|
||||
{#each row.analysis as analysis}
|
||||
{@const parsed_date = new Date(analysis.timestamp)}
|
||||
{#each analysis.events.filter((e) => e !== null) as event}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { AnalysisStatus } from '$lib/analysisManager.svelte';
|
||||
import {
|
||||
EventType,
|
||||
type AnalyzerMetadata,
|
||||
type ReportMetadata,
|
||||
type AnalysisRow,
|
||||
} from '$lib/analysis.svelte';
|
||||
import { type ReportMetadata } from '$lib/analysis.svelte';
|
||||
import type { ManifestEntry } from '$lib/manifest.svelte';
|
||||
import AnalysisTable from './AnalysisTable.svelte';
|
||||
let {
|
||||
@@ -13,11 +7,6 @@
|
||||
}: {
|
||||
entry: ManifestEntry;
|
||||
} = $props();
|
||||
|
||||
const date_formatter = new Intl.DateTimeFormat(undefined, {
|
||||
timeStyle: 'long',
|
||||
dateStyle: 'short',
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="container mt-2">
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { req } from '$lib/utils.svelte';
|
||||
import DeleteButton from './DeleteButton.svelte';
|
||||
|
||||
function confirmDelete() {
|
||||
if (window.confirm(`Permanently delete ALL recordings?`)) {
|
||||
req('POST', '/api/delete-all-recordings');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row justify-end gap-2">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { ManifestEntry } from '$lib/manifest.svelte';
|
||||
import { req } from '$lib/utils.svelte';
|
||||
let {
|
||||
text,
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
let {
|
||||
entry,
|
||||
current,
|
||||
i,
|
||||
server_is_recording,
|
||||
}: {
|
||||
entry: ManifestEntry;
|
||||
current: boolean;
|
||||
i: number;
|
||||
server_is_recording: boolean;
|
||||
} = $props();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Manifest, ManifestEntry } from '$lib/manifest.svelte';
|
||||
import { ManifestEntry } from '$lib/manifest.svelte';
|
||||
import TableRow from './ManifestTableRow.svelte';
|
||||
import Card from './ManifestCard.svelte';
|
||||
interface Props {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class Manifest {
|
||||
public current_entry: ManifestEntry | undefined;
|
||||
|
||||
constructor(json: JsonManifest) {
|
||||
for (let entry of json.entries) {
|
||||
for (const entry of json.entries) {
|
||||
this.entries.push(new ManifestEntry(entry));
|
||||
}
|
||||
if (json.current_entry !== null) {
|
||||
@@ -31,7 +31,7 @@ export class Manifest {
|
||||
}
|
||||
|
||||
async set_analysis_status(manager: AnalysisManager) {
|
||||
for (let entry of this.entries) {
|
||||
for (const entry of this.entries) {
|
||||
entry.analysis_status = manager.status.get(entry.name);
|
||||
entry.analysis_report = manager.reports.get(entry.name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user