Skip to content

Commit

Permalink
fix: Linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mutahhir committed Jan 25, 2024
1 parent 2ee6b79 commit 65a692c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cdktf/lib/hcl/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ function escapeQuotes(str: string): string {
return str.replace(/(?<!\\)"/g, '\\"');
}

/**
*
*/
function wrapIdentifierInQuotesIfNeeded(key: string): string {
return /(^\d)|[^A-Za-z0-9_\-]/.test(key) ? `"${key}"` : key;
return /(^\d)|[^A-Za-z0-9_-]/.test(key) ? `"${key}"` : key;
}

/**
Expand Down

0 comments on commit 65a692c

Please sign in to comment.