Skip to content

Commit a44e520

Browse files
authored
Move to Creedengo 👋 (#56)
Co-authored-by: utarwyn <[email protected]>
1 parent 8809ea6 commit a44e520

File tree

90 files changed

+412
-358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+412
-358
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🐞 Bug Report
2-
description: This form is to report unexpected behavior in ecoCode-javascript.
3-
labels: [ "💉 bug: unconfirmed" ]
2+
description: This form is to report unexpected behavior in creedengo-javascript.
3+
labels: ["💉 bug: unconfirmed"]
44
body:
55
- type: markdown
66
attributes:
@@ -40,8 +40,8 @@ body:
4040
- type: input
4141
id: plugin-version
4242
attributes:
43-
label: ecoCode-javascript Version
44-
description: Please provide the version of ecoCode-javascript that you are using.
43+
label: creedengo-javascript Version
44+
description: Please provide the version of creedengo-javascript that you are using.
4545
validations:
4646
required: true
4747
- type: input

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Start a Discussion
4-
about: "Start a discussion to share your experience with ecoCode-javascript"
5-
url: https://github.com/green-code-initiative/ecoCode-javascript/discussions/new/choose
4+
about: "Start a discussion to share your experience with creedengo-javascript"
5+
url: https://github.com/green-code-initiative/creedengo-javascript/discussions/new/choose

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ✨ Feature Request
2-
description: This form is to request a new feature in ecoCode-javascript.
3-
labels: [ "🚀 enhancement" ]
2+
description: This form is to request a new feature in creedengo-javascript.
3+
labels: ["🚀 enhancement"]
44
body:
55
- type: textarea
66
id: solution

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+'
6+
- "[0-9]+.[0-9]+.[0-9]+"
77

88
permissions:
99
packages: write
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ env.NODE_VERSION }}
29-
registry-url: 'https://registry.npmjs.org'
29+
registry-url: "https://registry.npmjs.org"
3030

3131
- name: Install dependencies
3232
run: yarn install --immutable
@@ -62,7 +62,7 @@ jobs:
6262
run: cp LICENSE.md eslint-plugin/
6363

6464
- name: Add scope to package name
65-
run: npx --yes change-package-name @${{ github.repository_owner }}/ecocode-eslint-plugin
65+
run: npx --yes change-package-name @${{ github.repository_owner }}/creedengo-eslint-plugin
6666
working-directory: eslint-plugin
6767

6868
- name: Configure GitHub Packages registry

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
strategy:
7-
description: 'Strategy of semantic version to apply'
7+
description: "Strategy of semantic version to apply"
88
required: true
99
type: choice
1010
options:
@@ -37,7 +37,7 @@ jobs:
3737
node-version: ${{ env.NODE_VERSION }}
3838

3939
- name: Use JDK ${{ env.JDK_VERSION }}
40-
uses: actions/setup-java@v3
40+
uses: actions/setup-java@v4
4141
with:
4242
distribution: temurin
4343
java-version: ${{ env.JDK_VERSION }}
@@ -94,7 +94,7 @@ jobs:
9494
tag_name: ${{ steps.package-version.outputs.version }}
9595
body: ${{ steps.extract-release-notes.outputs.release_notes }}
9696
token: ${{ secrets.RELEASE_TOKEN }}
97-
files: sonar-plugin/target/ecocode-javascript-plugin-${{ steps.package-version.outputs.version }}.jar
97+
files: sonar-plugin/target/creedengo-javascript-plugin-${{ steps.package-version.outputs.version }}.jar
9898

9999
prepare-next-release:
100100
name: Prepare next release
@@ -108,7 +108,7 @@ jobs:
108108
token: ${{ secrets.RELEASE_TOKEN }}
109109

