@zonedigital/eslint-config-zone

5.3.0 • Public • Published

@zonedigital/eslint-config-zone

Part of Zone Frontend npm downloads

This package provides Zone's JavaScript style guide as an extensible shared config.

Installation

npm i @zonedigital/eslint-config-zone

Usage

Add the Zone rules to your eslint config. Be sure to add as the last item.

{
  "extends": [..., "@zonedigital/eslint-config-zone"],
  // ... project config here, if any ...
}

Compat

This config uses eslint-plugin-compat. It lints the browser compatibility of your code via Browserslist (see Zone's browserslist package). Potential browser compatibility issues will be shown as warnings. If you're using babel-env and it is using the same browserslist config to automatically add these polyfills, you can silence the warnings - see Adding polyfills section below.

Adding polyfills

If for example you are using fetch and it is not supported by all the browsers in your support matrix then you can add a polyfill. To tell the linter you have done this, add a reference to the polyfill.

Package Sidebar

Install

npm i @zonedigital/eslint-config-zone

Weekly Downloads

41

Version

5.3.0

License

MIT

Unpacked Size

5.4 kB

Total Files

4

Last publish

Collaborators

  • mika.tasich
  • seab