pre-commit-hooks icon indicating copy to clipboard operation
pre-commit-hooks copied to clipboard

Add ESLint

Open artnc opened this issue 8 months ago • 0 comments

Main new features, many of which are already enforced in our duolingo.com repo:

  • Sort object keys alphabetically
  • Collapse small object literals onto one line
  • Sort members within each import statement
  • Prefer { foo } instead of { foo: foo }
  • Prefer returning expression from arrow function instead of using block form
  • Name catch variables ex and omit if unused
  • Swap if and else branches to avoid unnecessary !
  • Use Record instead of { []: } form
  • Remove unnecessary async
  • Collapse short JSDoc onto one line

artnc avatar Apr 03 '25 06:04 artnc