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
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -26,7 +26,10 @@ jobs:
run: bun install --frozen-lockfile

- name: Check TypeScript
run: bun astro check
run: bun astro check && bun run typecheck

- name: Check linting
run: bun run lint

- name: Build project
run: bun run build
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ pnpm-debug.log*
/.cache

# IntelliJ IDEA
/.idea
/.idea

.eslintcache

26 changes: 26 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"arrowParens": "always",
"singleQuote": false,
"semi": true,
"trailingComma": "es5",
"plugins": [
"prettier-plugin-astro",
"prettier-plugin-svelte",
"prettier-plugin-organize-imports"
],
"organizeImportsSkipDestructiveCodeActions": true,
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
},
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "astro/config";
import node from "@astrojs/node";
import svelte from "@astrojs/svelte";
import tailwindcss from "@tailwindcss/vite";
import node from "@astrojs/node";
import { defineConfig } from "astro/config";

export default defineConfig({
output: "server",
Expand Down
261 changes: 247 additions & 14 deletions bun.lock

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import typescriptParser from "@typescript-eslint/parser";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginAstro from "eslint-plugin-astro";
import eslintPluginSvelte from "eslint-plugin-svelte";
import svelteParser from "svelte-eslint-parser";

export default [
// Ignore patterns
{
ignores: [
"dist/**",
"node_modules/**",
".astro/**",
".wrangler/**",
"bun.lock",
"*.config.js",
"*.config.mjs",
"*.config.ts",
],
},

// Base TypeScript configuration
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "warn",
},
},

// Astro configuration
...eslintPluginAstro.configs.recommended,
{
files: ["**/*.astro"],
rules: {
// Astro-specific rules
"astro/no-set-html-directive": "error",
"astro/no-unused-css-selector": "warn",
},
},

// Svelte configuration
...eslintPluginSvelte.configs["flat/recommended"],
{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: typescriptParser,
extraFileExtensions: [".svelte"],
},
},
rules: {
// Svelte-specific rules
"svelte/no-at-html-tags": "warn",
"svelte/no-unused-svelte-ignore": "warn",
"svelte/valid-compile": "error",
},
},

// Prettier compatibility (must be last)
eslintConfigPrettier,
];
25 changes: 20 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "apparent-axis",
"name": "canvasmc-website",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev --port 3000",
"build": "astro build",
"start": "astro preview --port 3000",
"astro": "astro",
"format": "prettier --write ."
"format": "prettier --write .",
"lint:eslint": "eslint . --cache",
"lint:prettier": "prettier --check .",
"lint": "bun run lint:eslint && bun run lint:prettier",
"typecheck": "bun astro sync && tsc --noEmit"
},
"dependencies": {
"@astrojs/check": "^0.9.5",
Expand All @@ -24,12 +28,23 @@
"svelte": "^5.43.8",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.17",
"typescript": "^5.9.3",
"typescript": "^6.0.2",
"zod": "^4.1.12"
},
"devDependencies": {
"prettier": "^3.6.2",
"@types/node": "^25.5.0",
"@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2",
"eslint": "^10.1.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-svelte": "^3.16.0",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-svelte": "^3.4.0"
"prettier-plugin-organize-imports": "^4.3.0",
"prettier-plugin-svelte": "^3.5.1",
"svelte-eslint-parser": "^1.6.0",
"typescript-eslint": "^8.57.2"
}
}
32 changes: 16 additions & 16 deletions src/components/AnimatedBox.svelte
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<script lang="ts">
import { onMount } from 'svelte';
import { gsap } from 'gsap';
import { onMount } from "svelte";
import { gsap } from "gsap";

let box: HTMLDivElement;
let box: HTMLDivElement;

onMount(() => {
gsap.to(box, {
rotation: 360,
scale: 1.2,
duration: 2,
repeat: -1,
yoyo: true,
ease: 'power2.inOut'
});
});
onMount(() => {
gsap.to(box, {
rotation: 360,
scale: 1.2,
duration: 2,
repeat: -1,
yoyo: true,
ease: "power2.inOut",
});
});
</script>

<div
bind:this={box}
class="w-32 h-32 bg-gradient-to-br from-purple-500 to-pink-500 rounded-lg shadow-lg flex items-center justify-center"
bind:this={box}
class="w-32 h-32 bg-gradient-to-br from-purple-500 to-pink-500 rounded-lg shadow-lg flex items-center justify-center"
>
<span class="text-2xl font-bold">GSAP</span>
<span class="text-2xl font-bold">GSAP</span>
</div>
Loading
Loading