Skip to content

Commit aeb6d8e

Browse files
committed
Fix lints
1 parent 4b39121 commit aeb6d8e

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed

DEVELOP.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Development Notes
2+
3+
## Comments about `biome.json`
4+
5+
- `lint/style/noNonNullAssertion` disabled because https://github.com/FNNDSC/fnndsc/issues/101

biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"linter": {
1515
"enabled": true,
1616
"rules": {
17-
"recommended": true
17+
"recommended": true,
18+
"style": {
19+
"noNonNullAssertion": "off"
20+
}
1821
}
1922
},
2023
"vcs": {

src/components/VisualDatasets/client/DatasetFile.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
import { Problem } from "../types.ts";
1414
import problems from "./problems.tsx";
1515
import { DatasetVolume, SupportedVolumeSettings } from "../models.ts";
16-
import { produce } from "immer";
1716
import { Option, none, some, match } from "fp-ts/Option";
1817
import { pipe } from "fp-ts/function";
1918
import { parse as parseJson } from "fp-ts/Json";
@@ -165,9 +164,8 @@ class DatasetFile {
165164
}
166165

167166
get metadata(): DatasetFileMetadata {
168-
return produce(this.options, (draft) => {
169-
delete draft.niivue_defaults;
170-
});
167+
const { niivue_defaults: _, ...rest } = this.options;
168+
return rest;
171169
}
172170

173171
get tags(): TagSet {

src/components/VisualDatasets/client/DatasetFilesClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function isSubset(tags: TagSet, match: TagSet): boolean {
8080
if (!(key in tags)) {
8181
return false;
8282
}
83-
if (tags[key] != value) {
83+
if (tags[key] !== value) {
8484
return false;
8585
}
8686
}

src/components/VisualDatasets/client/helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ function findVisualDatasetInstancePairs(
2323
// contain all plugin instances of a feed, so we're going to badly
2424
// throw an Error here.
2525
throw new Error(
26-
"Previous not found for pl-visual-dataset plugin instance " +
27-
`id=${indexPlinst.data.id} previous_id=${prev}`,
26+
`Previous not found for pl-visual-dataset plugin instance id=${indexPlinst.data.id} previous_id=${prev}`,
2827
);
2928
}
3029
return { indexPlinst, dataPlinst };

src/components/VisualDatasets/client/problems.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ const PROBLEMS = {
143143
},
144144
} satisfies Record<
145145
string,
146-
Problem | ((...args: any[]) => Problem) | ((...args: any[]) => Problem[])
146+
// biome-ignore lint/suspicious/noExplicitAny: it's fine to use any for rest arguments in satisfies operator
147+
Problem | ((...args: any[]) => Problem | Problem[])
147148
>;
148149

149150
export default PROBLEMS;

src/components/VisualDatasets/client/testData/feedplugininstancelist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function getPluginInstances(): FeedPluginInstanceList {
55
const list = new FeedPluginInstanceList("https://example.org", {
66
token: "i am a mock, I have no token",
77
});
8-
list.collection = data["collection"];
8+
list.collection = data.collection;
99
return list;
1010
}
1111

src/components/VisualDatasets/client/testData/plVisualDatasetFilebrowserFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function getPlVisualDatasetFilebrowserFileList(): FileBrowserPathFileList {
77
const list = new FileBrowserPathFileList("https://example.org", {
88
token: "i am a mock, I have no token",
99
});
10-
list.collection = data["collection"];
10+
list.collection = data.collection;
1111
return list;
1212
}
1313

0 commit comments

Comments
 (0)