You are not returning anything, nor are you editing the Ontology, so everything is working as expected.
The thing that would be relevant to know is what you are actually trying to do. I assume you’re trying to set some objects to be excluded?
If you’re doing this from workshop, it is pretty easy to e.g. create two object tables, each using a filtered ObjectSet (one with isRemoved === false and one where isRemoved === true) and you could then have a button that would flip the state, e.g. move one from the ‘true’-table to the ‘false’-table.
If you’re trying to show whether an object is set as removed or not, you could create an object table with the full ObjectSet and then use value formatting on the property, to mark true as red and false as green (removed / not removed).
To look at your code, the linter is right – you’re not using this variable:
activeExclusions
Your code does the following:
Creates an array of XXXExclusions-objects (unused)
Loop through all XXXExclusions-objects (not just the active ones)
Set every single item to isRemoved = true (not just the active ones)
Returns nothing
You also need to await calls when you’re writing an async function
Passing activeExclusions as a parameter when running the for-loop, actually results in that name being shadowed, meaning you will be iterating over all items in xxxExclusions and setting each one to isRemoved = true.