Skip to content

Commit 36a01cc

Browse files
committed
refactor: use graph to detect cyclic dependency
1 parent 75f810c commit 36a01cc

File tree

10 files changed

+591
-204
lines changed

10 files changed

+591
-204
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
33
"source.fixAll.eslint": "always"
4-
}
4+
},
5+
"cSpell.words": ["topo"]
56
}

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export default antfu({
44
ignores: [
55
'AGENTS.md',
66
'CLAUDE.md',
7+
'.claude/',
8+
'reference/',
79
],
810
rules: {
911
'ts/no-misused-new': 0,
@@ -19,4 +21,23 @@ export default antfu({
1921
'svelte/indent': 'off',
2022
'antfu/if-newline': 'off',
2123
},
24+
}, {
25+
files: [
26+
'**/*.{ts,tsx}',
27+
],
28+
ignores: [
29+
'**/*.md',
30+
'**/*.md/**',
31+
],
32+
rules: {
33+
'ts/naming-convention': [
34+
'error',
35+
{
36+
selector: 'memberLike',
37+
modifiers: ['private'],
38+
format: ['camelCase'],
39+
leadingUnderscore: 'require',
40+
},
41+
],
42+
},
2243
});

src/__testing__/async/async.item.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { AA, bbI } from './async.base';
77
export class BBImpl implements BB {
88
static counter = 0;
99

10-
constructor(@Inject(AA) private readonly aa: AA) {
10+
constructor(@Inject(AA) private readonly _aa: AA) {
1111
BBImpl.counter += 1;
1212
}
1313

1414
get key(): string {
15-
return `${this.aa.key}bb`;
15+
return `${this._aa.key}bb`;
1616
}
1717

1818
public getConstructedTime(): number {

0 commit comments

Comments
 (0)