Exploring the Five Most-Used eslint-plugin-jsx-a11y Rules

ESLint is a fantastic tool that makes it easy for developers to follow accepted standards. ESLint plugins enhance our coding environment with subsets of standards. In this post we’ll look at jsx-a11y and five of the most-used (by Google search volume) WCAG and WAI-ARIA accessibility guidelines it enforces. If you need an overview of eslint-plugin-jsx-a11y … Read more

Using ESLint Plugin jsx-a11y With Recommended and Custom Rules

eslint-plugin-jsx-a11y

Creating “Accessible” web apps is both courteous and a business-savvy goal. Ease of use for the physically impaired increases the potential user base for the apps and may generate good will with users who appreciate such gestures. The ESLint plugin jsx-a11y (also known as eslint-plugin-jsx-a11y) gives developers warnings in their IDE if their code might … Read more

Why Use AirBnB’s ESLint Config? A Review of AirBnB’s Rules List

Properly formatted code is a widely agreed-upon virtue in the craft of programming. There are sometimes differences of opinions on exactly what the right format is, but generally it is formatting that contributes to the readability of code and understanding of the intent of the code. Perhaps the most common rules list for ESLint is … Read more

How and When to Specify Globals in Eslintrc

The ESLint docs have a short section that gives the fundamentals of configuring global variables in a .eslintrc file. However, the docs do not answer the following questions: When and why would I want to define global variables in ESLint? What errors occur when I try to use global vars differently than they are configured? … Read more

How to Use ESLint ‘–fix’ in Your Project: Options, Issue Types, Exit Codes, and More

Many React projects have ESLint set up and devs are fixing lint errors as they code. This is great for reducing bugs, and keeping code cleanly formatted. However, sometimes there’s a situation where a project can have a lot of linting errors (i.e. adding ESLint to an existing project) and it would be tedious for … Read more

How to Ignore and Disable Type Rules Using TypeScript-ESLint

Anytime you can get TypeScript typing working with React code, it’s best to use it. However, there are times that applying TypeScript is so difficult that it is best to tactically disable it. I’ll start with several methods of how to disable linting for a line or lines of code, because the how is factual. … Read more