An ESLint plugin that checks your JavaScript code for browser compatibility issues against configurable target browsers.
eslint-plugin-compat is an ESLint plugin that statically analyzes JavaScript code to check for browser compatibility issues. It identifies APIs and language features that may not be supported in your target browsers, helping prevent runtime errors and ensuring cross-browser compatibility. The plugin integrates with Browserslist for flexible browser targeting and supports configuration for polyfills and experimental features.
Web developers and teams building JavaScript applications that need to support specific browser versions, particularly those working on projects with strict cross-browser requirements or legacy browser support.
Developers choose eslint-plugin-compat because it provides automated, configurable compatibility checking directly in their ESLint workflow, eliminating the need to manually track browser support tables. Its integration with Browserslist and support for polyfill configuration make it a practical tool for maintaining compatibility without sacrificing development speed.
Check the browser compatibility of your code
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages the standard Browserslist configuration for defining target browsers, allowing seamless integration without extra plugin-specific setup.
Checks a wide range of Web APIs like fetch and Promise against current browser support data, helping catch unsupported features early.
Allows marking specific APIs or methods as polyfilled in settings, reducing false positives for projects that already handle polyfills.
Supports different Browserslist configs for various environments, enabling tailored linting for production vs. modern builds as shown in the README examples.
The ES API linting feature is explicitly labeled as experimental and disabled by default, indicating it may be unstable or incomplete.
Requires manual setup for polyfill lists and conditional checks in ESLint settings, which can be tedious and error-prone for large projects.
As a static linter, it cannot perfectly detect dynamic API usage or runtime feature detection, potentially missing some compatibility issues.