-
Notifications
You must be signed in to change notification settings - Fork 2
/
.projenrc.ts
94 lines (87 loc) · 1.9 KB
/
.projenrc.ts
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
import {JsonFile, typescript, javascript, TextFile} from 'projen'
const nodeVersion = '20'
const project = new typescript.TypeScriptProject({
projenrcTs: true,
defaultReleaseBranch: 'main',
name: 'axios-error-redact',
description: 'Library to redact sensitive information from Axios errors',
keywords: [
'axios',
'error',
'sensitive',
'redact',
'interceptor',
'projen',
'typescript',
],
majorVersion: 1,
packageName: 'axios-error-redact',
packageManager: javascript.NodePackageManager.NPM,
repository: 'https://github.com/AminFazlMondo/Axios-Error-Redact.git',
authorEmail: '[email protected]',
authorName: 'Amin Fazl',
jest: false,
deps: [
'axios',
],
devDeps: [
'chai',
'@types/chai',
'mocha',
'@types/mocha',
'ts-eager',
'@types/babel__core',
],
releaseToNpm: true,
npmAccess: javascript.NpmAccess.PUBLIC,
npmTokenSecret: 'NPM_TOKEN',
minNodeVersion: '18.0.0',
tsconfig: {
compilerOptions: {
target: 'ES2019',
lib: ['ES2019'],
skipLibCheck: true,
},
},
docgen: true,
npmignore: [
'.mocharc.json',
'docs',
],
publishTasks: true,
autoApproveOptions: {
allowedUsernames: ['AminFazlMondo'],
},
autoApproveUpgrades: true,
workflowNodeVersion: nodeVersion,
releaseFailureIssue: true,
})
const additionalRules = {
'curly': [
'error',
'multi',
'consistent',
],
'semi': [
'error',
'never',
],
'object-curly-spacing': 'error',
'nonblock-statement-body-position': ['error', 'below'],
}
project.eslint?.addRules(additionalRules)
new JsonFile(project, '.mocharc.json', {
obj: {
recursive: true,
require: ['ts-eager/register'],
timeout: 8000,
slow: 3000,
extension: ['ts'],
spec: ['test/*.test.ts'],
},
})
new TextFile(project, '.nvmrc', {
lines: [nodeVersion],
})
project.tasks.tryFind('test')?.exec('mocha')
project.synth()