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
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Ignore files for skills
# Ignore installed skills.
/.agents/skills
skills-lock.json

# Ignore specific OpenCode files.
/.opencode/package.json

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
Expand Down
17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

15 changes: 6 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { includeIgnoreFile } from '@eslint/compat';
import path from 'node:path';
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import { defineConfig } from 'eslint/config';
import { defineConfig, includeIgnoreFile } from 'eslint/config';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
const gitignorePath = path.resolve(import.meta.dirname, '.gitignore');

export default defineConfig(
includeIgnoreFile(gitignorePath),
Expand All @@ -23,7 +21,7 @@ export default defineConfig(
},
rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors.
'no-undef': 'off',
// TODO: Keep an eye on https://github.com/sveltejs/eslint-plugin-svelte/issues/1353.
'svelte/no-navigation-without-resolve': [
Expand All @@ -40,14 +38,13 @@ export default defineConfig(
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
parser: ts.parser
}
}
},
{
// Override or add rule settings here, such as:
// 'svelte/button-has-type': 'error'
// 'svelte/button-has-type': 'error'.
rules: {}
}
);
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"devDependencies": {
"@content-collections/core": "^0.15.2",
"@content-collections/vite": "^0.3.0",
"@eslint/compat": "^2.1.0",
"@eslint/js": "^10.0.1",
"@fontsource/lexend": "^5.3.0",
"@fontsource/spectral": "^5.3.0",
Expand All @@ -45,15 +44,15 @@
"prettier": "^3.9.6",
"prettier-plugin-svelte": "^4.1.1",
"prettier-plugin-tailwindcss": "^0.8.1",
"shiki": "^4.4.1",
"shiki": "^4.4.2",
"simple-icons": "^16.28.0",
"svelte": "^5.56.8",
"svelte-check": "^4.7.4",
"sveltekit-embed": "^0.0.22",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.3",
"typescript": "^6.0.3",
"typescript-eslint": "^8.65.0",
"typescript-eslint": "^8.66.0",
"vite": "^8.2.0",
"zod": "^4.4.3"
}
Expand Down
526 changes: 232 additions & 294 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('prettier').Config} */
const config = {
useTabs: true,
singleQuote: true,
trailingComma: 'none',
printWidth: 100,
proseWrap: 'always',
plugins: ['prettier-plugin-svelte', 'prettier-plugin-tailwindcss'],
tailwindStylesheet: './src/app.css',
overrides: [
{
files: '*.svelte',
options: {
parser: 'svelte'
}
}
]
};

export default config;
69 changes: 0 additions & 69 deletions svelte.config.js

This file was deleted.

71 changes: 70 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,78 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import contentCollections from '@content-collections/vite';
import adapter from '@sveltejs/adapter-node';
import { enhancedImages } from '@sveltejs/enhanced-img';
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { escapeSvelte, mdsvex } from 'mdsvex';
import { codeToHtml } from 'shiki';
import { defineConfig } from 'vite';

// Get the directory name of the current file.
const dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('mdsvex').MdsvexOptions} */
const mdsvexOptions = {
extensions: ['.md'],
layout: {
// Default layout with custom components used when rendering Markdown.
// As of Mdsvex v0.12.6, the layout paths must be absolute.
_: path.resolve(dirname, 'src/lib/mdsvex/layouts/default.svelte')
},
highlight: {
highlighter: async (code: string, lang: string | null | undefined) => {
const html = escapeSvelte(
await codeToHtml(code, {
lang: lang ?? 'text',
themes: {
light: 'github-light',
dark: 'github-dark'
},
transformers: [
{
pre(node) {
this.addClassToHast(node, 'pre');
}
}
]
})
);
return `{@html \`${html}\` }`;
}
}
};

export default defineConfig({
plugins: [tailwindcss(), enhancedImages(), sveltekit(), contentCollections()]
plugins: [
tailwindcss(),
enhancedImages(),
sveltekit({
extensions: ['.svelte', '.md'],
preprocess: [mdsvex(mdsvexOptions)],
compilerOptions: {
// Force runes mode for the project, except for libraries and .md files processed by mdsvex.
// Can be removed in Svelte 6.
runes: ({ filename }) => {
if (filename.split(/[/\\]/).includes('node_modules')) return undefined;
if (filename.endsWith('.md')) return undefined;
return true;
}
},
adapter: adapter(),
alias: {
'content-collections': './.content-collections/generated'
},
prerender: {
handleHttpError: ({ status, message }) => {
// Suppress 404 errors for posts with `published: false` during prerendering.
if (status === 404) {
return;
}
throw new Error(message);
}
}
}),
contentCollections()
]
});