diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 8f2bbcd..664a36a 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -4,80 +4,80 @@
* and should modify this configuration to best suit your team's needs.
*/
-/** @type {import('eslint').Linter.Config} */
+/** @type {import("eslint").Linter.Config} */
module.exports = {
- root: true,
- parserOptions: {
- ecmaVersion: "latest",
- sourceType: "module",
- ecmaFeatures: {
- jsx: true,
+ root: true,
+ parserOptions: {
+ ecmaVersion: "latest",
+ sourceType: "module",
+ ecmaFeatures: {
+ jsx: true
+ }
+ },
+ env: {
+ browser: true,
+ commonjs: true,
+ es6: true
},
- },
- env: {
- browser: true,
- commonjs: true,
- es6: true,
- },
- // Base config
- extends: ["eslint:recommended"],
+ // Base config
+ extends: ["eslint:recommended"],
- overrides: [
- // React
- {
- files: ["**/*.{js,jsx,ts,tsx}"],
- plugins: ["react", "jsx-a11y"],
- extends: [
- "plugin:react/recommended",
- "plugin:react/jsx-runtime",
- "plugin:react-hooks/recommended",
- "plugin:jsx-a11y/recommended",
- ],
- settings: {
- react: {
- version: "detect",
- },
- formComponents: ["Form"],
- linkComponents: [
- { name: "Link", linkAttribute: "to" },
- { name: "NavLink", linkAttribute: "to" },
- ],
- "import/resolver": {
- typescript: {},
+ overrides: [
+ // React
+ {
+ files: ["**/*.{js,jsx,ts,tsx}"],
+ plugins: ["react", "jsx-a11y"],
+ extends: [
+ "plugin:react/recommended",
+ "plugin:react/jsx-runtime",
+ "plugin:react-hooks/recommended",
+ "plugin:jsx-a11y/recommended"
+ ],
+ settings: {
+ react: {
+ version: "detect"
+ },
+ formComponents: ["Form"],
+ linkComponents: [
+ { name: "Link", linkAttribute: "to" },
+ { name: "NavLink", linkAttribute: "to" }
+ ],
+ "import/resolver": {
+ typescript: {}
+ }
+ }
},
- },
- },
- // Typescript
- {
- files: ["**/*.{ts,tsx}"],
- plugins: ["@typescript-eslint", "import"],
- parser: "@typescript-eslint/parser",
- settings: {
- "import/internal-regex": "^~/",
- "import/resolver": {
- node: {
- extensions: [".ts", ".tsx"],
- },
- typescript: {
- alwaysTryTypes: true,
- },
+ // Typescript
+ {
+ files: ["**/*.{ts,tsx}"],
+ plugins: ["@typescript-eslint", "import"],
+ parser: "@typescript-eslint/parser",
+ settings: {
+ "import/internal-regex": "^~/",
+ "import/resolver": {
+ node: {
+ extensions: [".ts", ".tsx"]
+ },
+ typescript: {
+ alwaysTryTypes: true
+ }
+ }
+ },
+ extends: [
+ "plugin:@typescript-eslint/recommended",
+ "plugin:import/recommended",
+ "plugin:import/typescript"
+ ]
},
- },
- extends: [
- "plugin:@typescript-eslint/recommended",
- "plugin:import/recommended",
- "plugin:import/typescript",
- ],
- },
- // Node
- {
- files: [".eslintrc.js"],
- env: {
- node: true,
- },
- },
- ],
+ // Node
+ {
+ files: [".eslintrc.js"],
+ env: {
+ node: true
+ }
+ }
+ ]
};
diff --git a/app/root.tsx b/app/root.tsx
index f23945f..caaf27f 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -1,27 +1,27 @@
import {
- Links,
- Meta,
- Outlet,
- Scripts,
- ScrollRestoration,
+ Links,
+ Meta,
+ Outlet,
+ Scripts,
+ ScrollRestoration
} from "@remix-run/react";
import "~/styles/tailwind.css";
export default function App() {
- return (
-
-
-
-
-
-
-
-
+ return (
+
+
+
+
+
+
+
+
-
-
- );
+
+
+ );
}
diff --git a/app/routes/api.issues.ts b/app/routes/api.issues.ts
index d9488d9..2b20ee2 100644
--- a/app/routes/api.issues.ts
+++ b/app/routes/api.issues.ts
@@ -6,12 +6,12 @@ import type { RepoIssues, GitHubLoaderData } from "~/types/github";
const CONFIG = {
OWNER: "zufall-labs",
CACHE_DURATION: 5 * 60 * 1000, // 5 Minutes
- GITHUB_API_BASE: "https://api.github.com",
+ GITHUB_API_BASE: "https://api.github.com"
} as const;
const envSchema = z.object({
REPOSITORIES: z.string().transform(str => str.split(",").map(s => s.trim())),
- SECRET_ACCESS_TOKEN: z.string().min(1, "GitHub token is required"),
+ SECRET_ACCESS_TOKEN: z.string().min(1, "GitHub token is required")
});
let cachedData: RepoIssues[] | null = null;
@@ -23,8 +23,8 @@ const fetchRepoIssues = async (repo: string, token: string) => {
{
headers: {
"Authorization": `token ${token}`,
- "Accept": "application/vnd.github.v3+json",
- },
+ "Accept": "application/vnd.github.v3+json"
+ }
}
);
diff --git a/app/routes/apitest.tsx b/app/routes/apitest.tsx
index 9b8846d..97a255d 100644
--- a/app/routes/apitest.tsx
+++ b/app/routes/apitest.tsx
@@ -16,7 +16,7 @@ export const loader: LoaderFunction = async ({ request }) => {
const data = await response.json();
return json(data);
} catch (error) {
- console.error('Error fetching issues:', error);
+ console.error("Error fetching issues:", error);
return json({ data: [] });
}
};
@@ -44,10 +44,10 @@ export default function APITest() {
>
{issue.title}
-
+
{issue.state}
@@ -58,4 +58,4 @@ export default function APITest() {
))}
);
-}
\ No newline at end of file
+}
diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css
index b31a6bb..ae15649 100644
--- a/app/styles/tailwind.css
+++ b/app/styles/tailwind.css
@@ -1,4 +1,5 @@
@import "../../public/fonts/stylesheet.css";
+
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/app/types/github.ts b/app/types/github.ts
index 9944d9e..ddeb93b 100644
--- a/app/types/github.ts
+++ b/app/types/github.ts
@@ -2,7 +2,7 @@ export interface GitHubIssue {
id: number;
number: number;
title: string;
- state: 'open' | 'closed';
+ state: "open" | "closed";
created_at: string;
updated_at: string;
html_url: string;
@@ -15,4 +15,4 @@ export interface RepoIssues {
export interface GitHubLoaderData {
data: RepoIssues[];
-}
\ No newline at end of file
+}
diff --git a/postcss.config.cjs b/postcss.config.cjs
index 63889e7..fe66dd6 100644
--- a/postcss.config.cjs
+++ b/postcss.config.cjs
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
- autoprefixer: {},
- },
-};
\ No newline at end of file
+ autoprefixer: {}
+ }
+};
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 0cb6b21..b74a0a5 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,27 +1,27 @@
-import type { Config } from 'tailwindcss'
+import type { Config } from "tailwindcss";
export default {
- content: [
- "./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}",
- ],
- theme: {
- extend: {
- fontFamily: {
- 'helvetica-now': [
- 'Helvetica Now Display',
- 'sans-serif',
- ],
- },
- fontWeight: {
- 'thin': '100',
- 'light': '300',
- 'normal': '400',
- 'medium': '500',
- 'bold': '700',
- 'extra-bold': '800',
- 'black': '900',
- }
+ content: [
+ "./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"
+ ],
+ theme: {
+ extend: {
+ fontFamily: {
+ "helvetica-now": [
+ "Helvetica Now Display",
+ "sans-serif"
+ ]
+ },
+ fontWeight: {
+ "thin": "100",
+ "light": "300",
+ "normal": "400",
+ "medium": "500",
+ "bold": "700",
+ "extra-bold": "800",
+ "black": "900"
+ }
+ }
},
- },
- plugins: [],
-} satisfies Config
+ plugins: []
+} satisfies Config;
diff --git a/tsconfig.json b/tsconfig.json
index 153de15..723a80b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,7 +1,16 @@
{
- "include": ["env.d.ts", "**/*.ts", "**/*.tsx", "netlify-edge-plugin.ts"],
+ "include": [
+ "env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ "netlify-edge-plugin.ts"
+ ],
"compilerOptions": {
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
+ "lib": [
+ "DOM",
+ "DOM.Iterable",
+ "ES2022"
+ ],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
@@ -15,7 +24,9 @@
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
- "~/*": ["./app/*"]
+ "~/*": [
+ "./app/*"
+ ]
},
// Vite takes care of building everything, not tsc.
"noEmit": true
diff --git a/vite.config.ts b/vite.config.ts
index 1b7b689..3e28b43 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -4,5 +4,5 @@ import tsconfigPaths from "vite-tsconfig-paths";
import { netlifyPlugin } from "@netlify/remix-adapter/plugin";
export default defineConfig({
- plugins: [remix(), netlifyPlugin(), tsconfigPaths()],
+ plugins: [remix(), netlifyPlugin(), tsconfigPaths()]
});