From 2e3f43edf6c8f6a62240841c036505700bd52110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Boss=C3=A9?= Date: Tue, 27 Aug 2024 16:18:11 +0200 Subject: [PATCH 1/2] Remove trailing dots at the end of descriptions to stick to Sonar way. --- CHANGELOG.md | 3 ++ eslint-plugin/README.md | 28 +++++++++---------- .../rules/avoid-high-accuracy-geolocation.js | 2 +- .../rules/no-multiple-access-dom-element.js | 2 +- .../lib/rules/no-multiple-style-changes.js | 2 +- .../prefer-collections-with-pagination.js | 2 +- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b9ba2..efe8ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [#52](https://github.com/green-code-initiative/ecoCode-javascript/pull/52) Remove trailing dots in Sonar rules + descriptions + ### Added - [#39](https://github.com/green-code-initiative/ecoCode-javascript/issues/39) Add rule `@ecocode/avoid-brightness-override` (EC522) diff --git a/eslint-plugin/README.md b/eslint-plugin/README.md index fde7e2c..de9b872 100644 --- a/eslint-plugin/README.md +++ b/eslint-plugin/README.md @@ -67,20 +67,20 @@ Add `@ecocode` to the `plugins` section of your `.eslintrc`, followed by rules c ⚠️ Configurations set to warn in.\ ✅ Set in the `recommended` configuration. -| Name | Description | ⚠️ | -| :------------------------------------------------------------------------------------- | :--------------------------------------------------------- | :- | -| [avoid-brightness-override](docs/rules/avoid-brightness-override.md) | Should avoid to override brightness | ✅ | -| [avoid-css-animations](docs/rules/avoid-css-animations.md) | Avoid usage of CSS animations | ✅ | -| [avoid-high-accuracy-geolocation](docs/rules/avoid-high-accuracy-geolocation.md) | Avoid using high accuracy geolocation in web applications. | ✅ | -| [limit-db-query-results](docs/rules/limit-db-query-results.md) | Should limit the number of returns for a SQL query | ✅ | -| [no-empty-image-src-attribute](docs/rules/no-empty-image-src-attribute.md) | Disallow usage of image with empty source attribute | ✅ | -| [no-import-all-from-library](docs/rules/no-import-all-from-library.md) | Should not import all from library | ✅ | -| [no-multiple-access-dom-element](docs/rules/no-multiple-access-dom-element.md) | Disallow multiple access of same DOM element. | ✅ | -| [no-multiple-style-changes](docs/rules/no-multiple-style-changes.md) | Disallow multiple style changes at once. | ✅ | -| [no-torch](docs/rules/no-torch.md) | Should not programmatically enable torch mode | ✅ | -| [prefer-collections-with-pagination](docs/rules/prefer-collections-with-pagination.md) | Prefer API collections with pagination. | ✅ | -| [prefer-shorthand-css-notations](docs/rules/prefer-shorthand-css-notations.md) | Encourage usage of shorthand CSS notations | ✅ | -| [provide-print-css](docs/rules/provide-print-css.md) | Enforce providing a print stylesheet | ✅ | +| Name | Description | ⚠️ | +| :------------------------------------------------------------------------------------- | :-------------------------------------------------------- | :- | +| [avoid-brightness-override](docs/rules/avoid-brightness-override.md) | Should avoid to override brightness | ✅ | +| [avoid-css-animations](docs/rules/avoid-css-animations.md) | Avoid usage of CSS animations | ✅ | +| [avoid-high-accuracy-geolocation](docs/rules/avoid-high-accuracy-geolocation.md) | Avoid using high accuracy geolocation in web applications | ✅ | +| [limit-db-query-results](docs/rules/limit-db-query-results.md) | Should limit the number of returns for a SQL query | ✅ | +| [no-empty-image-src-attribute](docs/rules/no-empty-image-src-attribute.md) | Disallow usage of image with empty source attribute | ✅ | +| [no-import-all-from-library](docs/rules/no-import-all-from-library.md) | Should not import all from library | ✅ | +| [no-multiple-access-dom-element](docs/rules/no-multiple-access-dom-element.md) | Disallow multiple access of same DOM element | ✅ | +| [no-multiple-style-changes](docs/rules/no-multiple-style-changes.md) | Disallow multiple style changes at once | ✅ | +| [no-torch](docs/rules/no-torch.md) | Should not programmatically enable torch mode | ✅ | +| [prefer-collections-with-pagination](docs/rules/prefer-collections-with-pagination.md) | Prefer API collections with pagination | ✅ | +| [prefer-shorthand-css-notations](docs/rules/prefer-shorthand-css-notations.md) | Encourage usage of shorthand CSS notations | ✅ | +| [provide-print-css](docs/rules/provide-print-css.md) | Enforce providing a print stylesheet | ✅ | diff --git a/eslint-plugin/lib/rules/avoid-high-accuracy-geolocation.js b/eslint-plugin/lib/rules/avoid-high-accuracy-geolocation.js index 341fe59..4cd33f4 100644 --- a/eslint-plugin/lib/rules/avoid-high-accuracy-geolocation.js +++ b/eslint-plugin/lib/rules/avoid-high-accuracy-geolocation.js @@ -27,7 +27,7 @@ module.exports = { meta: { type: "suggestion", docs: { - description: "Avoid using high accuracy geolocation in web applications.", + description: "Avoid using high accuracy geolocation in web applications", category: "eco-design", recommended: "warn", }, diff --git a/eslint-plugin/lib/rules/no-multiple-access-dom-element.js b/eslint-plugin/lib/rules/no-multiple-access-dom-element.js index d0e0838..96e3b59 100644 --- a/eslint-plugin/lib/rules/no-multiple-access-dom-element.js +++ b/eslint-plugin/lib/rules/no-multiple-access-dom-element.js @@ -23,7 +23,7 @@ module.exports = { meta: { type: "suggestion", docs: { - description: "Disallow multiple access of same DOM element.", + description: "Disallow multiple access of same DOM element", category: "eco-design", recommended: "warn", }, diff --git a/eslint-plugin/lib/rules/no-multiple-style-changes.js b/eslint-plugin/lib/rules/no-multiple-style-changes.js index 2576ae1..08f3fb6 100644 --- a/eslint-plugin/lib/rules/no-multiple-style-changes.js +++ b/eslint-plugin/lib/rules/no-multiple-style-changes.js @@ -23,7 +23,7 @@ module.exports = { meta: { type: "suggestion", docs: { - description: "Disallow multiple style changes at once.", + description: "Disallow multiple style changes at once", category: "eco-design", recommended: "warn", }, diff --git a/eslint-plugin/lib/rules/prefer-collections-with-pagination.js b/eslint-plugin/lib/rules/prefer-collections-with-pagination.js index 3073dcd..d11c0e6 100644 --- a/eslint-plugin/lib/rules/prefer-collections-with-pagination.js +++ b/eslint-plugin/lib/rules/prefer-collections-with-pagination.js @@ -66,7 +66,7 @@ module.exports = { name: "prefer-collections-with-pagination", meta: { docs: { - description: "Prefer API collections with pagination.", + description: "Prefer API collections with pagination", category: "eco-design", recommended: "warn", }, From 446c707d84f450559d6d928a068db7ea0a33817a Mon Sep 17 00:00:00 2001 From: Maxime Malgorn <9255967+utarwyn@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:32:19 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efe8ba4..37cfe78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- [#52](https://github.com/green-code-initiative/ecoCode-javascript/pull/52) Remove trailing dots in Sonar rules - descriptions - ### Added - [#39](https://github.com/green-code-initiative/ecoCode-javascript/issues/39) Add rule `@ecocode/avoid-brightness-override` (EC522) @@ -19,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [#44](https://github.com/green-code-initiative/ecoCode-javascript/pull/44) Implement the rule EC523 for React Native +- [#52](https://github.com/green-code-initiative/ecoCode-javascript/pull/52) Remove trailing dots in Sonar rules descriptions - Update Docker Compose configuration file to V2 ### Deleted