Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
"ecmaVersion": 2020,
"sourceType": "module"
},
"ignorePatterns": [
"tests/**/*",
"**/*.test.ts",
"**/*.test.tsx",
"**/test-mocks/**/*",
"**/dist/**/*",
"**/node_modules/**/*",
"**/coverage/**/*",
"**/*.config.js",
"**/*.config.ts"
],
"rules": {
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/explicit-function-return-type": "off"
Expand All @@ -15,7 +26,10 @@
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }]
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
]
}
},
{
Expand Down
32 changes: 32 additions & 0 deletions .github/pre-commit-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Pre-commit hook for CodeLink
# This script runs linting, type checking, and formatting checks before allowing commits
#
# To install this hook, run:
# cp .github/pre-commit-hook.sh .git/hooks/pre-commit
# chmod +x .git/hooks/pre-commit

set -e

echo "🔍 Running pre-commit checks..."
echo ""

# Run ESLint
echo "📝 Running ESLint..."
npm run lint
echo "✅ ESLint passed"
echo ""

# Run TypeScript checks
echo "🔧 Running TypeScript checks..."
npm run typecheck
echo "✅ TypeScript checks passed"
echo ""

# Check code formatting
echo "💅 Checking code formatting..."
npm run format:check
echo "✅ Code formatting is correct"
echo ""

echo "✨ All pre-commit checks passed! Proceeding with commit..."
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Lint and Type Check

on:
push:
branches:
- '**'
pull_request:
branches:
- main

jobs:
lint:
name: Lint and Type Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint
continue-on-error: false

- name: Check code formatting
run: npm run format:check
continue-on-error: false

- name: TypeScript check - Protocol
run: |
cd packages/protocol
npx tsc --noEmit
continue-on-error: false

- name: TypeScript check - Relay Server
run: |
cd packages/relay-server
npx tsc --noEmit
continue-on-error: false

- name: TypeScript check - VSCode Extension
run: |
cd packages/vscode-extension
npx tsc --noEmit
continue-on-error: false
32 changes: 31 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,35 @@ dist/
.DS_Store
.vscode-test/
*.vsix
.vscode
.kiro
.vscode

# Test directory (centralized testing infrastructure)
tests/
coverage/

docs/
MANUAL_TESTING_EDITOR_ADAPTERS.md
QUICK_START_TESTING.md

# ANDORID TESTING MANUALS
ANDROID_TESTING_GUIDE.md
ANDROID_TESTING_NOTES.md
ANDROID_TESTING_VERIFICATION.md
QUICK_START_ANDROID_TESTING.md
README_ANDROID_TESTING.md

# IOS TESING MANUAL
IOS_TESTING_GUIDE.md
IOS_TESTING_VERIFICATION.md
QUICK_START_IOS_TESTING.md
PROJECT_ANALYSIS.md
TESTING_SPEC_SUMMARY.md
CI_CD_SETUP.md
COVERAGE_VERIFICATION.md
STITCH_UI_DESIGN_PROMPT.md
QUICK_REFERENCE.md
CI_CD_IMPROVEMENTS_SUMMARY.md

# DESIGN FILES
design/
20 changes: 20 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Test directories and files
tests/
**/*.test.ts
**/*.test.tsx
**/test-mocks/

# Build outputs
dist/
build/
coverage/

# Dependencies
node_modules/

# Configuration files
*.config.js
*.config.ts

# Generated files
*.d.ts
Loading
Loading