shahednasser / quran-extension

Replace the new tab page with Quran verses and beautiful nature pictures.
https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?authuser=1
MIT License
87 stars 12 forks source link

Should a Formatter be Used? #10

Closed JammSpread closed 3 years ago

JammSpread commented 3 years ago

I wonder whether a formatter (such as Prettier) could help format the source code. It could also help maintain consistency throughout the project. Would that be useful and make sense in this project?

shahednasser commented 3 years ago

Hi @JammSpread Prettier is a good idea, however as this project doesn't rely or use NPM there's no place for it. One thing we can do though is add a GitHub action for Prettier I think it would work.

I am concerned for one thing though which is that a lot of the CSS is considered by compilers/linters as invalid since it uses Chrome's i18n variables, so I'm not sure if prettier would work properly with it.

JammSpread commented 3 years ago

I was thinking about the action setup as well, however ".css" could always be ignored if it doesn't work out.

shahednasser commented 3 years ago

I think then prettier should be mostly applied to the javascript files main.js, options.js and background.js as the rest of the files are mostly minified