-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoconfig.ts
105 lines (99 loc) · 1.7 KB
/
coconfig.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
95
96
97
98
99
100
101
102
103
104
105
const npmIgnore = `
# npmignore should match gitignore, except for the /build directory
# Custom
.transpiled
.nyc_output
.yarnrc.yml
.yarn
# Normally I would include this, but since we're trying to stay small...
__tests__
.github
# Stock
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.orig
work
pids
logs
results
coverage
lib-cov
html-report
xunit.xml
node_modules
npm-debug.log
.project
.idea
.settings
.iml
*.sublime-workspace
*.sublime-project
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
.AppleDouble
.LSOverride
.Spotlight-V100
.Trashes
`;
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
const jestConfig = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '(\\.|/)(test|spec)\\.[jt]sx?$',
};
export default {
'.npmignore': npmIgnore,
'.eslintignore': {
content: `build/
coverage
jest.config.js
.eslintrc.js
src/generated
__tests__/snapshots
__tests__/fake/coconfig.js`,
},
'.eslintrc.js': {
configuration: () => ({
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
project: './tsconfig.json',
},
}),
},
'jest.config.js': {
configuration: jestConfig,
},
'.prettierrc.js': {
configuration: {
bracketSpacing: true,
bracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
// A person has his limits, and 80 is not it.
printWidth: 100,
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
},
},
],
},
},
};