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 diff --git a/src/helpers/validations.js b/src/helpers/validations.js index aeedd79..9200328 100644 --- a/src/helpers/validations.js +++ b/src/helpers/validations.js @@ -140,16 +140,20 @@ 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`); } }); }