Skip to content

Commit c454e59

Browse files
committed
Initialize monorepo with core, utils, react packages and playground app
1 parent 066c20a commit c454e59

54 files changed

Lines changed: 1600 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
build/
4+
coverage/
5+
.pnpm-store/
6+
.eslintcache

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es2022": true,
6+
"node": true,
7+
"jest": true
8+
},
9+
"parser": "@typescript-eslint/parser",
10+
"parserOptions": {
11+
"ecmaVersion": "latest",
12+
"sourceType": "module",
13+
"project": [
14+
"./tsconfig.base.json",
15+
"./packages/*/tsconfig.json",
16+
"./apps/*/tsconfig.json"
17+
],
18+
"tsconfigRootDir": "./"
19+
},
20+
"plugins": [
21+
"@typescript-eslint",
22+
"react",
23+
"react-hooks",
24+
"jsx-a11y"
25+
],
26+
"extends": [
27+
"eslint:recommended",
28+
"plugin:@typescript-eslint/recommended",
29+
"plugin:react/recommended",
30+
"plugin:react-hooks/recommended",
31+
"plugin:jsx-a11y/recommended"
32+
],
33+
"settings": {
34+
"react": {
35+
"version": "detect"
36+
}
37+
},
38+
"rules": {
39+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
40+
"react/react-in-jsx-scope": "off"
41+
}
42+
}

.github/BRANCH_PROTECTION.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Branch Protection Policy
2+
3+
To satisfy the library constitution's review and quality requirements, protect the following branches:
4+
5+
- `main`
6+
- `release/*`
7+
8+
## Required Status Checks
9+
10+
- `CI (Node 18.x)`
11+
- `CI (Node 20.x)`
12+
13+
All checks must succeed before merge. Pull requests must be rebased (linear history enforced).
14+
15+
## Required Reviews
16+
17+
- Minimum of **two maintainer approvals**
18+
- Reviewers must be members of `@x-filter/maintainers` or the relevant package team listed in `CODEOWNERS`
19+
20+
## Additional Rules
21+
22+
- Dismiss stale reviews on new commits
23+
- Require signed commits (optional, recommended)
24+
- Block merges on unresolved conversations
25+
- Enforce branch up-to-date requirement prior to merging
26+
- Run `pnpm security` locally (wraps `pnpm audit`) before requesting review for dependency updates
27+
28+
Document any exceptions in CHANGELOG along with mitigation steps.

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Require review from maintainers for every change
2+
* @x-filter/maintainers
3+
4+
# Feature packages
5+
packages/core/ @x-filter/core-maintainers
6+
packages/utils/ @x-filter/core-maintainers
7+
packages/react/ @x-filter/react-maintainers
8+
apps/playground/ @x-filter/react-maintainers

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
quality:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
node-version: [18.x, 20.x]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up pnpm
24+
uses: pnpm/action-setup@v3
25+
with:
26+
version: 9
27+
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Lint
38+
run: pnpm lint
39+
40+
- name: Format check
41+
run: pnpm format
42+
43+
- name: Typecheck
44+
run: pnpm typecheck
45+
46+
- name: Detect circular dependencies
47+
run: pnpm dlx madge --circular --extensions ts,tsx packages apps
48+
49+
- name: Test
50+
run: pnpm test -- --runInBand --ci
51+
52+
- name: Build
53+
run: pnpm build
54+
55+
- name: Upload coverage report
56+
uses: actions/upload-artifact@v4
57+
if: always()
58+
with:
59+
name: coverage-${{ matrix.node-version }}
60+
path: coverage
61+
62+
- name: Publish coverage summary
63+
if: always()
64+
run: |
65+
if [ -f coverage/lcov.info ]; then
66+
pnpm dlx coverage-summary-cli coverage/lcov.info >> $GITHUB_STEP_SUMMARY
67+
else
68+
echo "Coverage report missing" >> $GITHUB_STEP_SUMMARY
69+
fi
70+
71+
- name: Upload Playwright/visual regression artifacts (if any)
72+
uses: actions/upload-artifact@v4
73+
if: failure()
74+
with:
75+
name: visual-regression-artifacts
76+
path: apps/playground/test-results
77+
if-no-files-found: ignore

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
.codex/
5+
6+
# Build outputs
7+
build/
8+
dist/
9+
coverage/
10+
apps/*/dist/
11+
packages/*/dist/
12+
13+
# Logs & diagnostics
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
pnpm-debug.log*
18+
*.log
19+
*.tmp
20+
*.swp
21+
22+
# Environment files
23+
.env
24+
.env.local
25+
.env.*
26+
27+
# Editors & OS
28+
.vscode/
29+
.idea/
30+
.DS_Store
31+
Thumbs.db
32+
33+
# TypeScript
34+
*.tsbuildinfo
35+
36+
# Testing artifacts
37+
apps/playground/test-results/
38+
39+
# Husky internal folder
40+
.husky/_/
41+
42+
# Package manager lockfiles (pnpm is canonical)
43+
package-lock.json
44+
yarn.lock
45+
46+
# Misc
47+
*.orig

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm format
5+
pnpm lint

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm typecheck
5+
pnpm test

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
build/
4+
coverage/
5+
.pnpm-store/
6+
package-lock.json
7+
yarn.lock

0 commit comments

Comments
 (0)