Technology News

A Shared ESLint Configuration

Like our markdown linters, all Mapbox documentation repositories use a shared ESLint configuration. Our configuration covers everything from enforcing React best practices to improving accessibility, including:

  • eslint-config-mapbox is a shared ESLint config for Mapbox engineering teams which serves as the base for our configuration.
  • eslint-plugin-react includes React specific linting rules.
  • eslint-plugin-jsx-a11y checks accessibility rules on JSX elements.
  • eslint-plugin-es allows us to disallow unsupported ECMAScript syntax.
  • eslint-config-prettier turns off all rules that are unnecessary or might conflict with Prettier.
  • eslint-plugin-docs is a private plugin that I’ve been developing to create custom ESLint rules for our documentation sites. So far the plugin makes sure that when you import mapbox-gl that you must include a special component to handle the loading of the map.

ESLint plugins will help keep your code consistent and improve the quality, but they are also excellent teaching tools. When I come across a plugin, I take joy in reading each rule to learn the benefits of enabling or disabling it.


Did you enjoy this post? Support RAICES. RAICES promotes justice by providing free and low-cost legal services to underserved immigrant children, families, and refugees.

Conjuring Generative Blobs With The CSS Paint API
Pittsburgh Google contractors ratify deal with HCL

Related Articles

Supply Chain Resiliency Begins In The Cloud

supply-chain-resiliency-begins-in-the-cloud
As our lives and work continue to adjust, it’s important to retain the many lessons the pandemic has taught us and think about how we can build more resilient supply…

How to Check Bank Balance Without Going to the Bank?

how-to-check-bank-balance-without-going-to-the-bank
The digital era’s technological breakthroughs have made many operations that previously required time and effort a simple chore. Financial transactions, for example, can be completed without visiting a bank. With…