To lint all our JavaScript we make use of ESLint. This repository contains our default linting configuration.
What follows is a high level summary of how we've applied ESLint's rules:
Errors for the following rules:
- Require Following Curly Brace Conventions
- Enforce newline before and after dot
- Disallow lexical declarations in case/default clauses
- Disallow return before else
- Disallow empty functions
- Disallow empty destructuring patterns
- Disallow eval()
- Disallow Extending of Native Objects
- Disallow unnecessary function binding
- Disallow Case Statement Fallthrough
- Disallow Floating Decimals
- Disallow assignment to native objects or read-only global variables
- Disallow this keywords outside of classes or class-like objects
- Disallow Unnecessary Nested Blocks
- Disallow Functions in Loops
- disallow octal literals
- disallow variable redeclaration
- Disallow Self Assignment
- Disallow Self Compare
- Disallow Use of the Comma Operator
- Disallow redundant return statements
- disallow with statements
- Require Radix Parameter
- Require or disallow Yoda Conditions