From 22476226d48ccd912b5c81e910228cb854f095d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 06:16:35 +0000 Subject: [PATCH 1/2] Bump prettier from 3.5.3 to 3.6.2 Bumps [prettier](https://github.com/prettier/prettier) from 3.5.3 to 3.6.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.5.3...3.6.2) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.6.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 499d907e88..bddbaa23ce 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "expect": "^29.7.0", "globals": "^16.3.0", "jest": "^29.7.0", - "prettier": "^3.5.3", + "prettier": "^3.6.2", "shelljs": "^0.10.0" }, "dependencies": {}, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b65665dcb..62c71f38fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: ^29.7.0 version: 29.7.0(@types/node@24.3.0) prettier: - specifier: ^3.5.3 - version: 3.5.3 + specifier: ^3.6.2 + version: 3.6.2 shelljs: specifier: ^0.10.0 version: 0.10.0 @@ -2149,8 +2149,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + prettier@3.6.2: + resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} engines: {node: '>=14'} hasBin: true @@ -5177,7 +5177,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.5.3: {} + prettier@3.6.2: {} pretty-format@29.7.0: dependencies: From 19274d54936b57ed3a433bacefcdfef75af5c93d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Aug 2025 06:18:38 +0000 Subject: [PATCH 2/2] [CI] Format code --- concepts/callbacks/about.md | 3 --- concepts/closures/about.md | 2 -- exercises/concept/amusement-park/.meta/design.md | 4 ---- exercises/concept/bird-watcher/.meta/design.md | 3 --- exercises/concept/high-score-board/.meta/design.md | 6 ------ exercises/concept/mixed-juices/.meta/design.md | 3 --- exercises/concept/ozans-playlist/.meta/design.md | 2 -- 7 files changed, 23 deletions(-) diff --git a/concepts/callbacks/about.md b/concepts/callbacks/about.md index 64fca0040f..1899983a55 100644 --- a/concepts/callbacks/about.md +++ b/concepts/callbacks/about.md @@ -81,7 +81,6 @@ You see this pattern often when dealing with asynchronous functions to assist wi Common `Array` functions use callback functions to define their behaviour: - `Array.prototype.forEach`: - - Accepts a callback, which applies the callback to each element of an array. ```javascript @@ -92,7 +91,6 @@ Common `Array` functions use callback functions to define their behaviour: ``` - `Array.prototype.map` - - Accepts a callback, which applies the callback to each element of an array using the result to create a new array. ```javascript @@ -103,7 +101,6 @@ Common `Array` functions use callback functions to define their behaviour: ``` - `Array.prototype.reduce` - - Accepts a callback, which applies the callback to each element of an array, passing the result forward to the next invocation. ```javascript diff --git a/concepts/closures/about.md b/concepts/closures/about.md index 957cac692a..23cf280315 100644 --- a/concepts/closures/about.md +++ b/concepts/closures/about.md @@ -18,7 +18,6 @@ The name _closure_ is historically derived from [_λ-calculus_][wiki-lambda-calc ## Reasons to use closures in JavaScript 1. Data Privacy / Data Encapsulation - - Unlike other languages, in 2020, there was no way to specify _private_ variables. So closures can be used to effectively emulate _private_ variables (there was a proposal to introduce private variable notation, which might have become standard by the time you read this). ```javascript @@ -37,7 +36,6 @@ The name _closure_ is historically derived from [_λ-calculus_][wiki-lambda-calc ``` 2. Partial Application - - Functions may return functions, and when a returned function uses the argument of the function that created it, this is an example of using a closure to perform partial application. Sometimes this is called _currying_ a function. ```javascript diff --git a/exercises/concept/amusement-park/.meta/design.md b/exercises/concept/amusement-park/.meta/design.md index ed3827a633..d974fff324 100644 --- a/exercises/concept/amusement-park/.meta/design.md +++ b/exercises/concept/amusement-park/.meta/design.md @@ -32,26 +32,22 @@ This exercise could benefit from the following rules in the [analyzer][analyzer] The comment types mentioned below only serve as a proposal. 1. `createVisitor` - - `actionable`: If the student used a helper variable, give feedback that the result can be returned directly. - `celebratory`: If the student used classes, celebrate but let them know it is not necessary throughout this exercise. - `informative`: If the student did not use the short-hand notation but wrote `name: name` etc instead, let them know how to shorten that. The solution should be accepted nevertheless. 2. `revokeTicket` - - `essential`: Check the ticketId field is not deleted and re-added. - `celebratory`: If they used a method on a visitor class, celebrate but let them know it is not necessary for this exercise. 3. `ticketStatus` - - `essential`: Using a type switch should be discouraged since it is confusing to read because of the `typeof null === 'object'` quirk. - `informative`: If the student did not use early returns, maybe let them know about this alternative. - `celebratory`: Congratulate if the student used a template string for the "sold" case - `celebratory`: Congratulate if the student used a `value` helper variable. 4. `simpleTicketStatus` - - `essential`: Check `??` was used and not an if-statement or something else. - `actionable`: If the student used a helper variable, give feedback that the result can be returned directly. diff --git a/exercises/concept/bird-watcher/.meta/design.md b/exercises/concept/bird-watcher/.meta/design.md index 554e26f2c7..1b297b64d0 100644 --- a/exercises/concept/bird-watcher/.meta/design.md +++ b/exercises/concept/bird-watcher/.meta/design.md @@ -36,19 +36,16 @@ This exercise could benefit from the following rules in the [analyzer][analyzer] For all tasks check that the student actually used a for loop. 1. `totalBirdCount` - - Verify that the condition is written with `< x.length` instead of `<= y.length -1`. - Check whether a shorthand assignment `+=` was used to increase the sum (non-essential feedback). - Verify the total was properly initialized with `0` instead of e.g. `null` - Verify the increment operator was used in loop header step 2. `birdsInWeek` - - Verify a helper variable was used instead of duplicating the calculation in the initialization and condition of the loop - Other checks should be the same as for `totalBirdCount` 3. `fixBirdCountLog` - - Check whether a shorthand assignment `+=` was used to increase the loop counter (non-essential feedback) - Check whether the increment operator was used in the loop body diff --git a/exercises/concept/high-score-board/.meta/design.md b/exercises/concept/high-score-board/.meta/design.md index 45307215e9..9c425cb787 100644 --- a/exercises/concept/high-score-board/.meta/design.md +++ b/exercises/concept/high-score-board/.meta/design.md @@ -40,33 +40,27 @@ The Concepts this exercise unlocks are: This exercise could benefit from the following rules in the [analyzer][analyzer]: 1. `createScoreBoard` - - `essential`: Make sure no class, map etc. was created, there should be just an object. - `actionable`: If the student created an empty object first and then added the value, give feedback to include the entry in the object literal directly. - `actionable`: Check that the object was returned directly, no intermediate assignment to a variable necessary. 2. `addPlayer` - - `essential`: Check the assignment operator was used and no additional variables were declared. 3. `removePlayer` - - `essential`: Make sure `delete` was used and not set to undefined or null. - `actionable`: If there is additional code to check whether the key is present before deleting it, give feedback that this is not necessary. 4. `updateScore` - - `actionable`: If the student used a separate variable to calculate the new value first, tell them it is not necessary. - `actionable`: If the student did not use the shorthand assignment operator, tell them about it. If they used it already, give a `celebratory` comment. 5. `applyMondayBonus` - - `essential`: Check the student actually used `for...in`. - Same feedback as in `updateScore` applies. - Using `updateScore` in the solution should be treated as equally correct as the exemplar solution. 6. `normalizeScore` - - `actionable`: No intermediate variables necessary. ## Notes diff --git a/exercises/concept/mixed-juices/.meta/design.md b/exercises/concept/mixed-juices/.meta/design.md index 5eb2a9b48c..de569e6e9e 100644 --- a/exercises/concept/mixed-juices/.meta/design.md +++ b/exercises/concept/mixed-juices/.meta/design.md @@ -38,7 +38,6 @@ This exercise could benefit from the following rules in the [analyzer][analyzer] The comment types mentioned below only serve as a proposal. 1. `timeToMixJuice` - - `essential`: Verify the student used a switch statement. Would be nice if we could give different feedback depending on what the student used instead. If it was if-else, comment that switch is better suited for so many different variants. @@ -53,7 +52,6 @@ The comment types mentioned below only serve as a proposal. ``` 2. `limesToCut` - - A solution that uses `if (limes.length < 0) break;` instead of combining the conditions should be considered equally correct to the exemplar solution. The version in the exemplar file is shorter but the break version emphasizes that there is a special edge case. - `essential`: Verify that `while` was used. @@ -68,7 +66,6 @@ The comment types mentioned below only serve as a proposal. - `celebratory`: Celebrate if the student used `++` and `+=`. 3. `remainingOrders` - - `essential`: Verify that do-while was used. If while was used instead, say that do-while is a better fit because there is always at least one iteration (because `timeLeft` is always > 0) and the condition can best be checked after running the code. - `essential`: Verify `timeToMixJuice` was reused instead of duplicating the code. diff --git a/exercises/concept/ozans-playlist/.meta/design.md b/exercises/concept/ozans-playlist/.meta/design.md index 79f9bc0f1e..0ae1f98a0f 100644 --- a/exercises/concept/ozans-playlist/.meta/design.md +++ b/exercises/concept/ozans-playlist/.meta/design.md @@ -35,11 +35,9 @@ This exercise could benefit from the following rules in the [analyzer][analyzer] For all tasks, verify that the student actually used a `Set`. 1. `addTrack` - - Verify that there was no redundant `Set.has()` call 2. `deleteTrack` - - Verify that there was no redundant `Set.has()` call [analyzer]: https://github.com/exercism/javascript-analyzer