green-code-initiative / ecoCode-javascript

Reduce the environmental footprint of your JS/TS software programs
https://ecocode.io
GNU General Public License v3.0
18 stars 17 forks source link

add rule image-src-attribute-not-empty #19

Closed elisecodedestrucs closed 1 year ago

elisecodedestrucs commented 1 year ago

add a rules that forbids the use of without or with an empty src attribute to save CPU usage.

elisecodedestrucs commented 1 year ago

Thank you for this contribution too! Also few comments on this one.. Can you also run the linter on added files to fix the build?

When I run the linter it raises errors on files I haven't changed, I don't know what to make of it?

utarwyn commented 1 year ago

@elisecodedestrucs When I run the linter it raises errors on files I haven't changed, I don't know what to make of it?

You can install the prettier plugin in your IDE to format automatically files when you save them (more info here). Otherwise, you can see the errors raised by the build script directly from GitHub here