How can i use --!nolint to disable this strict mode warning?

{16BBB671-5096-4207-8DBE-F1F6285DA235}
this shows this error

now this is dynamic but it’s safe since checks were made on the data table before setting it so there is no reason to do that again (I am not doing that)
I couldn’t find a rule to use with --!nolint to disable this warning

any help is appreciated and thanks

This is how it is likely to work (You must add this before the loop)

--!nolint
for property, value in pairs(data[descendant.ClassName]) do
    descendant[property] = value
    print(descendant, value)
end
1 Like

nolint cannot be used like that
{5D55379B-4C4F-4CA6-A671-106381D1917E}

do it this way if it doesn’t work --!nolint

for property, value in pairs(data[descendant.ClassName]) do
    local success = pcall(function()
        descendant[property] = value
    end)
    if not success then
        warn("Failed to set property:", property)
    end
    print(descendant, value)
end
1 Like

The code will still run even if you have strict mode on and even if dynamic string exists.
Though why do you need strict mode and nolint.
You can probably disable strict mode on checking properties of dynamic string

1 Like

thanks, but I do not want to do that
the data table is safe, and that check is made somewhere else in the script doing it again is just a waste of cpu power

strict mode helps me catch errors early when typing