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
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'monthly'
target-branch: 'master'
interval: "monthly"
target-branch: "master"
versioning-strategy: increase-if-necessary
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "direct"
commit-message:
prefix: fix
prefix-development: chore
include: scope
include: scope
39 changes: 0 additions & 39 deletions .github/workflows/pull-request.yml

This file was deleted.

44 changes: 22 additions & 22 deletions .github/workflows/deploy.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy to GitHub Pages
name: Release

on:
push:
branches:
- main
- release

workflow_dispatch:

Expand All @@ -22,18 +22,14 @@ jobs:
build:
runs-on: ubuntu-latest

env:
REACT_APP_GITHUB_TOKEN: ${{ secrets.REACT_APP_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}

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

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: 20
cache: npm

- name: Install dependencies
Expand All @@ -42,22 +38,26 @@ jobs:
- name: Build project
run: npx --no-install npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build

- name: Semantic release
run: npx semantic-release

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
release:
runs-on: ubuntu-latest
needs: build

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Semantic release
run: npm run release
27 changes: 27 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate
on:
pull_request:
branches:
- develop
- release
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: lint
run: npm run lint

- name: Build project
run: npm run build
27 changes: 21 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,38 @@
# dependencies
/node_modules
/.pnp
.pnp.js
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

.env
# typescript
*.tsbuildinfo
11 changes: 10 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# dependencies
node_modules
lib

# Builds
dist
build
out
.next

# CI/CD
.husky
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"useTabs": false,
"singleQuote": false,
"printWidth": 80,
"endOfLine": "crlf"
"endOfLine": "auto"
}
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: Debug Server-Side",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start"],
"port": 9229,
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/.next/**/*.js"],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}"
},
{
"name": "Next.js: Debug Client-Side",
"type": "msedge",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"/_next/*": "${workspaceFolder}/.next/*"
}
}
]
}
1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

29 changes: 29 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { RuleConfigSeverity, UserConfig } from "@commitlint/types";

const configuration: UserConfig = {
extends: ["@commitlint/config-conventional"],
formatter: "@commitlint/format",
rules: {
"type-enum": [
RuleConfigSeverity.Error,
"always",
[
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"chore",
"break",
],
],
},
ignores: [(message) => message.startsWith("chore(release):")],
};

export default configuration;
71 changes: 71 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import globals from "globals";
import { dirname } from "path";
import tseslint from "typescript-eslint";
import { fileURLToPath } from "url";

import { FlatCompat } from "@eslint/eslintrc";
import pluginJs from "@eslint/js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
{ files: ["*.{js,mjs,cjs,ts}"] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
pluginReact.configs.flat.recommended,
pluginReact.configs.flat["jsx-runtime"],
{
files: ["**/*.{ts,tsx,js,jsx,mjs,cjs}"],
ignores: [
"node_modules/**/*",
"public/**/*",
"build/**/*",
"dist/**/*",
".next/**/*",
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": pluginReactHooks,
},
rules: {
...pluginReactHooks.configs.recommended.rules,
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-expressions": [
"error",
{ allowShortCircuit: true, allowTernary: true },
],
"no-empty-function": "off",
"react/boolean-prop-naming": "error",
"react/button-has-type": "error",
"react/display-name": "error",
"react/hook-use-state": "warn",
"react/jsx-boolean-value": "warn",
"react/jsx-handler-names": "warn",
"react/jsx-no-bind": "error",
"react/jsx-pascal-case": "error",
"react/jsx-sort-props": "warn",
"react/jsx-uses-react": "error",
"react/no-children-prop": "error",
"react/no-danger-with-children": "error",
"react/no-multi-comp": "warn",
"react/prefer-stateless-function": "error",
"react/prop-types": "error",
},
},
];

export default eslintConfig;
19 changes: 0 additions & 19 deletions eslint.config.mjs

This file was deleted.

Loading