From f82a9957d1c64e4b8812c8fe34bbef51e7cd61fc Mon Sep 17 00:00:00 2001 From: Sergey Mamulchenko Date: Thu, 28 Dec 2023 13:01:20 +0100 Subject: [PATCH 1/3] include element type in settings validation messages --- src/helpers/validations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/validations.js b/src/helpers/validations.js index aeedd79..1f51102 100644 --- a/src/helpers/validations.js +++ b/src/helpers/validations.js @@ -140,16 +140,16 @@ function validateElements(elements) { } if (element.mode && !VALID_MODES.includes(element.mode)) { warnOnce( - `Invalid mode property in '${ELEMENTS}' setting. Should be one of ${VALID_MODES.join( + `Invalid mode property of type ${element.type} in '${ELEMENTS}' setting. Should be one of ${VALID_MODES.join( ",", )}. Default value "${VALID_MODES[0]}" will be used instead`, ); } if (!element.pattern || !(isString(element.pattern) || isArray(element.pattern))) { - warnOnce(`Please provide a valid pattern in '${ELEMENTS}' setting`); + warnOnce(`Please provide a valid pattern to type ${element.type} in '${ELEMENTS}' setting`); } if (element.capture && !isArray(element.capture)) { - warnOnce(`Invalid capture property in '${ELEMENTS}' setting`); + warnOnce(`Invalid capture property of type ${element.type} in '${ELEMENTS}' setting`); } }); } From 7270931d30c01fcb1a4613454a70b3964eec05a6 Mon Sep 17 00:00:00 2001 From: Sergey M Date: Mon, 8 Jan 2024 15:20:06 +0100 Subject: [PATCH 2/3] fix formatting --- src/helpers/validations.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/helpers/validations.js b/src/helpers/validations.js index 1f51102..9200328 100644 --- a/src/helpers/validations.js +++ b/src/helpers/validations.js @@ -140,13 +140,17 @@ function validateElements(elements) { } if (element.mode && !VALID_MODES.includes(element.mode)) { warnOnce( - `Invalid mode property of type ${element.type} in '${ELEMENTS}' setting. Should be one of ${VALID_MODES.join( + `Invalid mode property of type ${ + element.type + } in '${ELEMENTS}' setting. Should be one of ${VALID_MODES.join( ",", )}. Default value "${VALID_MODES[0]}" will be used instead`, ); } if (!element.pattern || !(isString(element.pattern) || isArray(element.pattern))) { - warnOnce(`Please provide a valid pattern to type ${element.type} in '${ELEMENTS}' setting`); + warnOnce( + `Please provide a valid pattern to type ${element.type} in '${ELEMENTS}' setting`, + ); } if (element.capture && !isArray(element.capture)) { warnOnce(`Invalid capture property of type ${element.type} in '${ELEMENTS}' setting`); From 3f7a2219ec0aceba5c65d9c0af0b273ab057ff1e Mon Sep 17 00:00:00 2001 From: javierbrea Date: Sat, 13 Jan 2024 08:09:41 +0100 Subject: [PATCH 3/3] chore(release): Upgrade version --- CHANGELOG.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- sonar-project.properties | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cb8161..fe45dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ### Removed ### BREAKING CHANGES +## [4.1.0] - 2024-01-13 + +### Changed +- feat(#323): Specify which element type has issues during settings validation (Thanks to [@hmnzr](https://github.com/hmnzr)) + ## [4.0.1] - 2023-12-01 ### Fixed diff --git a/package-lock.json b/package-lock.json index f621177..df21462 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eslint-plugin-boundaries", - "version": "4.0.1", + "version": "4.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eslint-plugin-boundaries", - "version": "4.0.1", + "version": "4.1.0", "license": "MIT", "dependencies": { "chalk": "4.1.2", diff --git a/package.json b/package.json index 1842f55..ffebb9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-boundaries", - "version": "4.0.1", + "version": "4.1.0", "description": "Eslint plugin checking architecture boundaries between elements", "keywords": [ "eslint", diff --git a/sonar-project.properties b/sonar-project.properties index 00e14cb..6a22222 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,6 @@ sonar.organization=javierbrea sonar.projectKey=javierbrea_eslint-plugin-boundaries -sonar.projectVersion=4.0.1 +sonar.projectVersion=4.1.0 sonar.javascript.file.suffixes=.js sonar.sourceEncoding=UTF-8