-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
onerepo.config.ts
42 lines (35 loc) · 1.04 KB
/
onerepo.config.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
import type { Config } from 'onerepo';
import { eslint } from '@onerepo/plugin-eslint';
import { prettier } from '@onerepo/plugin-prettier';
import { typescript } from '@onerepo/plugin-typescript';
export default {
root: true,
codeowners: {
'.': ['@paularmstrong'],
},
dependencies: {
mode: 'loose',
dedupe: true,
},
tasks: {
'pre-commit': {
parallel: [['$0 lint --add', '$0 format --add'], { cmd: '$0 astro -- check', match: '**/*.astro' }],
serial: [{ cmd: '$0 astro -- sync', match: 'src/content/**' }, '$0 tsc'],
},
'pre-merge': {
serial: ['$0 lint --all --no-fix', '$0 format --check', '$0 tsc', '$0 astro -- build', '$0 astro -- check'],
},
'post-checkout': {
serial: ['yarn'],
},
},
plugins: [
eslint({ name: ['lint', 'eslint'], extensions: ['ts', 'tsx', 'js', 'jsx', 'cjs', 'mjs', 'astro'] }),
prettier({ name: ['format', 'prettier'] }),
typescript({ tsconfig: 'tsconfig.json', useProjectReferences: false }),
],
vcs: {
autoSyncHooks: true,
},
templateDir: './config/templates',
} satisfies Config;