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
27 changes: 25 additions & 2 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,31 @@ on:
- 'backend/**'
- 'frontend/**'
- '.github/workflows/**'

jobs:
changes:
runs-on: ubuntu-latest
outputs:
frontend: ${{ steps.changed-files.outputs.frontend_any_changed }}
backend: ${{ steps.changed-files.outputs.backend_any_changed }}
workflows: ${{ steps.changed-files.outputs.workflows_any_changed }}
steps:
- uses: actions/checkout@v6
- uses: tj-actions/changed-files@v46
id: changed-files
with:
files_yaml: |
frontend:
- 'frontend/**'
backend:
- 'backend/**'
workflows:
- '.github/workflows/**'

lint-build-frontend:
needs: changes
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.changed_files != '0' && (contains(github.event.pull_request.changed_files, 'frontend/') || contains(github.event.pull_request.changed_files, '.github/workflows/')) }}
if: ${{ needs.changes.outputs.frontend == 'true' || needs.changes.outputs.workflows == 'true' }}
defaults:
run:
working-directory: './frontend'
Expand All @@ -25,9 +46,11 @@ jobs:
- run: npm install
- run: npm run lint
- run: npm run build

lint-build-test-backend:
needs: changes
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.changed_files != '0' && (contains(github.event.pull_request.changed_files, 'backend/') || contains(github.event.pull_request.changed_files, '.github/workflows/')) }}
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.workflows == 'true' }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
Expand Down
2 changes: 2 additions & 0 deletions backend/src/MethodConf.Cms/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
},
"Global": {
"TimeOut": "3.00:00:00",
"DisableElectionForSingleServer": true,
"DistributedLockingMechanism": "SqliteDistributedLockingMechanism",
"Smtp": {
"From": "Method Conf <website@email.sgf.dev>",
"Host": "localhost",
Expand Down
7 changes: 0 additions & 7 deletions frontend/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
import nextTypeScript from 'eslint-config-next/typescript';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

const eslintConfig = [
{
ignores: ['src/data/umbraco/*.d.ts'],
},
...nextCoreWebVitals,
...nextTypeScript,
{
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
},
},
eslintPluginPrettierRecommended,
];

export default eslintConfig;
19 changes: 0 additions & 19 deletions frontend/next.config.mjs

This file was deleted.

28 changes: 28 additions & 0 deletions frontend/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { NextConfig } from 'next';

const umbracoBaseUrl = process.env.NEXT_PUBLIC_UMBRACO_BASE_URL;

if (!umbracoBaseUrl) {
throw new Error('NEXT_PUBLIC_UMBRACO_BASE_URL is required');
}

const url = new URL(umbracoBaseUrl);

const nextConfig: NextConfig = {
output: 'standalone',
trailingSlash: true,
images: {
remotePatterns: [
{
protocol: url.protocol.replace(':', '') as 'http' | 'https',
hostname: url.hostname,
port: url.port,
pathname: '/**',
},
],
qualities: [75, 100],
},
productionBrowserSourceMaps: true,
};

export default nextConfig;
Loading
Loading