sindresorhus / eslint-plugin-unicorn

More than 100 powerful ESLint rules
MIT License
4.31k stars 365 forks source link

prefer-modern-dom-apis: false positives with PixiJS #2372

Open latin-1 opened 5 months ago

latin-1 commented 5 months ago

PixiJS's Contaienr has a '.removeChild(...)' API that should not be considered incorrect.

https://pixijs.download/release/docs/scene.Container.html#removeChild

container.removeChild(child);
fregante commented 4 months ago

This is because unicorn doesn't know what container is. However the suggestion still applies since child.removeFromParent() exists in Pixi.js as well