Websites are becoming increasingly heavy and complex over the years. They represent an important part of the digital environmental footprint. The objective of this project is to detect smells in a website source code that can have a negative ecological impact: overconsumption of energy, "fatware", shortening of the life span of devices, etc. This project is part of ecoCode.
Rules in this repository are mainly based from book 115 Web Ecodesign Best Practices. This reference is maintained by CNumR, a french collective that works for a responsible design of digital services. You can find all applicable rules in the main ecoCode repository.
⚠️ These plugins are in a very early stage and need improvements. Any contribution will be appreciated.
This repository contains multiple linters that each support a different set of programming languages. They are separated from each other and are designed primarily to analyze static code that the SonarQube scanner cannot process. They can however be used, modified and published independently of our ecoCode plugins.
The purpose of these linters is twofold: to allow code smells to be found as soon as it is written using standard techonologies, and also to trace these reports back into SonarQube. This way we can make up for a SonarQube lack by improving feedback to developers. It's a good deal! And the use is not more complex.
Linters in this repository are primally designed to work with our SonarQube plugins.
Check one of the guides below to install a SonarQube plugin and its associated linter:
- JavaScript plugin guide
- More to come..
If you don't want to integrate rules into SonarQube, you are free to do so.
Plugins are working nicely on their own! Follow instructions in the dedicated README files.
- JavaScript/TypeScript linter using ESLint
- More to come..
SonarQube plugins can be downloaded from ecoCode repository.
Linters are available as dedicated NPM packages.
SonarQube plugin | Linter name | Latest version |
---|---|---|
JavaScript | @ecocode/eslint-plugin |
You can follow changelogs on GitHub Releases page.
You have an idea or you want to help us improving these linters?
We are open to your suggestions and contributions! Open an issue or PR 🚀
Check out the CONTRIBUTING.md file and follow the various guides to start contributing.