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
File renamed without changes.
66 changes: 66 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: main
pull_request:
branches: ["*"]

jobs:
check:
runs-on: ubuntu-latest

env:
PORT: 3306
DATABASE_URL: mysql://root:root@localhost:3306/db

steps:
# Checkout repo
- uses: actions/checkout@v4

# Setup Node with caching
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

# Install dependencies once
- run: npm ci

# Generate TS types for Prisma
- run: npm run prisma:generate --workspace server

# -----------------------------
# Format check
# -----------------------------
- name: Format check
run: npm run format:check

# -----------------------------
# Lint check
# -----------------------------
- name: Lint (all)
run: npm run lint:check

# -----------------------------
# Build
# -----------------------------
- name: Build client
run: npm run build --workspace client

- name: Build server
run: npm run build --workspace server

# -----------------------------
# Start MySQL + Test server
# -----------------------------
- name: Start MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e "CREATE DATABASE IF NOT EXISTS db;" -uroot -proot

- run: npm run prisma:migrate-dev --workspace server
- run: npm run prisma:seed --workspace server

- name: Test server
run: npm test --workspace server
48 changes: 0 additions & 48 deletions .github/workflows/client.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/server.yml

This file was deleted.

File renamed without changes.
9 changes: 0 additions & 9 deletions client/cypress/tsconfig.json

This file was deleted.

57 changes: 26 additions & 31 deletions client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import unusedImports from "eslint-plugin-unused-imports";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import rootConfig from "../eslint.config.mjs";

// Override the tsconfigRootDir and project to point to this directory
const configWithClientPaths = rootConfig.map((config) => {
if (config.languageOptions?.parserOptions?.tsconfigRootDir) {
return {
...config,
languageOptions: {
...config.languageOptions,
parserOptions: {
...config.languageOptions.parserOptions,
tsconfigRootDir: import.meta.dirname,
project: "./tsconfig.json",
},
},
};
}
return config;
});

export default tseslint.config(
{ ignores: ["dist/"] },
eslint.configs.recommended,
tseslint.configs.recommended,
...configWithClientPaths,
react.configs.flat.recommended,
reactHooks.configs["recommended-latest"],
{
Expand All @@ -18,37 +33,17 @@ export default tseslint.config(
version: "detect",
},
},
},
//For now, allow explicit anys
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off", // Not needed with new JSX transform
"react/jsx-uses-react": "off", // Not needed with new JSX transform
},
},
// eslint-plugin-unused-imports allows linter to fix unused imports
// It works by splitting the normal "unused-imports" rule into tw

// For now allow explicit anys
// TODO: clean up explict anys and remove this exception
{
plugins: {
"unused-imports": unusedImports,
},
rules: {
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",

// Allow unused vars that start with underscore
// See https://typescript-eslint.io/rules/no-unused-vars/
"unused-imports/no-unused-vars": [
"warn",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-explicit-any": "off",
},
},
);
2 changes: 1 addition & 1 deletion client/multi-reporter-config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"reporterEnabled": "cypress-parallel/json-stream.reporter.js, cypress-parallel/simple-spec.reporter.js"
}
}
33 changes: 7 additions & 26 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
{
"name": "doenet_tools",
"name": "@doenet-tools/client",
"version": "1.0.1",
"type": "module",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=production vite",
"build": "tsc && vite build",
"test": "cypress open",
"test:all": "cypress run -b 'chrome' --config video=false --headless",
"test:app": "cypress run -b 'electron' --config video=false,excludeSpecPattern=cypress/e2e/DoenetML/** --headless",
"test:parallel": "cypress-parallel -s test:all -t 4 -d cypress/e2e/DoenetML",
"format": "prettier . --write",
"lint": "eslint --fix"
"dev": "cross-env NODE_ENV=production vite",
"lint": "eslint --fix",
"lint:check": "eslint"
},
"dependencies": {
"@chakra-ui/icons": "^2.2.4",
"@chakra-ui/react": "^2.10.9",
"@doenet/assignment-viewer": "^0.1.0-alpha9",
"@doenet/doenetml-iframe": "^0.7.0-beta10",
"@doenet/v06-to-v07": "^0.7.0-beta10",
"@doenet-tools/shared": "*",
"@fontsource/jost": "^5.2.6",
"axios": "^1.11.0",
"better-react-mathjax": "^2.1.0",
"browser-image-resizer": "^2.4.1",
"cssesc": "^3.0.0",
"export-to-csv": "^1.4.0",
"ipfs-only-hash": "^4.0.0",
"js-cookie": "^3.0.5",
"luxon": "^3.7.1",
"math-expressions": "^2.0.0-alpha76",
Expand All @@ -46,14 +43,12 @@
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@eslint/js": "^9.32.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/react": "^16.3.0",
"@types/cssesc": "^3.0.2",
"@types/luxon": "^3.7.1",
"@types/papaparse": "^5.3.16",
"@types/react": "19.1",
"@types/react-dom": "19.1",
Expand All @@ -62,31 +57,17 @@
"@web/test-runner": "^0.20.2",
"cross-env": "^10.0.0",
"esbuild": "^0.25.8",
"eslint": "^9.32.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^16.3.0",
"prettier": "^3.6.2",
"rollup": "^4.46.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.33.0",
"vite": "^7.0.6",
"vite-plugin-mpa": "^1.2.0",
"vite-plugin-static-copy": "^3.1.1"
},
"optionalDependencies": {
"@esbuild/linux-arm64": "^0.25.8",
"cypress": "^14.5.3",
"cypress-file-upload": "^5.0.8",
"cypress-iframe": "^1.0.1",
"cypress-parallel": "^0.15.0",
"cypress-plugin-tab": "^1.0.5",
"cypress-wait-until": "^3.0.2",
"eslint-plugin-cypress": "^5.1.0"
"@esbuild/linux-arm64": "^0.25.8"
}
}
1 change: 0 additions & 1 deletion client/src/RouterLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { useNavigate } from "react-router";
import styled from "styled-components";

Expand Down
1 change: 0 additions & 1 deletion client/src/drawerTabs/ClassificationInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import {
Text,
Flex,
Expand Down
1 change: 0 additions & 1 deletion client/src/drawerTabs/GeneralContentInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import {
Box,
Heading,
Expand Down
1 change: 0 additions & 1 deletion client/src/drawerTabs/RemixSources.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import {
Flex,
Hide,
Expand Down
Loading