File tree 7 files changed +27
-20
lines changed
functions/commons/helpers
7 files changed +27
-20
lines changed Original file line number Diff line number Diff line change 13
13
"enabled" : true ,
14
14
"indentStyle" : " space" ,
15
15
"indentWidth" : 2 ,
16
- "lineEnding" : " lf"
16
+ "lineEnding" : " lf" ,
17
+ "lineWidth" : 80
17
18
},
18
19
"javascript" : {
19
20
"formatter" : {
20
21
"semicolons" : " always" ,
21
22
"bracketSpacing" : true ,
22
23
"quoteStyle" : " single" ,
23
- "trailingComma " : " es5"
24
+ "trailingCommas " : " es5"
24
25
}
26
+ },
27
+ "files" : {
28
+ "ignore" : [
29
+ " node_modules" ,
30
+ " coverage" ,
31
+ " lib" ,
32
+ " cdk.out" ,
33
+ " site" ,
34
+ " .aws-sam"
35
+ ]
25
36
}
26
37
}
Original file line number Diff line number Diff line change 1
- import { RemovalPolicy , Stack , StackProps } from 'aws-cdk-lib' ;
1
+ import { RemovalPolicy , Stack , type StackProps } from 'aws-cdk-lib' ;
2
2
import { LambdaIntegration , RestApi } from 'aws-cdk-lib/aws-apigateway' ;
3
3
import {
4
4
AttributeType ,
@@ -18,7 +18,7 @@ import { DynamoEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
18
18
import { OutputFormat } from 'aws-cdk-lib/aws-lambda-nodejs' ;
19
19
import { Queue } from 'aws-cdk-lib/aws-sqs' ;
20
20
import { StringParameter } from 'aws-cdk-lib/aws-ssm' ;
21
- import { Construct } from 'constructs' ;
21
+ import type { Construct } from 'constructs' ;
22
22
import { FunctionWithLogGroup } from './function-with-logstream-construct.js' ;
23
23
24
24
export class PowertoolsExampleStack extends Stack {
Original file line number Diff line number Diff line change
1
+ import { GetCommand , type GetCommandOutput } from '@aws-sdk/lib-dynamodb' ;
1
2
import { docClient } from '#clients/dynamodb' ;
2
3
import { itemsTableName } from '#constants' ;
3
4
import type { DebugLogger } from '#types' ;
4
- import { GetCommand , type GetCommandOutput } from '@aws-sdk/lib-dynamodb' ;
5
5
6
6
/**
7
7
* Fetch an item from the DynamoDB table.
@@ -22,7 +22,7 @@ const getItemDynamoDB = async (
22
22
} )
23
23
) ;
24
24
25
- logger . debug ( ` ddb response` , {
25
+ logger . debug ( ' ddb response' , {
26
26
response,
27
27
} ) ;
28
28
Original file line number Diff line number Diff line change
1
+ import { randomUUID } from 'node:crypto' ;
2
+ import { PutCommand } from '@aws-sdk/lib-dynamodb' ;
1
3
import { docClient } from '#clients/dynamodb' ;
2
4
import { itemsTableName } from '#constants' ;
3
5
import type { DebugLogger } from '#types' ;
4
- import { PutCommand } from '@aws-sdk/lib-dynamodb' ;
5
- import { randomUUID } from 'node:crypto' ;
6
6
7
7
/**
8
8
* Put an item in the DynamoDB table.
@@ -28,7 +28,7 @@ const putItemInDynamoDB = async (
28
28
} )
29
29
) ;
30
30
31
- logger . debug ( ` ddb response` , {
31
+ logger . debug ( ' ddb response' , {
32
32
response,
33
33
} ) ;
34
34
Original file line number Diff line number Diff line change
1
+ import { ScanCommand , type ScanCommandOutput } from '@aws-sdk/lib-dynamodb' ;
1
2
import { docClient } from '#clients/dynamodb' ;
2
3
import { itemsTableName } from '#constants' ;
3
4
import type { DebugLogger } from '#types' ;
4
- import { ScanCommand , type ScanCommandOutput } from '@aws-sdk/lib-dynamodb' ;
5
5
6
6
/**
7
7
* Scan the DynamoDB table and return all items.
@@ -19,7 +19,7 @@ const scanItemsDynamoDB = async (
19
19
} )
20
20
) ;
21
21
22
- logger . debug ( ` ddb response` , {
22
+ logger . debug ( ' ddb response' , {
23
23
response,
24
24
} ) ;
25
25
Original file line number Diff line number Diff line change 11
11
"scripts" : {
12
12
"build" : " echo 'Not applicable, run `npx cdk synth` instead to build the stack'" ,
13
13
"test" : " npm run test:unit" ,
14
- "lint" : " eslint --ext .ts,.js --no-error-on-unmatched-pattern ." ,
15
- "lint- fix" : " eslint --fix --ext .ts,.js --fix --no-error-on-unmatched-pattern ." ,
14
+ "lint" : " biome lint ." ,
15
+ "lint: fix" : " biome check --write ." ,
16
16
"test:unit" : " export POWERTOOLS_DEV=true && jest --silent" ,
17
17
"test:e2e" : " echo 'To be implemented ...'" ,
18
18
"cdk" : " cdk"
19
19
},
20
- "lint-staged" : {
21
- "*.ts" : " npm run lint-fix" ,
22
- "*.js" : " npm run lint-fix"
23
- },
24
20
"type" : " module" ,
25
21
"imports" : {
26
22
"#types" : " ./functions/commons/types.js" ,
64
60
"ts-node" : " ^10.9.2" ,
65
61
"typescript" : " ^5.4.5"
66
62
}
67
- }
63
+ }
Original file line number Diff line number Diff line change 78
78
"typescript" : " ^5.4.5"
79
79
},
80
80
"lint-staged" : {
81
- "*.{js,ts}" : " eslint --fix " ,
81
+ "*.{js,ts}" : " biome check --write " ,
82
82
"*.md" : " markdownlint-cli2 --fix"
83
83
},
84
84
"engines" : {
89
89
"tar" : " 6.2.1"
90
90
}
91
91
}
92
- }
92
+ }
You can’t perform that action at this time.
0 commit comments