Digital ocean currently runs a month-long celebration of open source called Hacktoberfest1. I love the idea and want to get involved with open source on a regular basis anyway, so I browsed GitHub and found some issues to tackle. Here are my pull requests from this month and what I learned during the process.

## babel/babel: Rename variables es3 reserved words2

This is the biggest one from this list. I learned some things about ECMAscript specifications and added a small new feature to Babel which is really cool. Basically, a programming language defines a set of reserved words which are not allowed as names for functions, variables et cetera. These include language keywords such as function, class or var in JavaScript. However, not only keywords can be reserved but other strings as well. Now it turns out that an older version of JavaScript called ES3 actually reserved more words than necessary which were removed in newer specifications such as ES5 or ES2015. Now when Babel compiles from newer JavaScript versions into ES3 it should check that none of the “old” reserved words are used. Yes, this is almost never a problem but someone requested this feature and a corresponding issue was opened. And I think for a project like Babel, spec compliancy is important in itself regardless of the practical relevance. The required renaming process might sound complicated, but it happens often that Babel has great API’s for it and the code I had to write in the end was really simple. It basically comes down to something like this:

if (!t.isValidES3Identifier(path.node.name)) {
path.scope.rename(path.node.name);
}


If you think that is cool and wonder how on earth this works, you should check out Babel!

Everyone makes typos. If you spot one, fix it! This was just a broken link in the readme file, but I even learned something doing it: You can make reference style links in markdown4 in order to avoid cluttering up text with urls. Neat!