forked from DataDog/datadog-cdk-constructs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.js
132 lines (126 loc) · 3.83 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* eslint @typescript-eslint/no-var-requires: "off" */
const { AwsCdkConstructLibrary, ProjectType, NodePackageManager } = require("projen");
const project = new AwsCdkConstructLibrary({
name: "datadog-cdk-constructs",
description: "CDK Construct Library to automatically instrument Python and Node Lambda functions with Datadog",
author: "Datadog",
authorOrganization: true,
entrypoint: "lib/index.js",
repositoryUrl: "https://github.com/DataDog/datadog-cdk-constructs",
projectType: ProjectType.LIB,
packageManager: NodePackageManager.YARN,
jsiiFqn: "projen.AwsCdkConstructLibrary",
defaultReleaseBranch: "main",
releaseEveryCommit: false,
cdkDependenciesAsDeps: false,
publishToPypi: {
distName: "datadog-cdk-constructs",
module: "datadog_cdk_constructs",
},
cdkVersion: "1.121.0",
deps: ["loglevel"],
bundledDeps: ["loglevel"],
cdkDependencies: [
"@aws-cdk/aws-lambda",
"@aws-cdk/aws-lambda-nodejs",
"@aws-cdk/aws-lambda-python",
"@aws-cdk/aws-logs",
"@aws-cdk/aws-logs-destinations",
"@aws-cdk/core",
"@aws-cdk/aws-apigateway",
],
devDeps: ["ts-node", "prettier", "eslint-config-prettier", "eslint-plugin-prettier"],
gitignore: [
"*.js",
"!jest.config.js",
"!src/sample",
"*.d.ts",
".cdk.staging",
"cdk.out/",
".parcel-cache",
"test/__snapshots__",
".DS_Store",
"integration_tests/cdk.out",
"integration_tests/testlib",
],
npmignore: [
"!LICENSE",
"!LICENSE-3rdparty.csv",
"!NOTICE",
"/scripts",
".prettierrc",
"cdk.out/*",
"yarn-error.log",
"CHANGELOG.md",
"CONTRIBUTING.md",
],
scripts: {
"check-formatting": "prettier --check src/**",
},
pullRequestTemplate: false,
dependabot: false,
buildWorkflow: false,
releaseWorkflow: false,
rebuildBot: false,
mergify: false,
licensed: true,
docgen: false,
});
const eslintConfig = project.tryFindObjectFile(".eslintrc.json");
eslintConfig.addOverride("extends", [
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
]);
eslintConfig.addOverride("rules", {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"no-console": "off",
"no-empty": "off",
"comma-dangle": [
"error",
{
imports: "ignore",
exports: "ignore",
arrays: "always-multiline",
functions: "always-multiline",
objects: "always-multiline",
},
],
});
eslintConfig.addDeletionOverride("rules.quotes");
/*
TODO: tasks.json & package.json DeletionOverrides can be simplified to 5
project.removeScript("<scriptName>") calls once https://github.com/projen/projen/issues/631 is fixed.
*/
const projenTasks = project.tryFindObjectFile(".projen/tasks.json");
projenTasks.addDeletionOverride("tasks.clobber");
projenTasks.addDeletionOverride("tasks.test:update");
projenTasks.addDeletionOverride("tasks.release");
projenTasks.addDeletionOverride("tasks.bump");
projenTasks.addDeletionOverride("tasks.compat");
projenTasks.addDeletionOverride("tasks.test:compile");
projenTasks.addOverride("tasks.test.steps", [
{
exec: "rm -fr lib/",
},
{
exec: "jest --passWithNoTests --all",
},
{
spawn: "eslint",
},
]);
const npmScripts = project.tryFindObjectFile("package.json");
npmScripts.addDeletionOverride("scripts.clobber");
npmScripts.addDeletionOverride("scripts.test:update");
npmScripts.addDeletionOverride("scripts.release");
npmScripts.addDeletionOverride("scripts.bump");
npmScripts.addDeletionOverride("scripts.compat");
projenTasks.addDeletionOverride("scripts.test:compile");
project.synth();