All Projects → amilajack → Eslint Plugin Compat

amilajack / Eslint Plugin Compat

Licence: mit
Lint the browser compatibility of your code

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Eslint Plugin Compat

Flutter Woocommerce Api
WooCommerce API in Flutter, connect and start developing with the available endpoints like get products, create orders and more.
Stars: ✭ 31 (-98.87%)
Mutual labels:  api, plugin
Fork Ts Checker Webpack Plugin
Webpack plugin that runs typescript type checker on a separate process.
Stars: ✭ 1,343 (-51.04%)
Mutual labels:  eslint, plugin
Modio Unity
Unity Plugin for integrating mod.io - a modding API for game developers
Stars: ✭ 53 (-98.07%)
Mutual labels:  api, plugin
Antilaby
AntiLaby plug-in for Bukkit
Stars: ✭ 6 (-99.78%)
Mutual labels:  api, plugin
Graphql Api For Wp
[READ ONLY] GraphQL API for WordPress
Stars: ✭ 136 (-95.04%)
Mutual labels:  api, plugin
Eslint Plugin Security Node
ESLint security plugin for Node.js
Stars: ✭ 28 (-98.98%)
Mutual labels:  eslint, plugin
Httpie Oauth
OAuth plugin for HTTPie
Stars: ✭ 78 (-97.16%)
Mutual labels:  api, plugin
React Lifecycles Compat
Backwards compatibility polyfill for React class components
Stars: ✭ 457 (-83.34%)
Mutual labels:  api, polyfill
Xseries
Library for cross-version Minecraft Bukkit support and various efficient API methods.
Stars: ✭ 109 (-96.03%)
Mutual labels:  api, plugin
Typescript Eslint Language Service
TypeScript language service plugin for ESLint
Stars: ✭ 108 (-96.06%)
Mutual labels:  eslint, plugin
Clipboard Polyfill
📋 Simple copying on the web, with maximum browser compatibility.
Stars: ✭ 748 (-72.73%)
Mutual labels:  api, polyfill
Share Api Polyfill
A polyfill for the sharing that can be used in desktop too, so your users can shere in their twitter, facebook, messenger, linkedin, sms, e-mail, print, telegram or whatsapp.
Stars: ✭ 210 (-92.34%)
Mutual labels:  api, polyfill
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (-78.02%)
Mutual labels:  api, eslint
Eslint Import Resolver Jest
🃏 Jest import resolution plugin for eslint-plugin-import
Stars: ✭ 29 (-98.94%)
Mutual labels:  eslint, plugin
Resize Observer
Polyfills the ResizeObserver API.
Stars: ✭ 540 (-80.31%)
Mutual labels:  api, polyfill
Base
Base is the foundation for creating modular, unit testable and highly pluggable, server-side node.js applications.
Stars: ✭ 67 (-97.56%)
Mutual labels:  api, plugin
browserslist-generator
A library that makes generating and validating Browserslists a breeze!
Stars: ✭ 77 (-97.19%)
Mutual labels:  caniuse, browserslist
core2
The bare essentials of std::io for use in no_std. Alloc support is optional.
Stars: ✭ 67 (-97.56%)
Mutual labels:  polyfill, compat
Typescript Eslint
✨ Monorepo for all the tooling which enables ESLint to support TypeScript
Stars: ✭ 10,831 (+294.86%)
Mutual labels:  eslint, plugin
Open Rest
Standard rest server, Base on restify and sequelize
Stars: ✭ 136 (-95.04%)
Mutual labels:  api, eslint

eslint-plugin-compat

Build Status Financial Contributors on Open Collective NPM version npm Backers on Open Collective Sponsors on Open Collective

Lint the browser compatibility of your code

demo of plugin usage

Setup

1. Install

npm install --save-dev eslint-plugin-compat

2. Update ESLint Config

.eslintrc.json

   {
+    "extends": ["plugin:compat/recommended"],
+    "env": {
+      "browser": true
+    },
     // ...
   }

3. Configure Target Browsers

Browser targets are configured using browserslist. You can configure browser targets in your package.json:

package.json

   {
     // ...
+    "browserslist": [
+      "defaults"
+    ]
  }

If no configuration is found, browserslist defaults to "> 0.5%, last 2 versions, Firefox ESR, not dead".

See browserslist/browserslist for more details.

Adding Polyfills

Add polyfills to the settings section of your eslint config. Append the name of the object and the property if one exists. Here are some examples:

{
  // ...
  "settings": {
    "polyfills": [
      // Example of marking entire API and all methods and properties as polyfilled
      "Promise",
      // Example of marking specific method of an API as polyfilled
      "WebAssembly.compile",
      // Example of API with no property (i.e. a function)
      "fetch",
      // Example of instance method, must add `.prototype.`
      "Array.prototype.push"
    ]
  }
}

Demo

For a minimal demo, see amilajack/eslint-plugin-compat-demo

Advanced

Road Map

See the Road Map for the details.

Inspiration

Toolchains for native platforms, like iOS and Android, have had API linting from the start. It's about time that the web had similar tooling.

This project was inspired by a two hour conversation I had with someone on the experience of web development and if it is terrible or not. The premise they argued was that x browser doesn't support y feature while z browser does. Eventually, I agreed with him on this and made this plugin to save web developers from having to memorize the browser compatibility of WebAPIs.

Related

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].