{"id":13800771,"url":"https://github.com/robatwilliams/es-compat","last_synced_at":"2025-04-09T21:23:42.281Z","repository":{"id":36461316,"uuid":"224949855","full_name":"robatwilliams/es-compat","owner":"robatwilliams","description":"*** DEPRECATED*** Check JavaScript code compatibility with target runtime environments","archived":false,"fork":false,"pushed_at":"2024-04-25T02:21:50.000Z","size":1151,"stargazers_count":69,"open_issues_count":14,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T03:35:02.787Z","etag":null,"topics":["browser","browser-compat-data","browserslist","caniuse","checker","compat","compatibility","ecmascript","es","eslint","eslint-plugin-compat","eslint-plugin-es","eslintplugin","javascript","kangax","lint","support"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robatwilliams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-30T02:39:47.000Z","updated_at":"2025-01-08T07:25:33.000Z","dependencies_parsed_at":"2023-01-17T01:41:09.684Z","dependency_job_id":"f9f74225-a65d-4833-a3d3-3a1d84ad0d89","html_url":"https://github.com/robatwilliams/es-compat","commit_stats":{"total_commits":181,"total_committers":4,"mean_commits":45.25,"dds":0.02209944751381221,"last_synced_commit":"561d6e10c1beb35730e2b39c820db7bbb051bb69"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatwilliams%2Fes-compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatwilliams%2Fes-compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatwilliams%2Fes-compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatwilliams%2Fes-compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robatwilliams","download_url":"https://codeload.github.com/robatwilliams/es-compat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248058609,"owners_count":21040783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","browser-compat-data","browserslist","caniuse","checker","compat","compatibility","ecmascript","es","eslint","eslint-plugin-compat","eslint-plugin-es","eslintplugin","javascript","kangax","lint","support"],"created_at":"2024-08-04T00:01:16.096Z","updated_at":"2025-04-09T21:23:42.257Z","avatar_url":"https://github.com/robatwilliams.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Compatibility"],"readme":"\u003c!-- prettier-ignore-start --\u003e\n[![npm version](https://badge.fury.io/js/eslint-plugin-ecmascript-compat.svg)](https://badge.fury.io/js/eslint-plugin-ecmascript-compat)\n[![npm downloads](https://img.shields.io/npm/dm/eslint-plugin-ecmascript-compat.svg)](http://www.npmtrends.com/eslint-plugin-ecmascript-compat)\n\u003c!-- prettier-ignore-end --\u003e\n\n# es-compat\n\n\u003e Check JavaScript code compatibility with target browsers and Node.js versions\n\nChecks that the language features used in your code/bundles are supported by your [browserslist](https://github.com/browserslist/browserslist) targets.\n\n## Tools\n\n- [check-es-compat](/packages/check-es-compat/README.md) - standalone CLI tool\n- [eslint-plugin-ecmascript-compat](/packages/eslint-plugin-ecmascript-compat/README.md) - ESLint plugin\n\n## Rationale\n\nYou might not need a transpiler or polyfills.\n\nOr, you may be transpiling your own code but not prebuilt 3rd-party libraries - leaving you open to breakages when they use new language features.\n\n[ESLint](https://eslint.org) supports targeting a specific ECMAScript version, and [eslint-plugin-es-x](https://github.com/eslint-community/eslint-plugin-es-x) allows forbidding individual language features. However when building applications, what we target are particular browser/runtime versions. This project lets you check compatibility by specifying those targets directly via a browserslist. It will figure out which individual features you can use, by looking up those targets in the [MDN compatibility dataset](https://github.com/mdn/browser-compat-data).\n\n## Usage scenario examples\n\nIf you're not using a transpiler, run the tool/linter on your source code to ensure you're not using language features that aren't supported in your application's supported browsers.\n\nIf you transpile your own code but not 3rd party libraries, run the tool/linter on your output bundles to ensure they're not using language features that aren't supported in your application's supported browsers.\n\n## Scope\n\nECMAScript language features only; this includes syntax, built-ins, and methods.\n\nIt doesn't check browser/runtime-specific APIs (see [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat)), or CSS (see [doiuse](https://github.com/anandthakker/doiuse)).\n\n## ECMAScript version coverage\n\n- ✅ [ES2023](https://pawelgrzybek.com/whats-new-in-ecmascript-2023)\n- ✅ [ES2022](https://exploringjs.com/impatient-js/ch_new-javascript-features.html#new-in-es2022)\n- ✅ [ES2021](https://v8.dev/features/tags/es2021)\n- ✅ [ES2020](https://v8.dev/features/tags/es2020)\n- ✅ [ES2019](https://flaviocopes.com/es2019)\u003csup\u003e1, 2\u003c/sup\u003e\n- ✅ [ES2018](https://flaviocopes.com/es2018)\n- ✅ [ES2017](https://flaviocopes.com/es2017)\n- ✅ [ES2016](https://flaviocopes.com/es2016)\n- ⛔ [ES2015 (ES6)](https://flaviocopes.com/es6)\u003csup\u003e3\u003c/sup\u003e\n- ⛔ ES5\u003csup\u003e4\u003c/sup\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003csup\u003en\u003c/sup\u003e Expand for footnotes...\u003c/summary\u003e\n\n\u003csup\u003e1\u003c/sup\u003e Excluding features not statically detectable: revised `Function.prototype.toString`, stable `Array.prototype.sort`, well-formed `JSON.stringify`.\n\n\u003csup\u003e2\u003c/sup\u003e Excluding `Symbol.prototype.description`; as a debug feature, it's not worth the false positives that arise due to its name and not being a method.\n\n\u003csup\u003e3\u003c/sup\u003e ES2015 (ES6) is out of scope; it's been [supported](https://caniuse.com/#feat=es6) by evergreen browsers for many years. Assisting you to continue supporting [IE11](https://death-to-ie11.com/) is not a goal of this tool.\n\n\u003csup\u003e4\u003c/sup\u003e ES5 is out of scope; it's over 10 years old and [supported](https://caniuse.com/es6#feat=es5) even in IE10.\n\n\u003c/details\u003e\n\n## Browser compatibility data\n\nWe use a pinned version of `@mdn/browser-compat-data`, because their [SemVer policy](https://github.com/mdn/browser-compat-data#semantic-versioning-policy) allows for breaking changes to the data structure even in minor and patch releases. If you need to use more up to date data, use the `overrides` facility of `package.json` to specify a later version - but be aware that it might break.\n\n## Limitations\n\nBecause JavaScript is untyped, detection of some features' usage (namely prototype methods) through static analysis requires some assumptions to be made. This shouldn't be a problem as long as you avoid creating your own methods having the same names, or write code in an unusual way to deliberately evade detection.\n\nSupport can only be checked for the [browsers and runtimes covered](https://github.com/mdn/browser-compat-data/tree/main/browsers) by the MDN compatibility dataset.\n\nThe MDN compatibility dataset has very good feature coverage of the top ~6 desktop and mobile browsers, and Node.js (much more than [kangax/compat-table](https://github.com/kangax/compat-table)). In case of missing data for a feature (support unknown, or unknown in which version support was added), we currently assume support.\n\n## Contributing\n\n[Contributions](CONTRIBUTING.md) and feedback welcome. Please see the GitHub issues or create one, as appropriate.\n\n## Related\n\n- [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) - for browser APIs\n- [doiuse](https://github.com/anandthakker/doiuse) - for CSS\n- [eslint-plugin-es-x](https://github.com/eslint-community/eslint-plugin-es-x) (formerly [eslint-plugin-es](https://github.com/mysticatea/eslint-plugin-es))\\*\n- [@mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)\\*\n\n\\* Thanks to these projects in particular (and many others) for making this project possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobatwilliams%2Fes-compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobatwilliams%2Fes-compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobatwilliams%2Fes-compat/lists"}