Merge pull request 'feature/forgejo-actions' (#13) from feature/forgejo-actions into main
All checks were successful
/ npm-build (push) Successful in 20s

Reviewed-on: #13
This commit is contained in:
Manuel Friedli 2026-03-07 23:53:08 +01:00
commit 9896213da9
27 changed files with 1071 additions and 651 deletions

View file

@ -1,16 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: install
image: node:22-alpine
commands:
- npm install
- npm run lint
- npm run build
when:
branch:
include:
- main
- feature/*

View file

@ -0,0 +1,15 @@
on: [push]
jobs:
npm-build:
runs-on: docker
container:
image: node:25-trixie
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run npm install
run: npm install
- name: Run npm build
run: npm run build
- name: Run npm lint
run: npm run lint

View file

@ -8,12 +8,8 @@ import {
} from "./state/action.ts"; } from "./state/action.ts";
import styles from "./input-form.module.scss"; import styles from "./input-form.module.scss";
import "./input-form.scss"; import "./input-form.scss";
import {State} from "@/app/state/state.ts"; import {State} from "./state/state.ts";
import { import {ValidatingInputNumberField, ValidatingInputRegExpField, ValidatorFunction} from "./validating-input-field.tsx";
ValidatingInputNumberField,
ValidatingInputRegExpField,
ValidatorFunction
} from "@/app/validating-input-field.tsx";
export default function InputForm({state, dispatch}: { export default function InputForm({state, dispatch}: {
state: State, state: State,
@ -39,7 +35,7 @@ export default function InputForm({state, dispatch}: {
dispatch(actionLoadingFailed(reason)); dispatch(actionLoadingFailed(reason));
}); });
}; };
const validateSizeInput: ValidatorFunction<string, number> = value => { const validateSizeInput: ValidatorFunction<string, number> = (value: string) => {
const numberValue = Number(value); const numberValue = Number(value);
if (isNaN(numberValue) || "" === value || (Math.floor(numberValue) !== numberValue)) { if (isNaN(numberValue) || "" === value || (Math.floor(numberValue) !== numberValue)) {
return { return {

View file

@ -4,17 +4,15 @@ import "./globals.scss";
export const metadata: Metadata = { export const metadata: Metadata = {
title: "A-Maze-R! Create your own Maze!", title: "A-Maze-R! Create your own Maze!",
description: "A Maze Generator by fritteli", description: "A Maze Generator by fritteli",
icons: "./favicon.ico" icons: "/favicon.ico"
}; };
export default function RootLayout({children}: Readonly<{ export default function RootLayout({children}: {
children: React.ReactNode; children: React.ReactNode;
}>) { }) {
return ( return (
<html lang="en"> <html lang="en">
<body> <body>{children}</body>
{children}
</body>
</html> </html>
); );
} }

View file

@ -1,8 +1,8 @@
import Cell from "./cell.tsx"; import Cell from "./cell.tsx";
import styles from "./maze.module.css"; import styles from "./maze.module.css";
import {State} from "@/app/state/state.ts"; import {State} from "./state/state.ts";
import {ActionDispatch, JSX} from "react"; import {ActionDispatch, JSX} from "react";
import {Action} from "@/app/state/action.ts"; import {Action} from "./state/action.ts";
export default function Maze({state, dispatch}: export default function Maze({state, dispatch}:
{ {

View file

@ -1,6 +1,6 @@
import {Action, actionClosedMessageBanner} from "./state/action.ts"; import {Action, actionClosedMessageBanner} from "./state/action.ts";
import styles from "./message-banner.module.css"; import styles from "./message-banner.module.css";
import {State} from "@/app/state/state.ts"; import {State} from "./state/state.ts";
import {ActionDispatch} from "react"; import {ActionDispatch} from "react";
export default function MessageBanner({state, dispatch}: export default function MessageBanner({state, dispatch}:

View file

@ -9,7 +9,7 @@ import {
ID_ACTION_STARTED_LOADING, ID_ACTION_STARTED_LOADING,
ID_ACTION_TOGGLED_SHOW_SOLUTION ID_ACTION_TOGGLED_SHOW_SOLUTION
} from "./action.ts"; } from "./action.ts";
import Maze from "@/app/model/maze.ts"; import Maze from "../model/maze.ts";
export default function reduce(state: State, action: Action): State { export default function reduce(state: State, action: Action): State {
switch (action.type) { switch (action.type) {

View file

@ -1,16 +1,16 @@
import { dirname } from "path"; import { defineConfig, globalIgnores } from 'eslint/config'
import { fileURLToPath } from "url"; import nextVitals from 'eslint-config-next/core-web-vitals'
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url); const eslintConfig = defineConfig([
const __dirname = dirname(__filename); ...nextVitals,
// Override default ignores of eslint-config-next.
const compat = new FlatCompat({ globalIgnores([
baseDirectory: __dirname, // Default ignores of eslint-config-next:
}); '.next/**',
'out/**',
const eslintConfig = [ 'build/**',
...compat.extends("next/core-web-vitals", "next/typescript"), 'next-env.d.ts',
]; ]),
])
export default eslintConfig; export default eslintConfig;

1612
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,21 +6,22 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "eslint",
"lint:fix": "eslint --fix"
}, },
"dependencies": { "dependencies": {
"next": "^16.1.4", "next": "16.1.6",
"react": "^19.2.3", "react": "19.2.4",
"react-dom": "^19.2.3" "react-dom": "19.2.4"
}, },
"devDependencies": { "devDependencies": {
"@eslint/eslintrc": "^3", "@eslint/eslintrc": "3.3.5",
"@types/node": "^20", "@types/node": "25.3.5",
"@types/react": "^19", "@types/react": "19.2.14",
"@types/react-dom": "^19", "@types/react-dom": "19.2.3",
"eslint": "^9", "eslint": "9.39.4",
"eslint-config-next": "^16.1.4", "eslint-config-next": "16.1.6",
"sass": "^1.85.1", "sass": "1.97.3",
"typescript": "^5" "typescript": "5.9.3"
} }
} }

View file

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

Before After
Before After