A picture of a woman with a red shirt and glasses looking just off to the left of the camera.
Categories: featured contributors

Improving the Add-ons Linter

For the last five years, Mozilla has participated in the Outreachy program to provide three-month internships for people from groups traditionally underrepresented in tech. From December 2017 – March 2018, interns Ravneet Kaur and Natalia Milavanova worked under the guidance of Christopher Grebs and Luca Greco to improve the add-ons linter.

The add-ons linter is a tool that warns of potential problems within an extension’s code. Developers can use the web-ext command line tool to run the linter locally to check for potential issues during development, and addons.mozilla.org (AMO) uses it to validate an extension during the submission process.

Ravneet’s internship project was to land a localization feature to the add-ons linter. By offering the option to see errors and warnings in multiple languages, the linter can be more accessible to add-on developers who prefer to work with non-English languages. Ravneet successfully adapted Pontoon’s localization method for the add-ons linter and extracted about 19,000 lines of code in the process.

Outreachy internships are a great way to gain real-world experience working with distributed teams and grow software development skills. “This project was the first time I was introduced to the idea of bundling code using technologies like webpack,” Ravneet says. “After going through its documentation and reading blog posts about it, I was fascinated about the idea of bundling code together and building small, minimalistic projects in production, while having a wide variety of maintainable files and folders in the project’s source.”

Natalia tackled a different challenge: improve the linter’s validation by rewriting a large chunk of the code and test suite into async functions. For a long time, the linter’s code had been cumbersome to work with. After refactoring the code, Natalia removed approximately 3% of the code. Luca notes, “Thanks to Natalia’s hard work on this this project, our ability to debug and handle errors in the add-ons linter has been greatly improved. It’s now easier to read and understand the sources, and prepare for the changes that are coming next.”

Thank you for all of your contributions, Natalia and Ravneet! We look forward to seeing your future accomplishments.

If you’re interested in learning more about Outreachy, please visit their website. While you’re at it, check out our own Outreachy alum Shubheksha Jalan’s blog post about her experience applying to the program.

2 comments on “Improving the Add-ons Linter”

  1. Sylvain Giroux wrote on

    On the behalf of all extensions developers and AMO reviewers, thank you all for your hard work. The linter is a tool that facilitates a lot of our job!

    Kudos to Ravneet, Natalia, Christopher and Luca!

  2. Mike Conca wrote on

    The WebExtensions ecosystem is highly dependent on having world-class tools. Thank you, Ravneet and Natalia, for helping improve the web-ext tool and making Firefox the premiere extension development platform.