110110
- name: Use JDK ${{ env.JDK_VERSION }}
111-
uses: actions/setup-java@v3
111+
uses: actions/setup-java@v4
112112
with:
113113
distribution: temurin
114114
java-version: ${{ env.JDK_VERSION }}

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- [#39](https://github.com/green-code-initiative/ecoCode-javascript/issues/39) Add rule `@ecocode/avoid-brightness-override` (EC522)
13-
- [#41](https://github.com/green-code-initiative/ecoCode-javascript/pull/41) Add rule `@ecocode/no-torch` (EC530)
12+
- [#39](https://github.com/green-code-initiative/creedengo-javascript/issues/39) Add rule `@creedengo/avoid-brightness-override` (GCI522)
13+
- [#41](https://github.com/green-code-initiative/creedengo-javascript/pull/41) Add rule `@creedengo/no-torch` (GCI530)
14+
- Rename plugin to creedengo-javascript
1415
- Add support for SonarQube up to 10.7
1516

1617
### Changed
1718

18-
- [#44](https://github.com/green-code-initiative/ecoCode-javascript/pull/44) Implement the rule EC523 for React Native
19-
- [#52](https://github.com/green-code-initiative/ecoCode-javascript/pull/52) Remove trailing dots in Sonar rules descriptions
19+
- [#44](https://github.com/green-code-initiative/creedengo-javascript/pull/44) Implement the rule GCI523 for React Native
20+
- [#52](https://github.com/green-code-initiative/creedengo-javascript/pull/52) Remove trailing dots in Sonar rules descriptions
2021
- Update Docker Compose configuration file to V2
2122

2223
### Deleted
2324

24-
- [#44](https://github.com/green-code-initiative/ecoCode-javascript/pull/44) Merge the rule EC8 with EC523
25+
- [#44](https://github.com/green-code-initiative/creedengo-javascript/pull/44) Merge the rule EC8 with GCI523
2526

2627
## [1.5.0] - 2024-03-13
2728

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Hello! We are pleased to see you here 👋
22

33
Please read
4-
common [CONTRIBUTING.md](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/CONTRIBUTING.md)
5-
in `ecoCode-common` repository first.\
6-
Also check the [starter pack](https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/starter-pack.md) to
4+
common [CONTRIBUTING.md](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/CONTRIBUTING.md)
5+
in `creedengo-common` repository first.\
6+
Also check the [starter pack](https://github.com/green-code-initiative/creedengo-common/blob/main/doc/starter-pack.md) to
77
have the basic information before starting.
88

99
## Structure
@@ -49,9 +49,9 @@ But it can be useful to prepare a test project to check the correct execution of
4949

5050
### Before starting
5151

52-
Before even starting to implement the rule, it must have been discussed, mesured and documented in the ecoCode
52+
Before even starting to implement the rule, it must have been discussed, mesured and documented in the Creedengo
5353
referential. Please follow
54-
the [dedicated documentation](https://github.com/green-code-initiative/ecoCode/blob/main/ecocode-rules-specifications/README.md)
54+
the [dedicated documentation](https://github.com/green-code-initiative/creedengo-rules-specifications/blob/main/README.md#creedengo-rules-specification-repository)
5555
to find out how to proceed.
5656

5757
### In the ESLint plugin
@@ -74,11 +74,11 @@ The project itself uses ESLint to helps linting rule algorithms.
7474

7575
### In the SonarQube plugin
7676

77-
Now that the rule has been implemented in the ecoCode referential and its implementation written in the ESLint plugin,
77+
Now that the rule has been implemented in the Creedengo referential and its implementation written in the ESLint plugin,
7878
all that remains is to reference it in the SonarQube plugin. Here are the simple steps:
7979

80-
1. Create a Java class in `src/main/java/io/ecocode/javascript/checks/` with the declaration of the SonarQube key and
81-
the ESLint key (check other classes to have an example)
80+
1. Create a Java class in `src/main/java/fr/greencodeinitiative/creedengo/javascript/checks/` with
81+
the declaration of the SonarQube key and the ESLint key (check other classes to have an example)
8282
2. Reference created in method `getAllChecks()` of Java class `CheckList` (please use alphabetical order)
8383
3. Add the SonarQube key of the rule in the appropriate profile Json file.
8484

README.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
![Logo](https://github.com/green-code-initiative/ecoCode/blob/main/docs/resources/logo-large.png?raw=true)
1+
# Creedengo-JS
22

3-
Websites are becoming increasingly heavy and complex over the years. They represent an important part
4-
of the digital environmental footprint. The objective of this project is to detect smells in a website source code
5-
that can have a negative ecological impact: overconsumption of energy, "fatware", shortening of the life span of
6-
devices, etc. This project is part of [ecoCode](https://github.com/green-code-initiative/ecoCode).
3+
_creedengo_ is a collective project aiming to reduce environmental footprint of software at the code level. The goal of the project is to provide a list of static code analyzers to highlight code structures that may have a negative ecological impact: energy and resources over-consumption, "fatware", shortening terminals' lifespan, etc.
74

8-
Rules in this repository are mainly based from book
9-
[115 Web Ecodesign Best Practices](https://github.com/cnumr/best-practices).
10-
This reference is maintained by [CNumR](https://collectif.greenit.fr/), a french collective that works
11-
for a responsible design of digital services. You can find all applicable rules in the [RULES.md file](RULES.md).
5+
Websites are becoming increasingly heavy and complex over the years. They represent an important part
6+
of the digital environmental footprint. The JavaScript/TypeScript part of the project focuses on providing rules and guidelines to optimize web applications and server-side code written in JavaScript and TypeScript.
127

138
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
14-
![Build](https://github.com/green-code-initiative/ecoCode-javascript/actions/workflows/build.yml/badge.svg)
9+
![Build](https://github.com/green-code-initiative/creedengo-javascript/actions/workflows/ci.yml/badge.svg)
1510
[![Sonar Quality gate](https://img.shields.io/sonar/quality_gate/green-code-initiative_ecoCode-linter?server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=green-code-initiative_ecoCode-linter)
1611

17-
🌿 SonarQube plugin
18-
---------------------------------
12+
## 🌿 SonarQube plugin
1913

20-
_ecoCode_ JavaScript is an "eco-responsibility" static code analyzer for projects based on the JavaScript ecosystem. It
14+
_Creedengo_ JavaScript is an "eco-responsibility" static code analyzer for projects based on the JavaScript ecosystem. It
2115
can handle JavaScript, TypeScript and all frameworks that use them. Its main purpose is to work with website source
2216
code, but it can also analyze back-end code.
2317

@@ -29,46 +23,42 @@ This project proposes rules for the following technologies:
2923
- React (JSX)
3024
- React Native / Expo
3125

32-
🔧 ESLint plugin
33-
----------------
26+
## 🔧 ESLint plugin
3427

3528
This project uses an internal ESLint plugin to analyze your source code.
3629

3730
If you are not using SonarQube, we have a solution for you: the linter is working nicely on its own! \
3831
Follow instructions in the [dedicated README file](eslint-plugin/README.md) to use it as a standalone plugin.
3932

40-
🛒 Distribution
41-
---------------
33+
## 🛒 Distribution
4234

43-
[![sonar-plugin version](https://img.shields.io/github/v/release/green-code-initiative/ecoCode-javascript?label=SonarQube%20plugin)](https://github.com/green-code-initiative/ecoCode-javascript/releases/latest)
44-
[![eslint-plugin version](https://img.shields.io/npm/v/@ecocode/eslint-plugin?label=ESLint%20plugin)](https://npmjs.com/package/@ecocode/eslint-plugin)
35+
[![sonar-plugin version](https://img.shields.io/github/v/release/green-code-initiative/creedengo-javascript?label=SonarQube%20plugin)](https://github.com/green-code-initiative/creedengo-javascript/releases/latest)
36+
[![eslint-plugin version](https://img.shields.io/npm/v/@creedengo/eslint-plugin?label=ESLint%20plugin)](https://npmjs.com/package/@creedengo/eslint-plugin)
4537

4638
**The plugin is available from the official SonarQube marketplace! Check the
4739
[version matrix here](https://docs.sonarsource.com/sonarqube/latest/instance-administration/plugin-version-matrix/).**
4840

4941
Ready to use binaries for SonarQube are also
50-
available [from GitHub](https://github.com/green-code-initiative/ecoCode-javascript/releases). \
42+
available [from GitHub](https://github.com/green-code-initiative/creedengo-javascript/releases). \
5143
Make sure to place the binary inside `extensions/plugins/` folder of your SonarQube instance.
5244

53-
The standalone version of the ESLint plugin is available from [npmjs](https://npmjs.com/package/@ecocode/eslint-plugin).
45+
The standalone version of the ESLint plugin is available from [npmjs](https://npmjs.com/package/@creedengo/eslint-plugin).
5446

55-
🧩 Compatibility
56-
----------------
47+
## 🧩 Compatibility
5748

5849
| Plugins Version | SonarQube version | ESLint version |
59-
|-----------------|-------------------|----------------|
50+
| --------------- | ----------------- | -------------- |
6051
| 1.4.+, 1.5.+ | 9.9.+ LTA to 10.7 | 7+ |
6152

62-
🤝 Contribution
63-
---------------
53+
## 🤝 Contribution
6454

6555
You have an idea or you want to help us improving this project? \
6656
We are open to your suggestions and contributions! Open an issue or PR 🚀
6757

6858
Check out the [CONTRIBUTING.md](CONTRIBUTING.md) file
6959
and follow the various guides to start contributing.
7060

71-
Thank you to all the people who already contributed to ecoCode-javascript!
61+
Thank you to all the people who already contributed to creedengo-javascript!
7262

7363
- Elise Dubillot
7464
- Laetitia Bézie

RULES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Please read [RULES.md](https://github.com/green-code-initiative/ecoCode/blob/main/RULES.md) in `ecoCode` repository.
1+
Please read [RULES.md](https://github.com/green-code-initiative/creedengo-rules-specifications/blob/main/RULES.md) in `creedengo-rules-specifications` repository.

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
name: sonarqube_ecocode_javascript
2+
name: sonarqube_creedengo_javascript
33

44
services:
55
sonar:
66
image: sonarqube:10.7-community
7-
container_name: sonar_ecocode_javascript
7+
container_name: sonar_creedengo_javascript
88
ports:
99
- "9000:9000"
1010
networks:
@@ -19,8 +19,8 @@ services:
1919
SONAR_ES_BOOTSTRAP_CHECKS_DISABLE: "true"
2020
volumes:
2121
- type: bind
22-
source: ./sonar-plugin/target/ecocode-javascript-plugin-1.5.1-SNAPSHOT.jar
23-
target: /opt/sonarqube/extensions/plugins/ecocode-javascript-plugin-1.5.1-SNAPSHOT.jar
22+
source: ./sonar-plugin/target/creedengo-javascript-plugin-1.5.1-SNAPSHOT.jar
23+
target: /opt/sonarqube/extensions/plugins/creedengo-javascript-plugin-1.5.1-SNAPSHOT.jar
2424
- "extensions:/opt/sonarqube/extensions"
2525
- "logs:/opt/sonarqube/logs"
2626
- "data:/opt/sonarqube/data"
@@ -32,7 +32,7 @@ services:
3232

3333
db:
3434
image: postgres:16-alpine
35-
container_name: postgresql_ecocode_javascript
35+
container_name: postgresql_creedengo_javascript
3636
networks:
3737
- sonarnet
3838
volumes:

0 commit comments

Comments
 (0)