@langri-sha/projen-project 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +20 -2
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/package.json +9 -8
- package/readme +3 -0
- package/src/index.ts +17 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,49 @@
|
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 14 May 2024 20:39:52 GMT",
|
|
6
|
+
"version": "0.6.1",
|
|
7
|
+
"tag": "@langri-sha/projen-project_v0.6.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@langri-sha/projen-project",
|
|
13
|
+
"commit": "bb5eca0acea87c11cf873197bea7383eef3f8465",
|
|
14
|
+
"comment": "chore(deps): fix(deps): update dependency ramda to v0.30.0"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "email not defined",
|
|
18
|
+
"package": "@langri-sha/projen-project",
|
|
19
|
+
"commit": "bb5eca0acea87c11cf873197bea7383eef3f8465",
|
|
20
|
+
"comment": "chore(deps): chore(deps): update dependency projen to v0.81.10"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Thu, 09 May 2024 07:29:56 GMT",
|
|
27
|
+
"version": "0.6.0",
|
|
28
|
+
"tag": "@langri-sha/projen-project_v0.6.0",
|
|
29
|
+
"comments": {
|
|
30
|
+
"minor": [
|
|
31
|
+
{
|
|
32
|
+
"author": "filip.dupanovic@gmail.com",
|
|
33
|
+
"package": "@langri-sha/projen-project",
|
|
34
|
+
"commit": "508fb179ee3454c0e43f7ea2a9ed25ca6310e27b",
|
|
35
|
+
"comment": "feat(eslint): Upgrade to v9"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "filip.dupanovic@gmail.com",
|
|
39
|
+
"package": "@langri-sha/projen-project",
|
|
40
|
+
"commit": "508fb179ee3454c0e43f7ea2a9ed25ca6310e27b",
|
|
41
|
+
"comment": "feat(project): Add support for configuring Husky"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Mon, 06 May 2024 02:33:10 GMT",
|
|
6
48
|
"version": "0.5.0",
|
|
7
49
|
"tag": "@langri-sha/projen-project_v0.5.0",
|
|
8
50
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @langri-sha/projen-project
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 14 May 2024 20:39:52 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.6.1
|
|
8
|
+
|
|
9
|
+
Tue, 14 May 2024 20:39:52 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- chore(deps): fix(deps): update dependency ramda to v0.30.0 (email not defined)
|
|
14
|
+
- chore(deps): chore(deps): update dependency projen to v0.81.10 (email not defined)
|
|
15
|
+
|
|
16
|
+
## 0.6.0
|
|
17
|
+
|
|
18
|
+
Thu, 09 May 2024 07:29:56 GMT
|
|
19
|
+
|
|
20
|
+
### Minor changes
|
|
21
|
+
|
|
22
|
+
- feat(eslint): Upgrade to v9 (filip.dupanovic@gmail.com)
|
|
23
|
+
- feat(project): Add support for configuring Husky (filip.dupanovic@gmail.com)
|
|
24
|
+
|
|
7
25
|
## 0.5.0
|
|
8
26
|
|
|
9
|
-
Mon, 06 May 2024 02:
|
|
27
|
+
Mon, 06 May 2024 02:33:10 GMT
|
|
10
28
|
|
|
11
29
|
### Minor changes
|
|
12
30
|
|
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type LintSynthesizedOptions } from '@langri-sha/projen-lint-synthesized
|
|
|
4
4
|
import { type EditorConfigOptions } from '@langri-sha/projen-editorconfig';
|
|
5
5
|
import { type CodeownersOptions } from '@langri-sha/projen-codeowners';
|
|
6
6
|
import { type RenovateOptions } from '@langri-sha/projen-renovate';
|
|
7
|
+
import { type HuskyOptions } from '@langri-sha/projen-husky';
|
|
7
8
|
export interface ProjectOptions extends Omit<BaseProjectOptions, 'renovatebot' | 'renovatebotOptions'> {
|
|
8
9
|
beachballConfig?: BeachballConfig;
|
|
9
10
|
codeownersOptions?: CodeownersOptions;
|
|
@@ -11,6 +12,10 @@ export interface ProjectOptions extends Omit<BaseProjectOptions, 'renovatebot' |
|
|
|
11
12
|
* EditorConfig options.
|
|
12
13
|
*/
|
|
13
14
|
editorConfigOptions?: EditorConfigOptions;
|
|
15
|
+
/**
|
|
16
|
+
* Husky options.
|
|
17
|
+
*/
|
|
18
|
+
huskyOptions?: HuskyOptions;
|
|
14
19
|
renovateOptions?: RenovateOptions;
|
|
15
20
|
lintSynthesizedOptions?: LintSynthesizedOptions;
|
|
16
21
|
withTerraform?: boolean;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,cAAc,IAAI,kBAAkB,EAG1C,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,cAAc,IAAI,kBAAkB,EAG1C,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEnE,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,oBAAoB,CAAC;IAItE,eAAe,CAAC,EAAE,eAAe,CAAA;IAKjC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IAEzC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAA;IAK3B,eAAe,CAAC,EAAE,eAAe,CAAA;IAKjC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAK/C,aAAa,CAAC,EAAE,OAAO,CAAA;IAKvB,cAAc,CAAC,EAAE,OAAO,CAAA;IAKxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,qBAAa,OAAQ,SAAQ,WAAW;;gBAC1B,OAAO,EAAE,cAAc;CAyIpC"}
|
package/lib/index.js
CHANGED
|
@@ -3,13 +3,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _Project_instances, _Project_configureBeachball, _Project_configureCodeowners, _Project_configureDefaultTask, _Project_configureEditorConfig, _Project_configureLintSynthesized, _Project_configureRenovate, _Project_createPnpmWorkspaces;
|
|
6
|
+
var _Project_instances, _Project_configureBeachball, _Project_configureCodeowners, _Project_configureDefaultTask, _Project_configureEditorConfig, _Project_configureHusky, _Project_configureLintSynthesized, _Project_configureRenovate, _Project_createPnpmWorkspaces;
|
|
7
7
|
import { Project as BaseProject, TextFile, YamlFile, } from 'projen';
|
|
8
8
|
import * as R from 'ramda';
|
|
9
9
|
import { LintSynthesized, } from '@langri-sha/projen-lint-synthesized';
|
|
10
10
|
import { EditorConfig, } from '@langri-sha/projen-editorconfig';
|
|
11
11
|
import { Codeowners, } from '@langri-sha/projen-codeowners';
|
|
12
12
|
import { Renovate } from '@langri-sha/projen-renovate';
|
|
13
|
+
import { Husky } from '@langri-sha/projen-husky';
|
|
13
14
|
export class Project extends BaseProject {
|
|
14
15
|
constructor(options) {
|
|
15
16
|
super({
|
|
@@ -29,6 +30,7 @@ export class Project extends BaseProject {
|
|
|
29
30
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureCodeowners).call(this, options);
|
|
30
31
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureDefaultTask).call(this);
|
|
31
32
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureEditorConfig).call(this, options);
|
|
33
|
+
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureHusky).call(this, options);
|
|
32
34
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureLintSynthesized).call(this, options);
|
|
33
35
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_configureRenovate).call(this, options);
|
|
34
36
|
__classPrivateFieldGet(this, _Project_instances, "m", _Project_createPnpmWorkspaces).call(this, options);
|
|
@@ -74,7 +76,6 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
74
76
|
}
|
|
75
77
|
const defaults = {
|
|
76
78
|
'*': {
|
|
77
|
-
// eslint-disable-next-line unicorn/text-encoding-identifier-case
|
|
78
79
|
charset: 'utf-8',
|
|
79
80
|
end_of_line: 'lf',
|
|
80
81
|
indent_style: 'space',
|
|
@@ -87,6 +88,11 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
87
88
|
},
|
|
88
89
|
};
|
|
89
90
|
new EditorConfig(this, deepMerge(editorConfigOptions ?? {}, defaults));
|
|
91
|
+
}, _Project_configureHusky = function _Project_configureHusky({ huskyOptions }) {
|
|
92
|
+
if (!huskyOptions) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
new Husky(this, huskyOptions);
|
|
90
96
|
}, _Project_configureLintSynthesized = function _Project_configureLintSynthesized({ lintSynthesizedOptions }) {
|
|
91
97
|
new LintSynthesized(this, lintSynthesizedOptions ?? {
|
|
92
98
|
'*.{js,jsx,ts,tsx}': 'pnpm eslint --fix',
|
|
@@ -115,7 +121,7 @@ _Project_instances = new WeakSet(), _Project_configureBeachball = function _Proj
|
|
|
115
121
|
},
|
|
116
122
|
});
|
|
117
123
|
};
|
|
118
|
-
const getGitIgnoreOptions = ({ withTerraform, withTypeScript, ...options }) => ({
|
|
124
|
+
const getGitIgnoreOptions = ({ huskyOptions, withTerraform, withTypeScript, ...options }) => ({
|
|
119
125
|
...options.gitIgnoreOptions,
|
|
120
126
|
ignorePatterns: [
|
|
121
127
|
...`
|
|
@@ -123,12 +129,9 @@ const getGitIgnoreOptions = ({ withTerraform, withTypeScript, ...options }) => (
|
|
|
123
129
|
!.babelrc
|
|
124
130
|
!.dockerignore
|
|
125
131
|
!.editorconfig
|
|
126
|
-
!.eslintignore
|
|
127
|
-
!.eslintrc.js
|
|
128
132
|
!.gitattributes
|
|
129
133
|
!.gitignore
|
|
130
134
|
!.gitkeep
|
|
131
|
-
!.husky
|
|
132
135
|
!.npmignore
|
|
133
136
|
!.openssl
|
|
134
137
|
!.prettierignore
|
|
@@ -139,7 +142,7 @@ const getGitIgnoreOptions = ({ withTerraform, withTypeScript, ...options }) => (
|
|
|
139
142
|
${withTypeScript ? '*.tsbuildinfo' : ''}
|
|
140
143
|
|
|
141
144
|
!.github/
|
|
142
|
-
!.husky/
|
|
145
|
+
${huskyOptions ? '!.husky/' : ''}
|
|
143
146
|
!.projen/
|
|
144
147
|
${options.workspaces?.map((workspace) => `${workspace}/lib/`).join('\n') ?? ''}
|
|
145
148
|
node_modules/
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EAEtB,QAAQ,EACR,QAAQ,GACT,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAG1B,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,YAAY,GAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,UAAU,GAEX,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAwB,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EAEtB,QAAQ,EACR,QAAQ,GACT,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAG1B,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,YAAY,GAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,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OAAO,CAAC,gBAAgB;IAC3B,cAAc,EAAE;QACd,GAAG;;;;;;;;;;;;MAYD,aAAa,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;;;MAG3C,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;;;MAGrC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;;MAE9B,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;;KAE7E;aACE,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aAChC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1C,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,cAAc,IAAI,EAAE,CAAC;KACpD;CACF,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langri-sha/projen-project",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -8,18 +8,19 @@
|
|
|
8
8
|
"prepublishOnly": "rm -rf lib; tsc --project tsconfig.build.json"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@langri-sha/projen-codeowners": "0.2.
|
|
12
|
-
"@langri-sha/projen-editorconfig": "0.3.
|
|
13
|
-
"@langri-sha/projen-
|
|
14
|
-
"@langri-sha/projen-
|
|
11
|
+
"@langri-sha/projen-codeowners": "0.2.1",
|
|
12
|
+
"@langri-sha/projen-editorconfig": "0.3.2",
|
|
13
|
+
"@langri-sha/projen-husky": "0.1.1",
|
|
14
|
+
"@langri-sha/projen-lint-synthesized": "0.2.3",
|
|
15
|
+
"@langri-sha/projen-renovate": "0.2.1",
|
|
15
16
|
"beachball": "2.43.1",
|
|
16
|
-
"ramda": "0.
|
|
17
|
+
"ramda": "0.30.0"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"@langri-sha/jest-test": "0.7.1",
|
|
20
21
|
"@langri-sha/tsconfig": "0.9.0",
|
|
21
|
-
"@types/ramda": "0.
|
|
22
|
-
"projen": "0.81.
|
|
22
|
+
"@types/ramda": "0.30.0",
|
|
23
|
+
"projen": "0.81.10"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"projen": "^0.81.1",
|
package/readme
CHANGED
|
@@ -8,10 +8,13 @@ projects.
|
|
|
8
8
|
- managing [Beacbhall] configuration for publishing packages
|
|
9
9
|
- configures [PNPM] [workspaces]
|
|
10
10
|
- configures [`@langri-sha/tsconfig`] for TypeScript monorepos
|
|
11
|
+
- managing Git hooks with [`@langri-sha/projen-husky`]
|
|
11
12
|
- configures extensive list of Git ignore patterns
|
|
12
13
|
- manages [code owners] with [`@langri-sha/projen-codeowners`]
|
|
13
14
|
|
|
14
15
|
[`@langri-sha/codeowners`]: https://www.npmjs.com/package/@langri-sha/codeowners
|
|
16
|
+
[`@langri-sha/projen-husky`]:
|
|
17
|
+
https://www.npmjs.com/package/@langri-sha/projen-husky
|
|
15
18
|
[`@langri-sha/tsconfig`]: https://www.npmjs.com/package/@langri-sha/tsconfig
|
|
16
19
|
[beachball]: https://microsoft.github.io/beachball/
|
|
17
20
|
[code owners]:
|
package/src/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type CodeownersOptions,
|
|
22
22
|
} from '@langri-sha/projen-codeowners'
|
|
23
23
|
import { Renovate, type RenovateOptions } from '@langri-sha/projen-renovate'
|
|
24
|
+
import { Husky, type HuskyOptions } from '@langri-sha/projen-husky'
|
|
24
25
|
|
|
25
26
|
export interface ProjectOptions
|
|
26
27
|
extends Omit<BaseProjectOptions, 'renovatebot' | 'renovatebotOptions'> {
|
|
@@ -39,6 +40,11 @@ export interface ProjectOptions
|
|
|
39
40
|
*/
|
|
40
41
|
editorConfigOptions?: EditorConfigOptions
|
|
41
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Husky options.
|
|
45
|
+
*/
|
|
46
|
+
huskyOptions?: HuskyOptions
|
|
47
|
+
|
|
42
48
|
/*
|
|
43
49
|
* Pass in to configure Renovate.
|
|
44
50
|
*/
|
|
@@ -85,6 +91,7 @@ export class Project extends BaseProject {
|
|
|
85
91
|
this.#configureCodeowners(options)
|
|
86
92
|
this.#configureDefaultTask()
|
|
87
93
|
this.#configureEditorConfig(options)
|
|
94
|
+
this.#configureHusky(options)
|
|
88
95
|
this.#configureLintSynthesized(options)
|
|
89
96
|
this.#configureRenovate(options)
|
|
90
97
|
this.#createPnpmWorkspaces(options)
|
|
@@ -141,7 +148,6 @@ export class Project extends BaseProject {
|
|
|
141
148
|
|
|
142
149
|
const defaults: EditorConfigOptions = {
|
|
143
150
|
'*': {
|
|
144
|
-
// eslint-disable-next-line unicorn/text-encoding-identifier-case
|
|
145
151
|
charset: 'utf-8',
|
|
146
152
|
end_of_line: 'lf',
|
|
147
153
|
indent_style: 'space',
|
|
@@ -157,6 +163,14 @@ export class Project extends BaseProject {
|
|
|
157
163
|
new EditorConfig(this, deepMerge(editorConfigOptions ?? {}, defaults))
|
|
158
164
|
}
|
|
159
165
|
|
|
166
|
+
#configureHusky({ huskyOptions }: ProjectOptions) {
|
|
167
|
+
if (!huskyOptions) {
|
|
168
|
+
return
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
new Husky(this, huskyOptions)
|
|
172
|
+
}
|
|
173
|
+
|
|
160
174
|
#configureLintSynthesized({ lintSynthesizedOptions }: ProjectOptions) {
|
|
161
175
|
new LintSynthesized(
|
|
162
176
|
this,
|
|
@@ -198,6 +212,7 @@ export class Project extends BaseProject {
|
|
|
198
212
|
}
|
|
199
213
|
|
|
200
214
|
const getGitIgnoreOptions = ({
|
|
215
|
+
huskyOptions,
|
|
201
216
|
withTerraform,
|
|
202
217
|
withTypeScript,
|
|
203
218
|
...options
|
|
@@ -209,12 +224,9 @@ const getGitIgnoreOptions = ({
|
|
|
209
224
|
!.babelrc
|
|
210
225
|
!.dockerignore
|
|
211
226
|
!.editorconfig
|
|
212
|
-
!.eslintignore
|
|
213
|
-
!.eslintrc.js
|
|
214
227
|
!.gitattributes
|
|
215
228
|
!.gitignore
|
|
216
229
|
!.gitkeep
|
|
217
|
-
!.husky
|
|
218
230
|
!.npmignore
|
|
219
231
|
!.openssl
|
|
220
232
|
!.prettierignore
|
|
@@ -225,7 +237,7 @@ const getGitIgnoreOptions = ({
|
|
|
225
237
|
${withTypeScript ? '*.tsbuildinfo' : ''}
|
|
226
238
|
|
|
227
239
|
!.github/
|
|
228
|
-
!.husky/
|
|
240
|
+
${huskyOptions ? '!.husky/' : ''}
|
|
229
241
|
!.projen/
|
|
230
242
|
${options.workspaces?.map((workspace) => `${workspace}/lib/`).join('\n') ?? ''}
|
|
231
243
|
node_modules/
|