-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
95 lines (94 loc) · 3.03 KB
/
Copy patheslint.config.ts
File metadata and controls
95 lines (94 loc) · 3.03 KB
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
import {defineConfig} from '@bfra.me/eslint-config'
export default defineConfig(
{
name: '@bfra.me/github-action',
ignores: [
'.agents/skills/',
'.ai/',
'.github/copilot-*.md',
'**/AGENTS.md',
'**/.obsidian/',
'docs/product/',
'RFCs/',
'RFCS.md',
'dist/**',
'docs/brainstorms/',
'docs/ideation/',
'docs/plans/',
'docs/solutions/',
],
typescript: {
tsconfigPath: './tsconfig.json',
},
vitest: true,
},
{
name: 'wiki markdown overrides',
files: ['docs/wiki/**/*.md'],
rules: {
'markdown/no-missing-label-refs': 'off',
},
},
{
name: 'deploy/scripts plain-Node-ESM overrides',
files: ['deploy/scripts/**/*.mjs'],
rules: {
// deploy/scripts uses node --test runner, not vitest
'vitest/no-import-node-test': 'off',
// plain Node ESM scripts use process directly without importing it
'node/prefer-global/process': 'off',
// import ordering is not enforced in plain-Node-ESM scripts
'perfectionist/sort-imports': 'off',
},
},
{
name: 'vitest overrides',
files: ['**/*.test.ts', '**/*.spec.ts'],
rules: {
'vitest/expect-expect': ['error', {assertFunctionNames: ['expect', 'expect*', 'assert*']}],
'vitest/prefer-lowercase-title': ['error', {ignore: ['describe']}],
},
},
{
// Phantom-dependency guard. The hoisted Bun linker resolves imports of
// undeclared packages from the workspace root, so flag any import that is
// declared in NO manifest. packageDir lists the root plus every workspace
// package, so a dependency counts as declared if it appears in the root or
// any package manifest — which matches how hoisted resolution actually
// works (root deps like @aws-sdk/client-s3 are shared) while still catching
// an import present in no package.json at all.
name: 'phantom-dependency guard',
files: ['**/*.ts'],
rules: {
'import-x/no-extraneous-dependencies': [
'error',
{
// Keep this list in sync with the workspace packages in
// package.json#workspaces. A missing entry produces false-positive
// extraneous-dependency errors for that package's imports.
packageDir: [
import.meta.dirname,
`${import.meta.dirname}/apps/action`,
`${import.meta.dirname}/apps/workspace-agent`,
`${import.meta.dirname}/packages/runtime`,
`${import.meta.dirname}/packages/gateway`,
`${import.meta.dirname}/packages/harness`,
],
// devDependencies are legitimate in tests, test support, config, and
// build scripts.
devDependencies: [
'**/*.test.ts',
'**/*.spec.ts',
'**/test-helpers.ts',
'**/__fixtures__/**',
'**/*.config.ts',
'eslint.config.ts',
'scripts/**',
'packages/harness/scripts/**',
],
peerDependencies: true,
},
],
},
},
)