@burdenoff/toolchain 0.0.0-stage → 2026.1107.1
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 +500 -2
- package/bunfig/fragment.toml.tmpl +23 -0
- package/bunfig/release-age-excludes.json +168 -0
- package/dist/cli.js +3014 -0
- package/dist/knip/base.js +22 -0
- package/eslint/backend.d.ts +4 -0
- package/eslint/backend.js +487 -0
- package/eslint/browser.d.ts +5 -0
- package/eslint/browser.js +24 -0
- package/eslint/gateway.d.ts +4 -0
- package/eslint/gateway.js +53 -0
- package/eslint/index.d.ts +37 -0
- package/eslint/node.d.ts +5 -0
- package/eslint/node.js +43 -0
- package/eslint/react.d.ts +8 -0
- package/eslint/react.js +165 -0
- package/fmt/README.md +32 -0
- package/knip/base.ts +42 -0
- package/lefthook/base.yml +32 -0
- package/package.json +132 -4
- package/tsconfig/backend-library.json +23 -0
- package/tsconfig/backend.json +18 -0
- package/tsconfig/base.json +21 -0
- package/tsconfig/browser-extension.json +16 -0
- package/tsconfig/gateway.json +16 -0
- package/tsconfig/node-lib.json +15 -0
- package/tsconfig/react-app.json +17 -0
- package/tsconfig/react-lib.json +16 -0
- package/tsconfig/vscode-extension.json +15 -0
package/eslint/node.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import tseslint from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Burdenoff Node ESLint profile (@burdenoff/toolchain/eslint/node) for CLIs,
|
|
7
|
+
* MCP servers, Node SDKs, code extensions and plugins: typescript-eslint
|
|
8
|
+
* recommended, unused arguments allowed with a leading underscore, `any` as a
|
|
9
|
+
* warning, and no Prettier plugin (formatting is `bun fmt`'s job).
|
|
10
|
+
*
|
|
11
|
+
* // eslint.config.js
|
|
12
|
+
* import node from '@burdenoff/toolchain/eslint/node';
|
|
13
|
+
* export default node({ ignores: ['out/**'] });
|
|
14
|
+
*
|
|
15
|
+
* @param {object} [options]
|
|
16
|
+
* @param {string[]} [options.ignores] - Extra ignore globs appended to the defaults
|
|
17
|
+
* @param {Record<string, unknown>} [options.globals] - Extra globals merged over Node's
|
|
18
|
+
* @param {Record<string, unknown>} [options.rules] - Extra rules applied last
|
|
19
|
+
* @returns {import('eslint').Linter.Config[]}
|
|
20
|
+
*/
|
|
21
|
+
export function createNodeConfig(options = {}) {
|
|
22
|
+
const { ignores = [], globals: extraGlobals = {}, rules = {} } = options;
|
|
23
|
+
return tseslint.config(
|
|
24
|
+
{ ignores: ['**/dist/**', '**/out/**', '**/coverage/**', '**/node_modules/**', ...ignores] },
|
|
25
|
+
js.configs.recommended,
|
|
26
|
+
...tseslint.configs.recommended,
|
|
27
|
+
{
|
|
28
|
+
files: ['**/*.{ts,tsx,mts,cts,js,mjs,cjs}'],
|
|
29
|
+
languageOptions: {
|
|
30
|
+
ecmaVersion: 'latest',
|
|
31
|
+
sourceType: 'module',
|
|
32
|
+
globals: { ...globals.node, ...globals.es2022, ...extraGlobals },
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
36
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
37
|
+
...rules,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default createNodeConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FlatConfigArray, ReactOptions } from './index.js';
|
|
2
|
+
|
|
3
|
+
export type { ReactOptions };
|
|
4
|
+
export declare const RAW_COLOR_PATTERN: string;
|
|
5
|
+
export declare const PALETTE_CLASS_PATTERN: string;
|
|
6
|
+
export declare function rawColorRestrictedSyntax(): { selector: string; message: string }[];
|
|
7
|
+
export declare function createEslintConfig(options?: ReactOptions): FlatConfigArray;
|
|
8
|
+
export default createEslintConfig;
|
package/eslint/react.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Burdenoff React ESLint profile (@burdenoff/toolchain/eslint/react).
|
|
3
|
+
*
|
|
4
|
+
* A faithful port of fe-libs shared/config/eslint.config.mjs: the raw-colour
|
|
5
|
+
* guard, the Dialog import restriction and react-hooks v7 recommended. The
|
|
6
|
+
* plugins are dependencies of @burdenoff/toolchain; consumers keep only
|
|
7
|
+
* `eslint` as a devDependency.
|
|
8
|
+
*
|
|
9
|
+
* // eslint.config.js
|
|
10
|
+
* import { createEslintConfig } from '@burdenoff/toolchain/eslint/react';
|
|
11
|
+
* export default createEslintConfig({ ignores: ['src/generated/**'] });
|
|
12
|
+
*/
|
|
13
|
+
import js from '@eslint/js';
|
|
14
|
+
import globals from 'globals';
|
|
15
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
16
|
+
import react from 'eslint-plugin-react';
|
|
17
|
+
import tseslint from 'typescript-eslint';
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* ── Raw-colour guard ────────────────────────────────────────────────────────
|
|
21
|
+
* UI code uses the semantic tokens in fe-libs/shared/tokens (bg-*, text-*,
|
|
22
|
+
* border-*, action-*, status-*, chart-*, node-*, edge-*, canvas-*), never a raw
|
|
23
|
+
* colour. The guard reads string literals and template-string parts only, so
|
|
24
|
+
* a comment that quotes a PR number ("#268") or a bad class is never flagged.
|
|
25
|
+
*
|
|
26
|
+
* The patterns are esquery regexes: they must not contain "/" and use no flags.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A hex colour (#rgb, #rgba, #rrggbb, #rrggbbaa) not glued to a word on the
|
|
31
|
+
* left (so `{` and `page#abc` pass) or the right (so `#1234567` passes),
|
|
32
|
+
* or a CSS colour function with literal channels. `rgb(var(--x))` builds on a
|
|
33
|
+
* token and is allowed.
|
|
34
|
+
*/
|
|
35
|
+
export const RAW_COLOR_PATTERN =
|
|
36
|
+
'(?:^|[^&\\w])#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{3,4})(?![\\w-])|\\b(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch)\\((?!\\s*var\\()';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A Tailwind palette class (`bg-red-500`, `hover:text-slate-50`,
|
|
40
|
+
* `border-t-gray-200`, `bg-blue-500/20`) or a named black/white one
|
|
41
|
+
* (`text-white`, `bg-black/50`) on any colour utility. Token classes such as
|
|
42
|
+
* `text-text-primary`, `bg-status-error-bg` or `stroke-edge-default` do not match.
|
|
43
|
+
*/
|
|
44
|
+
export const PALETTE_CLASS_PATTERN =
|
|
45
|
+
'(?:^|[\\s:!])-?(?:bg|text|border(?:-[trblxyse])?|ring(?:-offset)?|inset-ring|outline|fill|stroke|divide|from|via|to|decoration|caret|accent|shadow|inset-shadow|drop-shadow|placeholder)-(?:(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|[1-9]00|950)|black|white)(?![\\w-])';
|
|
46
|
+
|
|
47
|
+
const RAW_COLOR_MESSAGE =
|
|
48
|
+
'Use semantic tokens from @burdenoff/fe-libs/shared/tokens/tokens.css (bg-*, text-*, border-*, action-*, status-*, chart-*, node-*, edge-*, canvas-*) — not raw colours.';
|
|
49
|
+
const PALETTE_CLASS_MESSAGE =
|
|
50
|
+
'Use semantic token classes (bg-bg-surface, text-text-primary, bg-status-error-bg, text-chart-3, bg-node-trigger, stroke-edge-default; scrims bg-bg-overlay; text on an accent fill text-action-primary-text) — not Tailwind palette classes.';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The `no-restricted-syntax` entries that ban raw colours and palette classes
|
|
54
|
+
* in string literals and template strings. Exported so a repo with its own
|
|
55
|
+
* standalone ESLint config can apply the same guard:
|
|
56
|
+
*
|
|
57
|
+
* 'no-restricted-syntax': ['error', ...rawColorRestrictedSyntax()]
|
|
58
|
+
*
|
|
59
|
+
* @returns {{ selector: string, message: string }[]}
|
|
60
|
+
*/
|
|
61
|
+
export function rawColorRestrictedSyntax() {
|
|
62
|
+
return [
|
|
63
|
+
{ selector: `Literal[value=/${RAW_COLOR_PATTERN}/]`, message: RAW_COLOR_MESSAGE },
|
|
64
|
+
{ selector: `TemplateElement[value.raw=/${RAW_COLOR_PATTERN}/]`, message: RAW_COLOR_MESSAGE },
|
|
65
|
+
{ selector: `Literal[value=/${PALETTE_CLASS_PATTERN}/]`, message: PALETTE_CLASS_MESSAGE },
|
|
66
|
+
{
|
|
67
|
+
selector: `TemplateElement[value.raw=/${PALETTE_CLASS_PATTERN}/]`,
|
|
68
|
+
message: PALETTE_CLASS_MESSAGE,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Test files may assert on literal colours; the guard is for shipped UI. */
|
|
74
|
+
const TEST_FILES = ['**/*.{test,spec}.{ts,tsx}', '**/__tests__/**/*.{ts,tsx}'];
|
|
75
|
+
|
|
76
|
+
const RAW_COLOR_SEVERITIES = ['error', 'warn', 'off'];
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Creates a shared ESLint configuration for Burdenoff frontend projects.
|
|
80
|
+
* @param {Object} options - Configuration options
|
|
81
|
+
* @param {string[]} [options.ignores] - Additional ignore patterns
|
|
82
|
+
* @param {Record<string, unknown>} [options.additionalRules] - Additional ESLint rules
|
|
83
|
+
* @param {'error' | 'warn' | 'off'} [options.rawColors] - Severity of the raw-colour /
|
|
84
|
+
* palette-class guard. Defaults to 'error'. 'warn' is for a repo that still carries
|
|
85
|
+
* raw-colour debt it has not swept yet; it is a visible, temporary opt-out.
|
|
86
|
+
* @returns {import('eslint').Linter.FlatConfig[]} ESLint flat config array
|
|
87
|
+
*/
|
|
88
|
+
export function createEslintConfig(options = {}) {
|
|
89
|
+
const { ignores = [], additionalRules = {}, rawColors = 'error' } = options;
|
|
90
|
+
if (!RAW_COLOR_SEVERITIES.includes(rawColors)) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`createEslintConfig: rawColors must be one of ${RAW_COLOR_SEVERITIES.join(', ')}, got ${String(rawColors)}`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const colourRule = rawColors === 'off' ? 'off' : [rawColors, ...rawColorRestrictedSyntax()];
|
|
96
|
+
|
|
97
|
+
return tseslint.config(
|
|
98
|
+
{ ignores: ['**/dist', '**/node_modules', '**/*.stories.tsx', ...ignores] },
|
|
99
|
+
{
|
|
100
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
101
|
+
files: ['**/*.{ts,tsx}'],
|
|
102
|
+
languageOptions: {
|
|
103
|
+
ecmaVersion: 2024,
|
|
104
|
+
globals: globals.browser,
|
|
105
|
+
parserOptions: {
|
|
106
|
+
ecmaFeatures: {
|
|
107
|
+
jsx: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
plugins: {
|
|
112
|
+
react,
|
|
113
|
+
'react-hooks': reactHooks,
|
|
114
|
+
},
|
|
115
|
+
rules: {
|
|
116
|
+
...react.configs.recommended.rules,
|
|
117
|
+
...react.configs['jsx-runtime'].rules,
|
|
118
|
+
...reactHooks.configs.recommended.rules,
|
|
119
|
+
'react/prop-types': 'off',
|
|
120
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
121
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
122
|
+
// UX-simplification sweep guardrails (warnings — gradual adoption).
|
|
123
|
+
// Rationale: ~/products/dev/platform/context/experience/ui-simplification/README.md
|
|
124
|
+
'no-restricted-imports': [
|
|
125
|
+
'warn',
|
|
126
|
+
{
|
|
127
|
+
paths: [
|
|
128
|
+
{
|
|
129
|
+
name: '@burdenoff/fe-libs/ui',
|
|
130
|
+
importNames: [
|
|
131
|
+
'Dialog',
|
|
132
|
+
'DialogTrigger',
|
|
133
|
+
'DialogContent',
|
|
134
|
+
'DialogHeader',
|
|
135
|
+
'DialogFooter',
|
|
136
|
+
'DialogTitle',
|
|
137
|
+
'DialogDescription',
|
|
138
|
+
'DialogClose',
|
|
139
|
+
],
|
|
140
|
+
message: 'Use ResponsiveDialog* from @burdenoff/fe-libs/ui — auto-converts to BottomSheet below md:.',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
// Semantic tokens only — no hex/rgb/hsl and no Tailwind palette class.
|
|
146
|
+
'no-restricted-syntax': colourRule,
|
|
147
|
+
...additionalRules,
|
|
148
|
+
},
|
|
149
|
+
settings: {
|
|
150
|
+
react: {
|
|
151
|
+
version: 'detect',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
// Tests keep any no-restricted-syntax the repo set itself, minus the colour guard.
|
|
157
|
+
files: TEST_FILES,
|
|
158
|
+
rules: {
|
|
159
|
+
'no-restricted-syntax': additionalRules['no-restricted-syntax'] ?? 'off',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export default createEslintConfig;
|
package/fmt/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Formatting with `bun fmt`
|
|
2
|
+
|
|
3
|
+
`bun fmt` (Bun 1.4.4+) reads the repository's existing `.prettierrc*` and has
|
|
4
|
+
`@trivago/prettier-plugin-sort-imports` built in, so the fleet keeps its
|
|
5
|
+
Prettier configs unchanged and drops the `prettier`,
|
|
6
|
+
`@trivago/prettier-plugin-sort-imports`, `eslint-plugin-prettier` and
|
|
7
|
+
`eslint-config-prettier` devDependencies.
|
|
8
|
+
|
|
9
|
+
The fleet's four styles stay as they are:
|
|
10
|
+
|
|
11
|
+
| Profile | Used by | Settings |
|
|
12
|
+
| ------- | ------------------------------ | ------------------------------------------------------------------------------------- |
|
|
13
|
+
| wide | svc, be-sdk | `printWidth: 120`, single quotes, trivago import order with `reflect-metadata` second |
|
|
14
|
+
| default | gateways, SDKs, MFEs, websites | `printWidth: 100`, single quotes, `trailingComma: es5` (fe-libs shared config) |
|
|
15
|
+
| app | app shells | Prettier defaults |
|
|
16
|
+
| plugin | vibe plugins | double quotes |
|
|
17
|
+
|
|
18
|
+
Commands (written into package.json by `boff sync --scripts`):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bun fmt # format in place
|
|
22
|
+
bun fmt --check # what sanity and CI run; exits 1 when a file would change
|
|
23
|
+
bun fmt --doctor # shows which Prettier plugins bun fmt replaces natively
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Limit what is checked with `package.json` → `"boff": { "sanity": { "formatPaths": ["src", "tests"] } }`;
|
|
27
|
+
both the scripts and the sanity `format` step then use those paths. Files
|
|
28
|
+
listed in `.prettierignore` and `.gitignore` are skipped.
|
|
29
|
+
|
|
30
|
+
When a project defines its own `fmt` script, `bun fmt` runs that script
|
|
31
|
+
instead; the sanity runner always passes `--no-script` so the built-in
|
|
32
|
+
formatter is what runs.
|
package/knip/base.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared knip configuration (@burdenoff/toolchain/knip/base).
|
|
3
|
+
*
|
|
4
|
+
* // knip.config.ts
|
|
5
|
+
* import { knipConfig } from '@burdenoff/toolchain/knip/base';
|
|
6
|
+
* export default knipConfig({ entry: ['src/index.ts'], project: ['src/**\/*.ts'] });
|
|
7
|
+
*
|
|
8
|
+
* The base ignores generated code and declares the dependencies the toolchain
|
|
9
|
+
* provides, so knip neither reports the ESLint plugins (they moved into
|
|
10
|
+
* @burdenoff/toolchain) nor generated Prisma / GraphQL output. Lists given by
|
|
11
|
+
* the repo are appended to the base lists; scalar options override them.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** The subset of knip's configuration the base touches; any other knip key passes through. */
|
|
15
|
+
export interface KnipConfigInput {
|
|
16
|
+
entry?: string[];
|
|
17
|
+
project?: string[];
|
|
18
|
+
ignore?: string[];
|
|
19
|
+
ignoreDependencies?: (string | RegExp)[];
|
|
20
|
+
ignoreBinaries?: (string | RegExp)[];
|
|
21
|
+
ignoreExportsUsedInFile?: boolean;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const KNIP_BASE = {
|
|
26
|
+
ignore: ['**/generated/**', '**/*.generated.ts', 'dist/**', 'coverage/**', 'fixtures/**'],
|
|
27
|
+
ignoreDependencies: ['@burdenoff/toolchain', 'bun-types', '@types/bun'],
|
|
28
|
+
ignoreBinaries: ['boff'],
|
|
29
|
+
ignoreExportsUsedInFile: true,
|
|
30
|
+
} as const satisfies KnipConfigInput;
|
|
31
|
+
|
|
32
|
+
export function knipConfig(overrides: KnipConfigInput = {}): KnipConfigInput {
|
|
33
|
+
return {
|
|
34
|
+
...overrides,
|
|
35
|
+
ignore: [...KNIP_BASE.ignore, ...(overrides.ignore ?? [])],
|
|
36
|
+
ignoreDependencies: [...KNIP_BASE.ignoreDependencies, ...(overrides.ignoreDependencies ?? [])],
|
|
37
|
+
ignoreBinaries: [...KNIP_BASE.ignoreBinaries, ...(overrides.ignoreBinaries ?? [])],
|
|
38
|
+
ignoreExportsUsedInFile: overrides.ignoreExportsUsedInFile ?? KNIP_BASE.ignoreExportsUsedInFile,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default knipConfig;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Shared lefthook configuration for Burdenoff repositories.
|
|
2
|
+
#
|
|
3
|
+
# Use it from a repo's lefthook.yml:
|
|
4
|
+
#
|
|
5
|
+
# extends:
|
|
6
|
+
# - node_modules/@burdenoff/toolchain/lefthook/base.yml
|
|
7
|
+
#
|
|
8
|
+
# `boff sync` also writes the pre-push block into the repo's own lefthook.yml
|
|
9
|
+
# between managed markers, so the hook works without `extends` too.
|
|
10
|
+
#
|
|
11
|
+
# pre-commit deps-guard: commits always carry registry @burdenoff/* versions,
|
|
12
|
+
# even when the working copy is in local (workspace/file) mode.
|
|
13
|
+
# pre-push the hash-stamped sanity gate; fails (never runs ungated) when no
|
|
14
|
+
# build slot frees within BOFF_BUILD_WAIT seconds.
|
|
15
|
+
# post-commit deps-restore: switches back to local mode after such a commit.
|
|
16
|
+
|
|
17
|
+
pre-commit:
|
|
18
|
+
commands:
|
|
19
|
+
deps-guard:
|
|
20
|
+
glob: '{package.json,bun.lock}'
|
|
21
|
+
run: ./node_modules/.bin/boff deps-mode guard pre-commit
|
|
22
|
+
stage_fixed: true
|
|
23
|
+
|
|
24
|
+
pre-push:
|
|
25
|
+
commands:
|
|
26
|
+
sanity:
|
|
27
|
+
run: ./node_modules/.bin/boff sanity --pre-push
|
|
28
|
+
|
|
29
|
+
post-commit:
|
|
30
|
+
commands:
|
|
31
|
+
deps-restore:
|
|
32
|
+
run: ./node_modules/.bin/boff deps-mode guard post-commit
|
package/package.json
CHANGED
|
@@ -1,6 +1,134 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/toolchain",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2026.1107.1",
|
|
4
|
+
"description": "Shared Burdenoff build toolchain: tsconfig bases, ESLint profiles and the boff CLI (sanity, gate, coverage-gate, doctor, sync).",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/algoshred/toolchain.git"
|
|
10
|
+
},
|
|
11
|
+
"packageManager": "bun@1.4.4",
|
|
12
|
+
"engines": {
|
|
13
|
+
"bun": ">=1.4.4"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"boff": "dist/cli.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"tsconfig",
|
|
24
|
+
"eslint",
|
|
25
|
+
"bunfig",
|
|
26
|
+
"lefthook",
|
|
27
|
+
"knip",
|
|
28
|
+
"fmt",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./tsconfig/*.json": "./tsconfig/*.json",
|
|
34
|
+
"./tsconfig/*": "./tsconfig/*.json",
|
|
35
|
+
"./eslint/backend": {
|
|
36
|
+
"types": "./eslint/backend.d.ts",
|
|
37
|
+
"default": "./eslint/backend.js"
|
|
38
|
+
},
|
|
39
|
+
"./eslint/gateway": {
|
|
40
|
+
"types": "./eslint/gateway.d.ts",
|
|
41
|
+
"default": "./eslint/gateway.js"
|
|
42
|
+
},
|
|
43
|
+
"./eslint/react": {
|
|
44
|
+
"types": "./eslint/react.d.ts",
|
|
45
|
+
"default": "./eslint/react.js"
|
|
46
|
+
},
|
|
47
|
+
"./eslint/node": {
|
|
48
|
+
"types": "./eslint/node.d.ts",
|
|
49
|
+
"default": "./eslint/node.js"
|
|
50
|
+
},
|
|
51
|
+
"./eslint/browser": {
|
|
52
|
+
"types": "./eslint/browser.d.ts",
|
|
53
|
+
"default": "./eslint/browser.js"
|
|
54
|
+
},
|
|
55
|
+
"./knip/base": {
|
|
56
|
+
"types": "./knip/base.ts",
|
|
57
|
+
"bun": "./knip/base.ts",
|
|
58
|
+
"default": "./dist/knip/base.js"
|
|
59
|
+
},
|
|
60
|
+
"./bunfig/release-age-excludes.json": "./bunfig/release-age-excludes.json",
|
|
61
|
+
"./bunfig/fragment.toml.tmpl": "./bunfig/fragment.toml.tmpl",
|
|
62
|
+
"./lefthook/base.yml": "./lefthook/base.yml"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "bun scripts/build.ts",
|
|
66
|
+
"type:check": "bun src/cli.ts gate -- bun check --no-pretty",
|
|
67
|
+
"format": "bun fmt",
|
|
68
|
+
"format:check": "bun fmt --check",
|
|
69
|
+
"lint": "eslint .",
|
|
70
|
+
"test": "bun test",
|
|
71
|
+
"test:coverage": "bun test --coverage --coverage-reporter=text --coverage-reporter=lcov --path-ignore-patterns='**/selftest.test.ts' && bun src/cli.ts coverage-gate",
|
|
72
|
+
"selftest": "bun test tests/selftest.test.ts --timeout=600000",
|
|
73
|
+
"sanity": "bun src/cli.ts sanity",
|
|
74
|
+
"sanity:force": "bun src/cli.ts sanity --force",
|
|
75
|
+
"sanity:test": "bun run test:coverage",
|
|
76
|
+
"gen:excludes": "bun scripts/gen-release-age-excludes.ts",
|
|
77
|
+
"audit": "bun audit --audit-level=high"
|
|
78
|
+
},
|
|
79
|
+
"boff": {
|
|
80
|
+
"type": "cli",
|
|
81
|
+
"coverage": {
|
|
82
|
+
"global": 80,
|
|
83
|
+
"diff": 80,
|
|
84
|
+
"exclude": [
|
|
85
|
+
"fixtures/**",
|
|
86
|
+
"scripts/**",
|
|
87
|
+
"knip/**"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"scripts": {
|
|
91
|
+
"unmanaged": [
|
|
92
|
+
"type:check",
|
|
93
|
+
"sanity",
|
|
94
|
+
"sanity:force"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@eslint/js": "9.39.5",
|
|
100
|
+
"eslint-plugin-eslint-comments": "3.2.0",
|
|
101
|
+
"eslint-plugin-import": "2.32.0",
|
|
102
|
+
"eslint-plugin-react": "7.37.5",
|
|
103
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
104
|
+
"eslint-plugin-security": "3.0.1",
|
|
105
|
+
"eslint-plugin-sonarjs": "4.2.2",
|
|
106
|
+
"globals": "17.3.0",
|
|
107
|
+
"typescript-eslint": "8.72.1"
|
|
108
|
+
},
|
|
109
|
+
"peerDependencies": {
|
|
110
|
+
"eslint": "^9.39.0",
|
|
111
|
+
"typescript": ">=5.9.3 <6.1.0"
|
|
112
|
+
},
|
|
113
|
+
"peerDependenciesMeta": {
|
|
114
|
+
"eslint": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"typescript": {
|
|
118
|
+
"optional": true
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@types/bun": "1.4.4",
|
|
123
|
+
"@types/chrome": "0.3.7",
|
|
124
|
+
"@types/node": "24.19.2",
|
|
125
|
+
"@types/react": "19.3.0",
|
|
126
|
+
"@types/react-dom": "19.3.0",
|
|
127
|
+
"@types/vscode": "1.144.0",
|
|
128
|
+
"eslint": "9.39.5",
|
|
129
|
+
"react": "19.3.1",
|
|
130
|
+
"react-dom": "19.3.1",
|
|
131
|
+
"typescript": "5.9.3",
|
|
132
|
+
"vite": "8.3.5"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"types": ["bun"],
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"noUncheckedIndexedAccess": true,
|
|
12
|
+
"noImplicitReturns": true,
|
|
13
|
+
"noUnusedLocals": false,
|
|
14
|
+
"noUnusedParameters": false,
|
|
15
|
+
"noEmit": false,
|
|
16
|
+
"composite": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"removeComments": true,
|
|
21
|
+
"preserveConstEnums": true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"types": ["bun"],
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"allowJs": true,
|
|
12
|
+
"noUncheckedIndexedAccess": true,
|
|
13
|
+
"noImplicitReturns": true,
|
|
14
|
+
"noUnusedLocals": false,
|
|
15
|
+
"noUnusedParameters": false,
|
|
16
|
+
"noEmit": true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"moduleDetection": "force",
|
|
9
|
+
"types": [],
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noFallthroughCasesInSwitch": true,
|
|
12
|
+
"noImplicitOverride": true,
|
|
13
|
+
"useUnknownInCatchVariables": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"allowSyntheticDefaultImports": true,
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"noEmit": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["chrome"],
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noUnusedLocals": true,
|
|
11
|
+
"noUnusedParameters": true,
|
|
12
|
+
"noEmit": false,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"sourceMap": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"types": ["bun"],
|
|
8
|
+
"allowImportingTsExtensions": true,
|
|
9
|
+
"noUncheckedIndexedAccess": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noImplicitThis": true,
|
|
12
|
+
"noUnusedLocals": true,
|
|
13
|
+
"noUnusedParameters": true,
|
|
14
|
+
"noEmit": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2023"],
|
|
7
|
+
"types": ["bun"],
|
|
8
|
+
"noUncheckedIndexedAccess": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noUnusedLocals": true,
|
|
11
|
+
"noUnusedParameters": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"isolatedModules": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["vite/client"],
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"useDefineForClassFields": true,
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"noUnusedLocals": true,
|
|
12
|
+
"noUnusedParameters": true,
|
|
13
|
+
"noUncheckedSideEffectImports": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"isolatedModules": true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["vite/client"],
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"customConditions": ["types"],
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"noUnusedLocals": true,
|
|
12
|
+
"noUnusedParameters": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"isolatedModules": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"module": "Node16",
|
|
8
|
+
"moduleResolution": "Node16",
|
|
9
|
+
"moduleDetection": "auto",
|
|
10
|
+
"types": ["node", "vscode"],
|
|
11
|
+
"noImplicitReturns": true,
|
|
12
|
+
"noEmit": false,
|
|
13
|
+
"sourceMap": true
|
|
14
|
+
}
|
|
15
|
+
}
|