Skip to content

Commit 82d6db3

Browse files
committed
fix(functions): stop-billing - Add support for ECMAScript 2020 to the linter config file
1 parent bb58b19 commit 82d6db3

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"rules": {
3+
"node/no-missing-import": ["off"],
4+
"node/no-missing-require": ["off"],
5+
"node/no-unpublished-import": ["off"],
6+
"node/no-unpublished-require": ["off"],
7+
"node/no-unsupported-features/es-syntax": ["off"]
8+
},
9+
"parserOptions": {
10+
// This sample is designed for Node.js 20+ which supports ECMAScript 2020
11+
"ecmaVersion": 2020,
12+
"sourceType": "module"
13+
}
14+
}

functions/billing/stop-billing/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ functions.cloudEvent('StopBillingCloudEvent', async cloudEvent => {
3030
let projectId = projectIdEnv;
3131

3232
if (projectId === undefined) {
33-
console.log('Project ID not found in env variables. Getting GCP metadata...');
33+
console.log(
34+
'Project ID not found in env variables. Getting GCP metadata...'
35+
);
3436
try {
3537
projectId = await gcpMetadata.project('project-id');
3638
} catch (error) {

0 commit comments

Comments
 (0)