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 Configuration? (21 Best Rules!)

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

The Ultimate Guide to ESLint Global Variables

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”: 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 TypeScript Rules

This tutorial provides syntax for ignoring lint rules at the line, file, and package level. I focus on syntax for TypeScript-ESLint but will include TSLint and ESLint commands. TSLint was deprecated in late 2019 in favor of typescript-eslint. The combined linter is a good idea because both TSLint and ESLint are linters and many people … Read more