squirrelscan
GitHub

Legacy JavaScript

Detects ES5 polyfills and legacy JavaScript code

Detects ES5 polyfills and legacy JavaScript code

Rule ID perf/legacy-js
Category Performance
Scope Per-page
Severity info
Weight 3/10

Solution

Consider removing legacy polyfills if you don’t need to support old browsers. Use differential serving (module/nomodule) to send modern code to modern browsers. Update Babel/TypeScript target to ES2020+ if your audience uses modern browsers. Check browserslist configuration.

Enable / Disable

Disable this rule

[rules]
disable = ["perf/legacy-js"]

Disable all Performance rules

[rules]
disable = ["perf/*"]

Enable only this rule

[rules]
enable = ["perf/legacy-js"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close