CHAPTER 23 Ensuring Conformance to Standards

WHAT’S IN THIS CHAPTER?            

  • Installing, configuring and running ESLint
  • Creating custom ESLint rules
  • Enforcing architectural layers

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at www.wrox.com/go/reliablejavascript on the Download Code tab. The files are in the Chapter 23 download and are individually named according to the filenames noted throughout this chapter.

In his article Frequently Forgotten Fundamental Facts about Software Engineering (IEEE Software, May/June 2001), Robert L. Glass posits that ongoing maintenance accounts for, on average, 60 percent of software development costs. We’re sure any developer that has worked on a long-term software project would feel that Mr. Glass isn’t far from the mark.

Inconsistent use of the capabilities of JavaScript that make it powerful, such as method-sharing and monkey-patching, can make JavaScript code more difficult to maintain in the long-term.

When JavaScript was only being used for ad-hoc form validation, long-term maintenance likely wasn’t a prime concern. Now that entire applications, both on the client and the server, are built with JavaScript, maintenance must be at the forefront of the developer’s mind.

An important way to make sure everyone on your team can maintain a body of code is to promote coding standards. This is true on both the small scale of syntax and the large scale of architecture. This chapter explores ...

Get Reliable JavaScript: How to Code Safely in the World's Most Dangerous Language now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.