Prettier Code Formatter in Google Apps Script Editor

86 views
Skip to first unread message

Saffiullah Fahim

unread,
Apr 6, 2024, 12:21:05 PMApr 6
to Google Apps Script Community
Introducing GAS Prettier — A Chrome Extension to Beautify Your Google Apps Script Code

Hey fellow Google Apps Script developers! I’m excited to share with you a new Chrome extension I’ve created called GAS Prettier.

GAS Prettier integrates the popular Prettier code formatter directly into the Google Apps Script editor, allowing you to easily format both your HTML and Google Apps Script (GAS) files with a single click.

gas-prettier.gif

Some key features of GAS Prettier:
  • Registers Prettier as the default formatter for the GAS editor.
  • Supports formatting of both HTML and GAS files.
  • Provides a warning message if there are any errors during the formatting process.
  • Open source, so the community can contribute and help improve it.

This extension aims to streamline the development workflow for GAS developers by ensuring consistent code formatting across your project. No more manual formatting or fighting with different editor settings — just hit the format button and let Prettier do the work.

The GAS Prettier extension is available for free on the Chrome Web Store. I encourage you to check it out and let me know what you think! If you have any feedback or would like to contribute, the project is open source on GitHub.

Happy coding!

Chrome Extension Link:
https://chromewebstore.google.com/detail/gas-prettier/fdhhhjfaflnaopgeplkpcdppiifpgmap

GitHub Link:
https://github.com/saffiullahfahim/gas-prettier

Ed Robinson

unread,
Apr 7, 2024, 7:22:39 PMApr 7
to Google Apps Script Community
Congratulations Saffiulah,
extensions like this that improve the experience for people developing using the GAS editor are hugely important for the community, and a lot of work!

Reply all
Reply to author
Forward
0 new messages