Skip to content

Commit

Permalink
Add formatting rules for json files
Browse files Browse the repository at this point in the history
This ensures that our json files are valid and follow common formatting
conventions.

Following up to opensearch-project#1022

Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Oct 3, 2024
1 parent 647f601 commit d15f30e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ spotless {
indentWithSpaces()
endWithNewline()
}
json {
target 'deployment/cdk/opensearch-service-migration/*.json'
prettier()
endWithNewline()
}
}

subprojects {
Expand Down
9 changes: 2 additions & 7 deletions deployment/cdk/opensearch-service-migration/cdk.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": [
"**"
],
"include": ["**"],
"exclude": [
"README.md",
"cdk*.json",
Expand All @@ -19,10 +17,7 @@
"context": {
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
"@aws-cdk/core:checkSecretUsage": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"@aws-cdk/core:target-partitions": ["aws", "aws-cn"],
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
Expand Down
16 changes: 3 additions & 13 deletions deployment/cdk/opensearch-service-migration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"outDir": "dist",
"target": "ES2020",
"module": "commonjs",
"lib": [
"es2020"
],
"lib": ["es2020"],
"resolveJsonModule": true,
"declaration": true,
"strict": true,
Expand All @@ -21,15 +19,7 @@
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./node_modules/@types"
]
"typeRoots": ["./node_modules/@types"]
},
"exclude": [
"node_modules",
"cdk.out",
"dist",
"test",
"bin"
]
"exclude": ["node_modules", "cdk.out", "dist", "test", "bin"]
}

0 comments on commit d15f30e

Please sign in to comment.