Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .editorconfig and format all files #181

Merged
merged 1 commit into from
Jan 5, 2025
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{*.md,*.mdx}]
trim_trailing_whitespace = false
14 changes: 7 additions & 7 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineConfig } from "astro/config";
import cloudflare from "@astrojs/cloudflare";
import sitemap from "@astrojs/sitemap";
import react from "@astrojs/react";
import markdoc from "@astrojs/markdoc";
import autoprefixer from "autoprefixer";
import postcssUtopia from "postcss-utopia";
import postcssMediaMinMax from "postcss-media-minmax";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import postcssLogicalViewportUnits from "@csstools/postcss-logical-viewport-units";
import postcssClamp from "postcss-clamp";
import { defineConfig } from "astro/config";
import autoprefixer from "autoprefixer";
import cssnano from "cssnano";
import postcssClamp from "postcss-clamp";
import postcssMediaMinMax from "postcss-media-minmax";
import postcssUtopia from "postcss-utopia";

// https://astro.build/config
export default defineConfig({
Expand Down
48 changes: 25 additions & 23 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"ignore": [
".astro",
"node_modules",
"playwright-report",
"test-results",
"dist",
".vscode"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"organizeImports": { "enabled": true },
"linter": { "enabled": true, "rules": { "recommended": true } },
"overrides": [
{
"include": ["*.astro", "**/*.astro"],
"javascript": { "globals": ["exports"] }
}
]
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"ignore": [
".astro",
"node_modules",
"playwright-report",
"test-results",
"dist",
".vscode",
// PostCSS
"src/styles/theme.css"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"organizeImports": { "enabled": true },
"linter": { "enabled": true, "rules": { "recommended": true } },
"overrides": [
{
"include": ["*.astro", "**/*.astro"],
"javascript": { "globals": ["exports"] }
}
]
}
2 changes: 1 addition & 1 deletion keystatic.config.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { config, fields, collection } from "@keystatic/core";
import { collection, config, fields } from "@keystatic/core";

export default config({
storage: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { RiDiscordFill } from "react-icons/ri";
import siteInfo from "~/data/site-info";
import Logo from "./Logo.astro";
import { RiDiscordFill } from "react-icons/ri";

const { socialLinks } = siteInfo;
---
Expand Down
2 changes: 1 addition & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineCollection, reference, z } from "astro:content";
import { glob } from "astro/loaders";
import { z, defineCollection, reference } from "astro:content";
import type { RoughAnnotationType } from "rough-notation/lib/model";
import type { NamesakeColor } from "~/data/colors";

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { AstroFont } from "astro-font";
import { join } from "node:path";
import { AstroFont } from "astro-font";
import Footer from "~/components/Footer.astro";
import Header from "~/components/Header.astro";
import type { NamesakeColor } from "~/data/colors";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[id].astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { getCollection, type CollectionEntry, render } from "astro:content";
import { type CollectionEntry, getCollection, render } from "astro:content";
import ProseLayout from "~/layouts/ProseLayout.astro";

export interface Props {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/[id].astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
import { Image } from "astro:assets";
import ProseLayout from "~/layouts/ProseLayout.astro";
import {
type CollectionEntry,
getCollection,
getEntries,
type CollectionEntry,
render,
} from "astro:content";
import ProseLayout from "~/layouts/ProseLayout.astro";

export interface Props {
post: CollectionEntry<"posts">;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/blog/index.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import BaseLayout from "~/layouts/BaseLayout.astro";
import { getCollection, getEntries } from "astro:content";
import ArticleLink from "~/components/ArticleLink.astro";
import PageHeader from "~/components/PageHeader.astro";
import BaseLayout from "~/layouts/BaseLayout.astro";

const posts = await getCollection("posts");
---
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { Image } from "astro:assets";
import heroIllustration from "~/content/pages/_images/hero-form.png";
import Partners from "~/components/Partners.astro";
import heroIllustration from "~/content/pages/_images/hero-form.png";
import siteInfo from "~/data/site-info";
import BaseLayout from "~/layouts/BaseLayout.astro";

Expand Down
2 changes: 1 addition & 1 deletion tests/accessibility.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AxeBuilder from "@axe-core/playwright";
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";

const paths = [
"/",
Expand Down
2 changes: 1 addition & 1 deletion tests/chat.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";

test.describe("chat", () => {
test("should redirect to Discord invite", async ({ page }) => {
Expand Down
Loading