@zonedigital/eslint-config-zone
v5.3.0
Published
This package provides Zone's JavaScript style guide as an extensible shared config.
Downloads
370
Readme
@zonedigital/eslint-config-zone
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.