Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
037f4b6
Optimize images
nikoshell Jun 30, 2026
edb5177
Merge branch 'ep2026' into ep2026-lint-staged
nikoshell Jun 30, 2026
ba89780
Fix logo
nikoshell Jun 30, 2026
b52e78f
Merge remote-tracking branch 'refs/remotes/origin/ep2026-lint-staged'…
nikoshell Jun 30, 2026
7a14b71
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 30, 2026
15c3b70
Fix logo
nikoshell Jun 30, 2026
3fa7089
Fix logo
nikoshell Jun 30, 2026
5c8dc65
Fix logo sizes
nikoshell Jun 30, 2026
6e94bbc
Fix svg config
nikoshell Jun 30, 2026
06a0cbb
Optimize images
nikoshell Jun 30, 2026
234576c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 30, 2026
88f1ba4
Fix linter
nikoshell Jun 30, 2026
485366d
Fix linter
nikoshell Jun 30, 2026
3ce3cfc
Merge remote-tracking branch 'refs/remotes/origin/ep2026-lint-staged'…
nikoshell Jun 30, 2026
582cb9f
Optimize images
nikoshell Jun 30, 2026
1d915bb
Fix logo
nikoshell Jun 30, 2026
877f46e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 30, 2026
1237683
Fix logo
nikoshell Jun 30, 2026
e1841fc
Fix logo
nikoshell Jun 30, 2026
e3c7c75
Fix logo sizes
nikoshell Jun 30, 2026
37b566c
Fix svg config
nikoshell Jun 30, 2026
c40fc02
Optimize images
nikoshell Jun 30, 2026
436ae61
Fix linter
nikoshell Jun 30, 2026
7b85c68
Fix linter
nikoshell Jun 30, 2026
a4875bb
Fix Layout.astro and disable exactOptionalPropertyTypes
nikoshell Jun 30, 2026
524acd1
Merge branch 'ep2026' into ep2026-lint-staged
nikoshell Jun 30, 2026
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
6 changes: 6 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
- name: Install dependencies
run: make install

- name: Optimize SVGs
run: pnpm exec svgo --config svgo.config.mjs -r .

- name: Optimize PNGs
run: pnpm exec oxipng -r . --strip safe

- name: Set up SSH key
uses: webfactory/ssh-agent@v0.9.1
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
- name: Install dependencies
run: make install

- name: Optimize SVGs
run: pnpm exec svgo --config svgo.config.mjs -r .

- name: Optimize PNGs
run: pnpm exec oxipng -r . --strip safe

- name: Set up SSH key
uses: webfactory/ssh-agent@v0.9.1
with:
Expand Down
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Run Python pre-commit hooks (if installed)
pre-commit run --hook-stage commit 2>/dev/null || true

# Run lint-staged (Husky + image/JS/TS/formatting checks)
npx lint-staged

