ESLint plugin (v3.11.4) that reports errors for JavaScript/TypeScript syntax which, if left untranspiled, will not work in target browsers, as defined by a Browserslist config. Unlike eslint-plugin-compat (which checks for missing polyfills), this focuses on native syntax incompatibilities. It ships with recommended configs for browser code and separate TypeScript configs per ECMAScript target year. Integrates with both legacy .eslintrc and flat eslint.config.js formats. Actively maintained with multiple releases per year since initial release.
npm install eslint-plugin-escompatVerified import paths — ran on the pinned version, not inferred.
Flat config example enabling two escompat rules with browser globals.
Update to v3.11.2 or later.
Migrate to flat config (eslint.config.js) using eslint-plugin-escompat's flat configs.
Add a browserslist to your project (e.g., 'last 1 version') or define it in a config file.
Use both eslint-plugin-escompat and eslint-plugin-compat for full coverage.
Run 'npm install --save-dev eslint-plugin-escompat' and ensure the plugin is listed as 'escompat' in plugins.
Check that the plugin is correctly loaded and the rule name matches exactly (e.g., 'no-async-generator', not 'no-async-generator-something').
Update to latest version: 'npm update eslint-plugin-escompat' and verify available rules in documentation.
Ensure browserlist is defined properly in package.json or .browserslistrc (e.g., 'last 1 version').