Plant-Tracer / webapp

Client and Server for web-based JavaScript app
GNU Affero General Public License v3.0
1 stars 2 forks source link

HTML lint cleanup #547

Open sbarber2 opened 1 month ago

sbarber2 commented 1 month ago

We have in template/eslint.config.js a setup for html-eslint.

The rules currently in force there don't correspond so well to our practices in templates/*.html especially regarding:

which are lint rules that are repeatedly violated

(This is especially fun for we VSCode users who always now see our HTML files displayed as a see of red lint errors.)

So, this issue calls for us to:

Note that this Issue does NOT include further automating the running of eslint in the top-level Makefile or GitHub Actions. Those are laudable goals, but will be separate Issues.

simsong commented 1 month ago

Can’t we have it autoformatted with a git commit hook?

On Oct 10, 2024, at 11:28 AM, Steve Barber @.***> wrote:

We have in template/eslint.config.js a setup for html-eslint.

The rules currently in force there don't correspond so well to our practices in templates/*.html especially regarding:

Expected double(") quotes but found single('). Unexpected self closing tag for br. Expected indentation of 8 space but found 4 space. There should be a linebreak after . which are lint rules that are repeatedly violated

(This is especially fun for we VSCode users who always now see our HTML files displayed as a see of red lint errors.)

So, this issue calls for us to:

Decide what HTML style/lint rules we want to follow Adjust our html-eslint rule config according Fix all the html-eslint rule violations Note that this Issue does NOT include further automating the running of eslint in the top-level Makefile or GitHub Actions. Those are laudable goals, but will be separate Issues.

— Reply to this email directly, view it on GitHub https://github.com/Plant-Tracer/webapp/issues/547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMFHLACCHTYZSJCOM7RXODZ22MLVAVCNFSM6AAAAABPXBZ2MSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TSMJYHE3TOMQ. You are receiving this because you are subscribed to this thread.