Skip to content
Open
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
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: npm --prefix client install

- name: Lint server
run: npx eslint server --ext .js || true
run: npx eslint server/

- name: Build client
run: npm run build:client
Expand All @@ -42,5 +42,18 @@ jobs:
node -e "import('./server/config.js').then(c => { const v = c.validateEnv(); if (v.errors.length) { console.error(v.errors); process.exit(1); } console.log('config OK'); })"
echo "✅ Backend imports and mock AI provider work."

- name: Smoke-test health endpoint
run: |
node server/index.js &
SERVER_PID=$!
sleep 3
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4000/api/health)
kill $SERVER_PID 2>/dev/null || true
if [ "$STATUS" != "200" ]; then
echo "❌ Health endpoint returned HTTP $STATUS"
exit 1
fi
echo "✅ Health endpoint returned HTTP 200"
Comment thread
Evank253 marked this conversation as resolved.

- name: Dependency audit (non-blocking)
run: npm audit --omit=dev --audit-level=high || true
74 changes: 74 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import js from '@eslint/js';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';

export default [
js.configs.recommended,
{
files: ['server/**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
process: 'readonly',
console: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
Comment thread
Evank253 marked this conversation as resolved.
clearInterval: 'readonly',
URL: 'readonly',
fetch: 'readonly',
FormData: 'readonly',
Headers: 'readonly',
Response: 'readonly',
Request: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
},
},
{
files: ['client/src/**/*.{js,jsx}'],
plugins: {
react: reactPlugin,
'react-hooks': reactHooksPlugin,
},
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parserOptions: {
ecmaFeatures: { jsx: true },
},
globals: {
window: 'readonly',
document: 'readonly',
localStorage: 'readonly',
console: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
fetch: 'readonly',
FormData: 'readonly',
FileReader: 'readonly',
Blob: 'readonly',
},
},
settings: {
react: { version: 'detect' },
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
},
},
{
ignores: ['node_modules/', 'client/node_modules/', 'client/dist/', 'workspace/'],
},
];
Loading
Loading