Skip to content

Commit ec2a3ac

Browse files
Robin Offeljschroeter
authored andcommitted
FSR-64: bump @knime/eslint-config version to 9.0.0
FSR-64 (Update to Eslint 9)
1 parent 58fa384 commit ec2a3ac

File tree

25 files changed

+100
-177
lines changed

25 files changed

+100
-177
lines changed

.changeset/sweet-mayflies-bow.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@ export default [
1818
},
1919
},
2020
},
21+
{
22+
files: ["packages/lint/**/*.js"],
23+
rules: {
24+
"no-magic-numbers": "off",
25+
},
26+
},
2127
];

packages/components/src/components/forms/NumberInput/NumberInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export default {
204204
205205
/** Mimic stepping to nearest step with safe value rounding */
206206
let parsedVal = value + increment;
207-
parsedVal = Math.round(parsedVal * 10) / 10; // eslint-disable-line no-magic-numbers
207+
parsedVal = Math.round(parsedVal * 10) / 10;
208208
209209
/**
210210
* All measures have been taken to ensure a valid value at this point, so if the last

packages/components/src/components/forms/SearchInput/SearchInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export default {
9999
"toggle-inverse-search",
100100
"focus",
101101
],
102+
expose: ["focus"],
102103
data() {
103104
return {
104105
caseSensitiveSearch: this.initialCaseSensitiveSearch,
@@ -119,7 +120,6 @@ export default {
119120
return { ...defaultTooltips, ...this.tooltips };
120121
},
121122
},
122-
expose: ["focus"],
123123
async mounted() {
124124
if (this.focusOnMount) {
125125
await nextTick();

packages/components/src/components/forms/TimePartInput/TimePartInput.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ export default {
152152
if (isNaN(value) || (!value && value !== 0) || value < 0) {
153153
return value;
154154
}
155-
// eslint-disable-next-line no-magic-numbers
156155
const strValue = value.toString(10);
157156
return this.minDigits < 1
158157
? strValue
@@ -175,7 +174,6 @@ export default {
175174
this.localValue = "";
176175
} else {
177176
// use parsed value and convert back to string to remove leading zeros etc.
178-
// eslint-disable-next-line no-magic-numbers
179177
const inputLength = inputNum.toString(10).length;
180178
// skip empty values (they become NaN which is 3 long)
181179
if (rawValue === "") {
@@ -235,7 +233,7 @@ export default {
235233
236234
/** Mimic stepping to nearest step with safe value rounding */
237235
let parsedVal = value + increment;
238-
parsedVal = Math.round(parsedVal * 10) / 10; // eslint-disable-line no-magic-numbers
236+
parsedVal = Math.round(parsedVal * 10) / 10;
239237
240238
/**
241239
* All measures have been taken to ensure a valid value at this point, so if the last

packages/components/src/components/node/NodePreview.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ export default {
8585
const portSize = 9;
8686
const bgSize = 32;
8787
88-
/* eslint-disable no-magic-numbers */
8988
let spacing = 1;
9089
if (total === 2) {
9190
spacing = 12;
9291
} else if (total === 3) {
9392
spacing = 1.5;
9493
}
95-
/* eslint-enable no-magic-numbers */
9694
9795
const totalHeight = total * portSize + (total - 1) * spacing;
9896
const delta = (bgSize - totalHeight) / 2;

packages/components/src/components/node/PortIcon.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ export default {
4949
];
5050
5151
// y and d are chosen so the triangle (including strokeWidth) fits precisely in the 9x9 port
52-
/* eslint-disable no-magic-numbers */
5352
const d = Math.sqrt(5) / 2;
5453
const y = d / 2 + 1 / 4;
55-
/* eslint-enable no-magic-numbers */
5654
5755
// move points towards the center of the triangle according to strokeWidth
5856
const { strokeWidth } = this;

packages/hub-features/src/components/versions/ManageVersions.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const labelsEventBus = useEventBus("versionLabels");
4242
4343
const closeLabelPopovers = throttle(() => {
4444
labelsEventBus.emit("versionLabelShowPopover");
45-
// eslint-disable-next-line no-magic-numbers
4645
}, 10000); // Arbitrary delay to reduce overhead, is automatically reset @scrollend
4746
</script>
4847

packages/hub-features/src/useFileUpload/useFileUpload.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ export const useFileUpload = (options: UseFileUploadOptions = {}) => {
277277
const uploadPayload = await promise.retryPromise({
278278
fn: () => prepareUpload(parentId, enqueableFiles),
279279
excludeError: (error: FetchError) =>
280-
// eslint-disable-next-line no-magic-numbers
281280
Boolean(error.statusCode && error.statusCode < 500),
282281
retryDelayMS: DEFAULT_RETRY_DELAY_MS,
283282
});

packages/jsonforms/src/uiComponents/__tests__/IntegerControl.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ describe("IntegerControl.vue", () => {
6262
});
6363

6464
it("renders", () => {
65-
// @ts-expect-error Property 'exists' does not exist on type
66-
expect(wrapper.getComponent(NumberInput).exists()).toBe(true);
65+
expect(wrapper.findComponent(NumberInput).exists()).toBe(true);
6766
});
6867

6968
it("sets labelForId", () => {

0 commit comments

Comments
 (0)