Open Boshen opened 4 days ago
@Boshen how do you think about oxlint rule that help developers found potentially problematic "side-effect" places in source code? Currently I try to migrate my large monorepo to isolatedModules / isolatedDeclarations and also mark libs as "sideEffects": false but has fear about potential side effects :)
TypeScript 5.6 add some useful --noUncheckedSideEffectImports
but only for checking possibility to import it correctly. But would be good to have warns / errors when code not just imported but run (evaluated) after import in old school fashion.
@Boshen how do you think about oxlint rule that help developers found potentially problematic "side-effect" places in source code? Currently I try to migrate my large monorepo to isolatedModules / isolatedDeclarations and also mark libs as "sideEffects": false but has fear about potential side effects :)
TypeScript 5.6 add some useful
--noUncheckedSideEffectImports
but only for checking possibility to import it correctly. But would be good to have warns / errors when code not just imported but run (evaluated) after import in old school fashion.
It's doable but probably not at this stage. We also have tree_shaking/no-side-effects-in-initialization
https://oxc.rs/docs/guide/usage/linter/rules/tree_shaking/no-side-effects-in-initialization.html for libraries.
I managed to fix this issue by juggling Rust in https://github.com/oxc-project/oxc/pull/6549