The release note now lives in release-note/release-note.js, with camelCase names and braces around every block. Today Maya ships Fernleaf Bakery’s version 2.4.1. Tomorrow Theo takes over, and Theo has his own habits: single quotes, an opening brace on its own line, no semicolons, and four-space indents, the PEP 8 habit you probably bring from Python too. Whose style wins when Maya and Theo edit the same file?
In Python, you rarely have that argument, because PEP 8 settled most of it and a tool like Black settles the rest. In this lesson, you’ll see who settles it in JavaScript, and how to check that a file still parses before you paste its note into the client’s channel.
Let the Style Belong to the Project
Start with Maya’s version of the open-bugs line, written the way this course writes JavaScript:
const CLIENT = "Fernleaf Bakery";
const BUGS_OPENED = 9;
const BUGS_CLOSED = 7;
const openBugs = BUGS_OPENED - BUGS_CLOSED;
if (openBugs > 0) {
console.log(`${CLIENT}: ${openBugs} bugs open`);
}
Run it, and the note gets its line:
Fernleaf Bakery: 2 bugs open