salesforce / eslint-plugin-lwc

Official ESLint rules for LWC
MIT License
98 stars 32 forks source link

feat: update rule `no-browser-globals-during-ssr` to be more open #138

Closed seckardt closed 11 months ago

seckardt commented 11 months ago

The no-browser-globals-during-ssr is very limited in its current detection capabilities as it doesn't detect the use of non-SSRable browser APIs outside the context of LWCs. If bundles e.g. reference browser-only APIs in utility methods, these references pass without warnings. This PR keeps the old behavior for LWCs, but warns/errors about the use of non-SSRable Web APIs more aggressively outside LWCs.