@prover-coder-ai/docker-git 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/src/docker-git/main.js +5 -2
- package/dist/src/docker-git/main.js.map +1 -1
- package/package.json +5 -1
- package/.jscpd.json +0 -16
- package/.package.json.release.bak +0 -110
- package/CHANGELOG.md +0 -133
- package/biome.json +0 -34
- package/eslint.config.mts +0 -305
- package/eslint.effect-ts-check.config.mjs +0 -220
- package/linter.config.json +0 -33
- package/src/app/main.ts +0 -18
- package/src/app/program.ts +0 -75
- package/src/docker-git/cli/input.ts +0 -29
- package/src/docker-git/cli/parser-apply.ts +0 -28
- package/src/docker-git/cli/parser-attach.ts +0 -22
- package/src/docker-git/cli/parser-auth.ts +0 -154
- package/src/docker-git/cli/parser-clone.ts +0 -50
- package/src/docker-git/cli/parser-create.ts +0 -3
- package/src/docker-git/cli/parser-mcp-playwright.ts +0 -24
- package/src/docker-git/cli/parser-options.ts +0 -211
- package/src/docker-git/cli/parser-panes.ts +0 -22
- package/src/docker-git/cli/parser-scrap.ts +0 -106
- package/src/docker-git/cli/parser-sessions.ts +0 -101
- package/src/docker-git/cli/parser-shared.ts +0 -51
- package/src/docker-git/cli/parser-state.ts +0 -86
- package/src/docker-git/cli/parser.ts +0 -82
- package/src/docker-git/cli/read-command.ts +0 -26
- package/src/docker-git/cli/usage.ts +0 -129
- package/src/docker-git/main.ts +0 -18
- package/src/docker-git/menu-actions.ts +0 -273
- package/src/docker-git/menu-auth-data.ts +0 -184
- package/src/docker-git/menu-auth-helpers.ts +0 -30
- package/src/docker-git/menu-auth.ts +0 -311
- package/src/docker-git/menu-buffer-input.ts +0 -18
- package/src/docker-git/menu-create.ts +0 -310
- package/src/docker-git/menu-input-handler.ts +0 -183
- package/src/docker-git/menu-input-utils.ts +0 -85
- package/src/docker-git/menu-input.ts +0 -2
- package/src/docker-git/menu-labeled-env.ts +0 -37
- package/src/docker-git/menu-menu.ts +0 -58
- package/src/docker-git/menu-project-auth-claude.ts +0 -70
- package/src/docker-git/menu-project-auth-data.ts +0 -292
- package/src/docker-git/menu-project-auth.ts +0 -271
- package/src/docker-git/menu-render-auth.ts +0 -65
- package/src/docker-git/menu-render-common.ts +0 -67
- package/src/docker-git/menu-render-layout.ts +0 -30
- package/src/docker-git/menu-render-project-auth.ts +0 -70
- package/src/docker-git/menu-render-select.ts +0 -250
- package/src/docker-git/menu-render.ts +0 -292
- package/src/docker-git/menu-select-actions.ts +0 -150
- package/src/docker-git/menu-select-connect.ts +0 -27
- package/src/docker-git/menu-select-load.ts +0 -33
- package/src/docker-git/menu-select-order.ts +0 -37
- package/src/docker-git/menu-select-runtime.ts +0 -143
- package/src/docker-git/menu-select-view.ts +0 -25
- package/src/docker-git/menu-select.ts +0 -145
- package/src/docker-git/menu-shared.ts +0 -256
- package/src/docker-git/menu-startup.ts +0 -83
- package/src/docker-git/menu-types.ts +0 -170
- package/src/docker-git/menu.ts +0 -303
- package/src/docker-git/program.ts +0 -154
- package/src/docker-git/tmux.ts +0 -292
- package/tests/app/main.test.ts +0 -65
- package/tests/docker-git/entrypoint-auth.test.ts +0 -40
- package/tests/docker-git/fixtures/project-item.ts +0 -24
- package/tests/docker-git/menu-select-connect.test.ts +0 -55
- package/tests/docker-git/menu-select-order.test.ts +0 -84
- package/tests/docker-git/menu-startup.test.ts +0 -51
- package/tests/docker-git/parser-network-options.test.ts +0 -47
- package/tests/docker-git/parser.test.ts +0 -340
- package/tsconfig.build.json +0 -8
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -32
- package/vite.docker-git.config.ts +0 -34
- package/vitest.config.ts +0 -85
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prover-coder-ai/docker-git",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Minimal Vite-powered TypeScript console starter using Effect",
|
|
5
5
|
"main": "dist/src/docker-git/main.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"docker-git": "dist/src/docker-git/main.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
9
12
|
"directories": {
|
|
10
13
|
"doc": "doc"
|
|
11
14
|
},
|
|
@@ -50,6 +53,7 @@
|
|
|
50
53
|
"build:docker-git": "vite build --config vite.docker-git.config.ts",
|
|
51
54
|
"check": "pnpm run typecheck",
|
|
52
55
|
"clone": "pnpm -C ../.. run clone",
|
|
56
|
+
"open": "pnpm -C ../.. run open",
|
|
53
57
|
"docker-git": "node dist/src/docker-git/main.js",
|
|
54
58
|
"list": "pnpm -C ../.. run list",
|
|
55
59
|
"prestart": "pnpm run build",
|
package/.jscpd.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"threshold": 0,
|
|
3
|
-
"minTokens": 30,
|
|
4
|
-
"minLines": 5,
|
|
5
|
-
"ignore": [
|
|
6
|
-
"**/node_modules/**",
|
|
7
|
-
"**/build/**",
|
|
8
|
-
"**/dist/**",
|
|
9
|
-
"**/*.min.js",
|
|
10
|
-
"**/reports/**"
|
|
11
|
-
],
|
|
12
|
-
"skipComments": true,
|
|
13
|
-
"ignorePattern": [
|
|
14
|
-
"private readonly \\w+: \\w+;\\s*private readonly \\w+: \\w+;\\s*private \\w+: \\w+ \\| null = null;\\s*private \\w+: \\w+ \\| null = null;"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@prover-coder-ai/docker-git",
|
|
3
|
-
"version": "1.0.22",
|
|
4
|
-
"description": "Minimal Vite-powered TypeScript console starter using Effect",
|
|
5
|
-
"main": "dist/src/docker-git/main.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"docker-git": "dist/src/docker-git/main.js"
|
|
8
|
-
},
|
|
9
|
-
"directories": {
|
|
10
|
-
"doc": "doc"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"prebuild": "pnpm -C ../lib build",
|
|
14
|
-
"build": "pnpm run build:app && pnpm run build:docker-git",
|
|
15
|
-
"build:app": "vite build --ssr src/app/main.ts",
|
|
16
|
-
"prepack": "pnpm run build:docker-git",
|
|
17
|
-
"dev": "vite build --watch --ssr src/app/main.ts",
|
|
18
|
-
"prelint": "pnpm -C ../lib build",
|
|
19
|
-
"lint": "PATH=../../scripts:$PATH vibecode-linter src/",
|
|
20
|
-
"lint:tests": "PATH=../../scripts:$PATH vibecode-linter tests/",
|
|
21
|
-
"lint:effect": "PATH=../../scripts:$PATH eslint --config eslint.effect-ts-check.config.mjs .",
|
|
22
|
-
"prebuild:docker-git": "pnpm -C ../lib build",
|
|
23
|
-
"build:docker-git": "vite build --config vite.docker-git.config.ts",
|
|
24
|
-
"check": "pnpm run typecheck",
|
|
25
|
-
"clone": "pnpm -C ../.. run clone",
|
|
26
|
-
"docker-git": "node dist/src/docker-git/main.js",
|
|
27
|
-
"list": "pnpm -C ../.. run list",
|
|
28
|
-
"prestart": "pnpm run build",
|
|
29
|
-
"start": "node dist/main.js",
|
|
30
|
-
"pretest": "pnpm -C ../lib build",
|
|
31
|
-
"test": "pnpm run lint:tests && vitest run",
|
|
32
|
-
"pretypecheck": "pnpm -C ../lib build",
|
|
33
|
-
"typecheck": "tsc --noEmit"
|
|
34
|
-
},
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/ProverCoderAI/docker-git.git"
|
|
38
|
-
},
|
|
39
|
-
"keywords": [
|
|
40
|
-
"effect",
|
|
41
|
-
"typescript",
|
|
42
|
-
"vite",
|
|
43
|
-
"console"
|
|
44
|
-
],
|
|
45
|
-
"author": "",
|
|
46
|
-
"license": "ISC",
|
|
47
|
-
"type": "module",
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/ProverCoderAI/docker-git/issues"
|
|
50
|
-
},
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://github.com/ProverCoderAI/docker-git#readme",
|
|
55
|
-
"packageManager": "pnpm@10.28.0",
|
|
56
|
-
"dependencies": {
|
|
57
|
-
"@effect/cli": "^0.73.0",
|
|
58
|
-
"@effect/cluster": "^0.56.1",
|
|
59
|
-
"@effect/experimental": "^0.58.0",
|
|
60
|
-
"@effect/platform": "^0.94.1",
|
|
61
|
-
"@effect/platform-node": "^0.104.0",
|
|
62
|
-
"@effect/printer": "^0.47.0",
|
|
63
|
-
"@effect/printer-ansi": "^0.47.0",
|
|
64
|
-
"@effect/rpc": "^0.73.0",
|
|
65
|
-
"@effect/schema": "^0.75.5",
|
|
66
|
-
"@effect/sql": "^0.49.0",
|
|
67
|
-
"@effect/typeclass": "^0.38.0",
|
|
68
|
-
"@effect/workflow": "^0.16.0",
|
|
69
|
-
"effect": "^3.19.14",
|
|
70
|
-
"ink": "^5.0.1",
|
|
71
|
-
"react": "^18.3.1",
|
|
72
|
-
"react-reconciler": "^0.29.2",
|
|
73
|
-
"ts-morph": "^27.0.2"
|
|
74
|
-
},
|
|
75
|
-
"devDependencies": {
|
|
76
|
-
"@effect-template/lib": "workspace:*",
|
|
77
|
-
"@biomejs/biome": "^2.3.11",
|
|
78
|
-
"@effect/eslint-plugin": "^0.3.2",
|
|
79
|
-
"@effect/language-service": "latest",
|
|
80
|
-
"@effect/vitest": "^0.27.0",
|
|
81
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
82
|
-
"@eslint/compat": "2.0.1",
|
|
83
|
-
"@eslint/eslintrc": "3.3.3",
|
|
84
|
-
"@eslint/js": "9.39.2",
|
|
85
|
-
"@prover-coder-ai/eslint-plugin-suggest-members": "^0.0.13",
|
|
86
|
-
"@ton-ai-core/vibecode-linter": "^1.0.6",
|
|
87
|
-
"@types/node": "^24.10.9",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
89
|
-
"@typescript-eslint/parser": "^8.53.0",
|
|
90
|
-
"typescript-eslint": "^8.53.0",
|
|
91
|
-
"@vitest/coverage-v8": "^4.0.17",
|
|
92
|
-
"eslint": "^9.39.2",
|
|
93
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
94
|
-
"eslint-plugin-codegen": "0.34.1",
|
|
95
|
-
"eslint-plugin-import": "^2.32.0",
|
|
96
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
97
|
-
"eslint-plugin-sonarjs": "^3.0.5",
|
|
98
|
-
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
99
|
-
"eslint-plugin-unicorn": "^62.0.0",
|
|
100
|
-
"@vitest/eslint-plugin": "^1.6.6",
|
|
101
|
-
"@types/react": "^18.3.12",
|
|
102
|
-
"biome": "npm:@biomejs/biome@^2.3.11",
|
|
103
|
-
"globals": "^17.0.0",
|
|
104
|
-
"jscpd": "^4.0.7",
|
|
105
|
-
"typescript": "^5.9.3",
|
|
106
|
-
"vite": "^7.3.1",
|
|
107
|
-
"vite-tsconfig-paths": "^6.0.4",
|
|
108
|
-
"vitest": "^4.0.17"
|
|
109
|
-
}
|
|
110
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# @prover-coder-ai/docker-git
|
|
2
|
-
|
|
3
|
-
## 1.0.22
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- chore: automated version bump
|
|
8
|
-
|
|
9
|
-
## 1.0.21
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- chore: automated version bump
|
|
14
|
-
|
|
15
|
-
## 1.0.20
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- chore: automated version bump
|
|
20
|
-
|
|
21
|
-
## 1.0.19
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- chore: automated version bump
|
|
26
|
-
|
|
27
|
-
## 1.0.18
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- chore: automated version bump
|
|
32
|
-
|
|
33
|
-
## 1.0.17
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- chore: automated version bump
|
|
38
|
-
|
|
39
|
-
## 1.0.16
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- chore: automated version bump
|
|
44
|
-
|
|
45
|
-
## 1.0.15
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- chore: automated version bump
|
|
50
|
-
|
|
51
|
-
## 1.0.14
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- chore: automated version bump
|
|
56
|
-
|
|
57
|
-
## 1.0.13
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- chore: automated version bump
|
|
62
|
-
|
|
63
|
-
## 1.0.12
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- chore: automated version bump
|
|
68
|
-
|
|
69
|
-
## 1.0.11
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- chore: automated version bump
|
|
74
|
-
|
|
75
|
-
## 1.0.10
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- chore: automated version bump
|
|
80
|
-
|
|
81
|
-
## 1.0.9
|
|
82
|
-
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- chore: automated version bump
|
|
86
|
-
|
|
87
|
-
## 1.0.8
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- chore: automated version bump
|
|
92
|
-
|
|
93
|
-
## 1.0.7
|
|
94
|
-
|
|
95
|
-
### Patch Changes
|
|
96
|
-
|
|
97
|
-
- chore: automated version bump
|
|
98
|
-
|
|
99
|
-
## 1.0.6
|
|
100
|
-
|
|
101
|
-
### Patch Changes
|
|
102
|
-
|
|
103
|
-
- chore: automated version bump
|
|
104
|
-
|
|
105
|
-
## 1.0.5
|
|
106
|
-
|
|
107
|
-
### Patch Changes
|
|
108
|
-
|
|
109
|
-
- chore: automated version bump
|
|
110
|
-
|
|
111
|
-
## 1.0.4
|
|
112
|
-
|
|
113
|
-
### Patch Changes
|
|
114
|
-
|
|
115
|
-
- chore: automated version bump
|
|
116
|
-
|
|
117
|
-
## 1.0.3
|
|
118
|
-
|
|
119
|
-
### Patch Changes
|
|
120
|
-
|
|
121
|
-
- chore: automated version bump
|
|
122
|
-
|
|
123
|
-
## 1.0.2
|
|
124
|
-
|
|
125
|
-
### Patch Changes
|
|
126
|
-
|
|
127
|
-
- chore: automated version bump
|
|
128
|
-
|
|
129
|
-
## 1.0.1
|
|
130
|
-
|
|
131
|
-
### Patch Changes
|
|
132
|
-
|
|
133
|
-
- chore: automated version bump
|
package/biome.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
|
|
3
|
-
"vcs": {
|
|
4
|
-
"enabled": false,
|
|
5
|
-
"clientKind": "git",
|
|
6
|
-
"useIgnoreFile": false
|
|
7
|
-
},
|
|
8
|
-
"files": {
|
|
9
|
-
"ignoreUnknown": false
|
|
10
|
-
},
|
|
11
|
-
"assist": {
|
|
12
|
-
"enabled": false
|
|
13
|
-
},
|
|
14
|
-
"formatter": {
|
|
15
|
-
"enabled": false,
|
|
16
|
-
"indentStyle": "tab"
|
|
17
|
-
},
|
|
18
|
-
"linter": {
|
|
19
|
-
"enabled": false,
|
|
20
|
-
"rules": {
|
|
21
|
-
"recommended": false,
|
|
22
|
-
"suspicious": {
|
|
23
|
-
"noExplicitAny": "off"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"javascript": {
|
|
28
|
-
"formatter": {
|
|
29
|
-
"enabled": false,
|
|
30
|
-
"quoteStyle": "double",
|
|
31
|
-
"semicolons": "asNeeded"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
package/eslint.config.mts
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
// eslint.config.mjs
|
|
2
|
-
// @ts-check
|
|
3
|
-
import eslint from '@eslint/js';
|
|
4
|
-
import { defineConfig } from 'eslint/config';
|
|
5
|
-
import tseslint from 'typescript-eslint';
|
|
6
|
-
import vitest from "@vitest/eslint-plugin";
|
|
7
|
-
import suggestMembers from "@prover-coder-ai/eslint-plugin-suggest-members";
|
|
8
|
-
import sonarjs from "eslint-plugin-sonarjs";
|
|
9
|
-
import unicorn from "eslint-plugin-unicorn";
|
|
10
|
-
import * as effectEslint from "@effect/eslint-plugin";
|
|
11
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
12
|
-
import codegen from "eslint-plugin-codegen";
|
|
13
|
-
import importPlugin from "eslint-plugin-import";
|
|
14
|
-
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
15
|
-
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys";
|
|
16
|
-
import globals from "globals";
|
|
17
|
-
import eslintCommentsConfigs from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
18
|
-
|
|
19
|
-
const codegenPlugin = fixupPluginRules(
|
|
20
|
-
codegen as unknown as Parameters<typeof fixupPluginRules>[0],
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const noFetchExample = [
|
|
24
|
-
"Пример:",
|
|
25
|
-
" import { FetchHttpClient, HttpClient } from \"@effect/platform\"",
|
|
26
|
-
" import { Effect } from \"effect\"",
|
|
27
|
-
" const program = Effect.gen(function* () {",
|
|
28
|
-
" const client = yield* HttpClient.HttpClient",
|
|
29
|
-
" return yield* client.get(`${api}/robots`)",
|
|
30
|
-
" }).pipe(",
|
|
31
|
-
" Effect.scoped,",
|
|
32
|
-
" Effect.provide(FetchHttpClient.layer)",
|
|
33
|
-
" )",
|
|
34
|
-
].join("\n");
|
|
35
|
-
|
|
36
|
-
export default defineConfig(
|
|
37
|
-
eslint.configs.recommended,
|
|
38
|
-
tseslint.configs.strictTypeChecked,
|
|
39
|
-
effectEslint.configs.dprint,
|
|
40
|
-
suggestMembers.configs.recommended,
|
|
41
|
-
eslintCommentsConfigs.recommended,
|
|
42
|
-
{
|
|
43
|
-
name: "analyzers",
|
|
44
|
-
languageOptions: {
|
|
45
|
-
parser: tseslint.parser,
|
|
46
|
-
globals: { ...globals.node, ...globals.browser },
|
|
47
|
-
parserOptions: {
|
|
48
|
-
projectService: true,
|
|
49
|
-
tsconfigRootDir: import.meta.dirname,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
plugins: {
|
|
53
|
-
sonarjs,
|
|
54
|
-
unicorn,
|
|
55
|
-
import: fixupPluginRules(importPlugin),
|
|
56
|
-
"sort-destructure-keys": sortDestructureKeys,
|
|
57
|
-
"simple-import-sort": simpleImportSort,
|
|
58
|
-
codegen: codegenPlugin,
|
|
59
|
-
},
|
|
60
|
-
files: ["**/*.ts", '**/*.{test,spec}.{ts,tsx}', '**/tests/**', '**/__tests__/**'],
|
|
61
|
-
settings: {
|
|
62
|
-
"import/parsers": {
|
|
63
|
-
"@typescript-eslint/parser": [".ts", ".tsx"],
|
|
64
|
-
},
|
|
65
|
-
"import/resolver": {
|
|
66
|
-
typescript: {
|
|
67
|
-
alwaysTryTypes: true,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
rules: {
|
|
72
|
-
...sonarjs.configs.recommended.rules,
|
|
73
|
-
...unicorn.configs.recommended.rules,
|
|
74
|
-
"no-restricted-imports": ["error", {
|
|
75
|
-
paths: [
|
|
76
|
-
{
|
|
77
|
-
name: "ts-pattern",
|
|
78
|
-
message: "Use Effect.Match instead of ts-pattern.",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "zod",
|
|
82
|
-
message: "Use @effect/schema for schemas and validation.",
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
}],
|
|
86
|
-
"codegen/codegen": "error",
|
|
87
|
-
"import/first": "error",
|
|
88
|
-
"import/newline-after-import": "error",
|
|
89
|
-
"import/no-duplicates": "error",
|
|
90
|
-
"import/no-unresolved": "off",
|
|
91
|
-
"import/order": "off",
|
|
92
|
-
"simple-import-sort/imports": "off",
|
|
93
|
-
"sort-destructure-keys/sort-destructure-keys": "error",
|
|
94
|
-
"no-fallthrough": "off",
|
|
95
|
-
"no-irregular-whitespace": "off",
|
|
96
|
-
"object-shorthand": "error",
|
|
97
|
-
"prefer-destructuring": "off",
|
|
98
|
-
"sort-imports": "off",
|
|
99
|
-
"no-unused-vars": "off",
|
|
100
|
-
"prefer-rest-params": "off",
|
|
101
|
-
"prefer-spread": "off",
|
|
102
|
-
"unicorn/prefer-top-level-await": "off",
|
|
103
|
-
"unicorn/prevent-abbreviations": "off",
|
|
104
|
-
"unicorn/no-null": "off",
|
|
105
|
-
complexity: ["error", 8],
|
|
106
|
-
"max-lines-per-function": [
|
|
107
|
-
"error",
|
|
108
|
-
{ max: 50, skipBlankLines: true, skipComments: true },
|
|
109
|
-
],
|
|
110
|
-
"max-params": ["error", 5],
|
|
111
|
-
"max-depth": ["error", 4],
|
|
112
|
-
"max-lines": [
|
|
113
|
-
"error",
|
|
114
|
-
{ max: 300, skipBlankLines: true, skipComments: true },
|
|
115
|
-
],
|
|
116
|
-
|
|
117
|
-
"@typescript-eslint/restrict-template-expressions": ["error", {
|
|
118
|
-
allowNumber: true,
|
|
119
|
-
allowBoolean: true,
|
|
120
|
-
allowNullish: false,
|
|
121
|
-
allowAny: false,
|
|
122
|
-
allowRegExp: false
|
|
123
|
-
}],
|
|
124
|
-
"@eslint-community/eslint-comments/no-use": "error",
|
|
125
|
-
"@eslint-community/eslint-comments/no-unlimited-disable": "error",
|
|
126
|
-
"@eslint-community/eslint-comments/disable-enable-pair": "error",
|
|
127
|
-
"@eslint-community/eslint-comments/no-unused-disable": "error",
|
|
128
|
-
"no-restricted-syntax": [
|
|
129
|
-
"error",
|
|
130
|
-
{
|
|
131
|
-
selector: "TSUnknownKeyword",
|
|
132
|
-
message: "Запрещено 'unknown'.",
|
|
133
|
-
},
|
|
134
|
-
// CHANGE: запрет прямого fetch в коде
|
|
135
|
-
// WHY: enforce Effect-TS httpClient as единственный источник сетевых эффектов
|
|
136
|
-
// QUOTE(ТЗ): "Вместо fetch должно быть всегда написано httpClient от библиотеки Effect-TS"
|
|
137
|
-
// REF: user-msg-1
|
|
138
|
-
// SOURCE: n/a
|
|
139
|
-
// FORMAT THEOREM: ∀call ∈ Calls: callee(call)=fetch → lint_error(call)
|
|
140
|
-
// PURITY: SHELL
|
|
141
|
-
// EFFECT: Effect<never, never, never>
|
|
142
|
-
// INVARIANT: direct fetch calls are forbidden
|
|
143
|
-
// COMPLEXITY: O(1)
|
|
144
|
-
{
|
|
145
|
-
selector: "CallExpression[callee.name='fetch']",
|
|
146
|
-
message: `Запрещён fetch — используй HttpClient (Effect-TS).\n${noFetchExample}`,
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
selector:
|
|
150
|
-
"CallExpression[callee.object.name='window'][callee.property.name='fetch']",
|
|
151
|
-
message: `Запрещён window.fetch — используй HttpClient (Effect-TS).\n${noFetchExample}`,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
selector:
|
|
155
|
-
"CallExpression[callee.object.name='globalThis'][callee.property.name='fetch']",
|
|
156
|
-
message: `Запрещён globalThis.fetch — используй HttpClient (Effect-TS).\n${noFetchExample}`,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
selector:
|
|
160
|
-
"CallExpression[callee.object.name='self'][callee.property.name='fetch']",
|
|
161
|
-
message: `Запрещён self.fetch — используй HttpClient (Effect-TS).\n${noFetchExample}`,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
selector:
|
|
165
|
-
"CallExpression[callee.object.name='global'][callee.property.name='fetch']",
|
|
166
|
-
message: `Запрещён global.fetch — используй HttpClient (Effect-TS).\n${noFetchExample}`,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
selector: "TryStatement",
|
|
170
|
-
message: "Используй Effect.try / catchAll вместо try/catch в core/app/domain.",
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
selector: "SwitchStatement",
|
|
174
|
-
message: [
|
|
175
|
-
"Switch statements are forbidden in functional programming paradigm.",
|
|
176
|
-
"How to fix: Use Effect.Match instead.",
|
|
177
|
-
"Example:",
|
|
178
|
-
" import { Match } from 'effect';",
|
|
179
|
-
" type Item = { type: 'this' } | { type: 'that' };",
|
|
180
|
-
" const result = Match.value(item).pipe(",
|
|
181
|
-
" Match.when({ type: 'this' }, (it) => processThis(it)),",
|
|
182
|
-
" Match.when({ type: 'that' }, (it) => processThat(it)),",
|
|
183
|
-
" Match.exhaustive,",
|
|
184
|
-
" );",
|
|
185
|
-
].join("\n"),
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
selector: 'CallExpression[callee.name="require"]',
|
|
189
|
-
message: "Avoid using require(). Use ES6 imports instead.",
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
selector: "ThrowStatement > Literal:not([value=/^\\w+Error:/])",
|
|
193
|
-
message:
|
|
194
|
-
'Do not throw string literals or non-Error objects. Throw new Error("...") instead.',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
selector:
|
|
198
|
-
"FunctionDeclaration[async=true], FunctionExpression[async=true], ArrowFunctionExpression[async=true]",
|
|
199
|
-
message:
|
|
200
|
-
"Запрещён async/await — используй Effect.gen / Effect.tryPromise.",
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
selector: "NewExpression[callee.name='Promise']",
|
|
204
|
-
message:
|
|
205
|
-
"Запрещён new Promise — используй Effect.async / Effect.tryPromise.",
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
selector: "CallExpression[callee.object.name='Promise']",
|
|
209
|
-
message:
|
|
210
|
-
"Запрещены Promise.* — используй комбинаторы Effect (all, forEach, etc.).",
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
|
|
214
|
-
message: "Do not use spread arguments in Array.push",
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
"no-throw-literal": "error",
|
|
218
|
-
"@typescript-eslint/no-restricted-types": [
|
|
219
|
-
"error",
|
|
220
|
-
{
|
|
221
|
-
types: {
|
|
222
|
-
unknown: {
|
|
223
|
-
message:
|
|
224
|
-
"Не используем 'unknown'. Уточни тип или наведи порядок в источнике данных.",
|
|
225
|
-
},
|
|
226
|
-
Promise: {
|
|
227
|
-
message: "Запрещён Promise — используй Effect.Effect<A, E, R>.",
|
|
228
|
-
suggest: ["Effect.Effect"],
|
|
229
|
-
},
|
|
230
|
-
"Promise<*>": {
|
|
231
|
-
message:
|
|
232
|
-
"Запрещён Promise<T> — используй Effect.Effect<T, E, R>.",
|
|
233
|
-
suggest: ["Effect.Effect<T, E, R>"],
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
|
|
239
|
-
// "no-throw-literal": "off",
|
|
240
|
-
"@typescript-eslint/only-throw-error": [
|
|
241
|
-
"error",
|
|
242
|
-
{ allowThrowingUnknown: false, allowThrowingAny: false },
|
|
243
|
-
],
|
|
244
|
-
"@typescript-eslint/array-type": ["warn", {
|
|
245
|
-
default: "generic",
|
|
246
|
-
readonly: "generic"
|
|
247
|
-
}],
|
|
248
|
-
"@typescript-eslint/member-delimiter-style": 0,
|
|
249
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
250
|
-
"@typescript-eslint/ban-types": "off",
|
|
251
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
252
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
253
|
-
"@typescript-eslint/consistent-type-imports": "warn",
|
|
254
|
-
"@typescript-eslint/no-unused-vars": ["error", {
|
|
255
|
-
argsIgnorePattern: "^_",
|
|
256
|
-
varsIgnorePattern: "^_"
|
|
257
|
-
}],
|
|
258
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
259
|
-
"@typescript-eslint/camelcase": "off",
|
|
260
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
261
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
262
|
-
"@typescript-eslint/interface-name-prefix": "off",
|
|
263
|
-
"@typescript-eslint/no-array-constructor": "off",
|
|
264
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
265
|
-
"@typescript-eslint/no-namespace": "off",
|
|
266
|
-
"@effect/dprint": ["error", {
|
|
267
|
-
config: {
|
|
268
|
-
indentWidth: 2,
|
|
269
|
-
lineWidth: 120,
|
|
270
|
-
semiColons: "asi",
|
|
271
|
-
quoteStyle: "alwaysDouble",
|
|
272
|
-
trailingCommas: "never",
|
|
273
|
-
operatorPosition: "maintain",
|
|
274
|
-
"arrowFunction.useParentheses": "force"
|
|
275
|
-
}
|
|
276
|
-
}]
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
files: ['**/*.{test,spec}.{ts,tsx}', 'tests/**', '**/__tests__/**'],
|
|
281
|
-
...vitest.configs.all,
|
|
282
|
-
languageOptions: {
|
|
283
|
-
globals: {
|
|
284
|
-
...vitest.environments.env.globals,
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
rules: {
|
|
288
|
-
// Allow eslint-disable/enable comments in test files for fine-grained control
|
|
289
|
-
'@eslint-community/eslint-comments/no-use': 'off',
|
|
290
|
-
// Disable line count limit for E2E tests that contain multiple test cases
|
|
291
|
-
'max-lines-per-function': 'off',
|
|
292
|
-
// `it.effect` is not recognized by sonar rule; disable to avoid false positives
|
|
293
|
-
'sonarjs/no-empty-test-file': 'off',
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
// 3) Для JS-файлов отключим типо-зависимые проверки
|
|
298
|
-
{
|
|
299
|
-
files: ['**/*.{js,cjs,mjs}'],
|
|
300
|
-
extends: [tseslint.configs.disableTypeChecked],
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
// 4) Глобальные игноры
|
|
304
|
-
{ ignores: ['dist/**', 'build/**', 'coverage/**', '**/dist/**'] },
|
|
305
|
-
);
|