Skip to content

Commit

Permalink
fix(codemod): do not mark the buildMessage method as private (#5546)
Browse files Browse the repository at this point in the history
* fix(codemod): do not mark the `buildMessage` method as private

It might fail because of the lack of support.

* chore(codemod): add missing `filePath` parameter to the docblock
  • Loading branch information
balazsmatepetro authored Jun 8, 2023
1 parent 6fb0807 commit 81bd9be
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
class UnknownUsageError extends Error {
/**
* @param {import('jscodeshift').CallExpression} callExpression
* @param {string} filePath
*/
constructor(callExpression, filePath) {
super('')
this.message = this.#buildMessage(callExpression, filePath)
this.message = this.buildMessage(callExpression, filePath)
this.name = 'UnknownUsageError'
}

Expand All @@ -14,7 +15,7 @@ class UnknownUsageError extends Error {
* @param {string} filePath
* @returns {string}
*/
#buildMessage(callExpression, filePath) {
buildMessage(callExpression, filePath) {
const location = callExpression.callee.loc
const start = location.start.line
const end = location.end.line
Expand Down

0 comments on commit 81bd9be

Please sign in to comment.