# Run Astro type checking (local only, not in CI)
pnpm astro check
43 changes: 25 additions & 18 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,38 @@ console.log(
import fs from "fs";
import p from "path";

function syncContentImages() {
function syncDir(srcDir, destDir) {
function syncKeynoterImages() {
const srcDir = "src/content/keynoters";
const destDir = "public/content/keynoters";

function sync() {
if (!fs.existsSync(srcDir)) return;
fs.mkdirSync(destDir, { recursive: true });
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
for (const entry of entries) {
const srcPath = p.join(srcDir, entry.name);
const destPath = p.join(destDir, entry.name);
if (entry.isDirectory()) {
syncDir(srcPath, destPath);
} else if (
entry.isFile() &&
/\.(jpg|jpeg|png|webp|gif|svg)$/i.test(entry.name)
) {
fs.mkdirSync(p.dirname(destPath), { recursive: true });
fs.cpSync(srcPath, destPath, { force: true });
if (!entry.isFile()) continue;
if (!/\.(jpg|jpeg|png|webp)$/i.test(entry.name)) continue;
fs.cpSync(p.join(srcDir, entry.name), p.join(destDir, entry.name), {
force: true,
});
}
}

function cleanStale() {
if (!fs.existsSync(destDir)) return;
for (const entry of fs.readdirSync(destDir, { withFileTypes: true })) {
if (!entry.isFile()) continue;
if (!fs.existsSync(p.join(srcDir, entry.name))) {
fs.unlinkSync(p.join(destDir, entry.name));
}
}
}

return {
name: "sync-content-images",
name: "sync-keynoter-images",
buildStart() {
console.log(
"\x1b[35m[EP]\x1b[0m Syncing images from src/content/ to public/content/..."
);
syncDir("src/content", "public/content");
sync();
cleanStale();
},
};
}
Expand Down Expand Up @@ -110,6 +116,7 @@ export default defineConfig({
"@utils": path.resolve("./src/utils"),
"@data": path.resolve("./src/data"),
"@components": path.resolve("./src/components"),
"@content": path.resolve("./src/content"),
"@stores": path.resolve("./src/stores"),
"@sections": path.resolve("./src/components/sections"),
"@layouts": path.resolve("./src/layouts"),
Expand All @@ -121,7 +128,7 @@ export default defineConfig({
},
},

plugins: [tailwindcss(), syncContentImages()],
plugins: [tailwindcss(), syncKeynoterImages()],
},
markdown: {
remarkPlugins: [
Expand Down
76 changes: 76 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import astroPlugin from "eslint-plugin-astro";
import sveltePlugin from "eslint-plugin-svelte";

export default [
// Base recommended rules
js.configs.recommended,
...tseslint.configs.recommended,
...astroPlugin.configs.recommended,
...sveltePlugin.configs["flat/recommended"],

// Global overrides for this codebase
{
rules: {
"no-undef": "off",
"no-var": "warn",
"no-empty": "warn",
"no-useless-escape": "warn",
"no-useless-assignment": "warn",
// Warnings for issues that don't break functionality
"no-redeclare": "warn",
"prefer-const": "warn",
"preserve-caught-error": "warn",

// The codebase uses `any` extensively for dynamic API data
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-object-type": "warn",

// Allow common patterns in this codebase
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/ban-ts-comment": "off",

// Astro-specific: CSS-defined vars may not be used in JS
"astro/no-unused-define-vars-in-style": "off",

// Unused vars: warn instead of error, allow `_` prefix
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
},
},

// Astro-specific
{
files: ["**/*.astro"],
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
},
},

// Svelte-specific
{
files: ["**/*.svelte"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
rules: {
// Svelte each blocks without keys — warn instead of error
"svelte/require-each-key": "warn",
},
},

// Ignored directories
{
ignores: ["dist/", ".astro/", "node_modules/"],
},
];
29 changes: 27 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"build": "astro check && astro build && pnpm pagefind",
"preview": "astro preview",
"astro": "astro",
"format": "prettier --write --plugin=prettier-plugin-astro ."
"format": "prettier --write --plugin=prettier-plugin-astro .",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"prepare": "husky"
},
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.10",
Expand Down Expand Up @@ -43,13 +46,35 @@
"vite": "^6.4.3"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"eslint": "^10.6.0",
"eslint-plugin-astro": "^2.1.1",
"eslint-plugin-svelte": "^3.20.0",
"globals": "^17.7.0",
"husky": "^9.1.7",
"lint-staged": "^17.0.8",
"oxipng": "^1.0.1",
"prettier": "^3.8.4",
"prettier-plugin-astro": "^0.14.1",
"typescript": "^5.8.3"
"svgo": "^4.0.1",
"typescript": "^5.8.3",
"typescript-eslint": "^8.62.1"
},
"prettier": {
"proseWrap": "always"
},
"lint-staged": {
"*.svg": [
"svgo --config svgo.config.mjs"
],
"*.{png,jpg,jpeg}": [
"oxipng"
],
"*.{ts,js,astro,svelte}": [
"eslint --fix",
"prettier --write --plugin=prettier-plugin-astro"
]
},
"packageManager": "pnpm@9.3.0+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631",
"pnpm": {
"overrides": {
Expand Down
Loading
Loading