diff --git a/.eslintrc.cjs b/.eslintrc.cjs
new file mode 100644
index 0000000..a1cc7f7
--- /dev/null
+++ b/.eslintrc.cjs
@@ -0,0 +1,50 @@
+module.exports = {
+ env: {
+ browser: true,
+ es2021: true
+ },
+ extends: [
+ 'eslint:recommended',
+ 'standard-with-typescript',
+ 'plugin:@typescript-eslint/recommended',
+ 'plugin:react/recommended'
+ ],
+ overrides: [
+ {
+ env: {
+ node: true
+ },
+ files: [
+ '.eslintrc.{js,cjs}'
+ ],
+ parserOptions: {
+ sourceType: 'script'
+ }
+ }
+ ],
+ parser: '@typescript-eslint/parser',
+ parserOptions: {
+ ecmaVersion: 'latest',
+ sourceType: 'module',
+ project: [
+ './tsconfig.json'
+ ]
+ },
+ plugins: [
+ 'react',
+ '@typescript-eslint'
+ ],
+ rules: {
+ 'InferGetStaticPropsType': 'wanr',
+ 'space-before-function-paren': 'off',
+ '@typescript-eslint/space-before-function-paren': 'off',
+ '@typescript-eslint/strict-boolean-expressions': [
+ 2,
+ {
+ allowString: false,
+ allowNumber: false
+ }
+ ]
+ },
+ ignorePatterns: ['src/**/*.test.ts', 'src/frontend/generated/*']
+}
diff --git a/bun.lockb b/bun.lockb
index 6380924..8d67b44 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/components/Project.tsx b/components/ListItem.tsx
similarity index 53%
rename from components/Project.tsx
rename to components/ListItem.tsx
index 611ed5e..1e3be28 100644
--- a/components/Project.tsx
+++ b/components/ListItem.tsx
@@ -1,18 +1,18 @@
import ExternalLinkIcon from "./ExternalLinkIcon";
-export interface ProjectProps {
+export interface ListItemProps {
label: string
- date: string
+ date?: string
url: string
}
-export default function Project({ label, date, url }: ProjectProps) {
+export default function ListItem({ label, date, url }: ListItemProps) {
return (
-
+
{label}
-
{date}
+ {!!date &&
{date}}
diff --git a/components/MDContent.tsx b/components/MDContent.tsx
index bb432e3..6ee1d16 100644
--- a/components/MDContent.tsx
+++ b/components/MDContent.tsx
@@ -30,20 +30,11 @@ function BackLinks({ linkList }) {
interface MDContentProps {
- content: unknown
+ content: string
backLinks: unknown[]
- handleOpenNewContent: (arg?: unknown) => void
}
-function MDContent({ content, backLinks, handleOpenNewContent }: MDContentProps) {
-
- function _handleInternalLinkClick() {
- //Processing fetching
- //pass result up to parent container
- //TODO: handle clicking on internal link, go fetching md content from file then passing it up to parent
- handleOpenNewContent(content)
- }
-
+function MDContent({ content, backLinks }: MDContentProps) {
useRouter();
return (
diff --git a/components/SocialLinks/SocialLink.js b/components/SocialLinks/SocialLink.js
index fda7943..334ee24 100644
--- a/components/SocialLinks/SocialLink.js
+++ b/components/SocialLinks/SocialLink.js
@@ -1,6 +1,6 @@
export function SocialLink({ SvgElement, link = "#" }) {
return (
-
+
{SvgElement}
diff --git a/components/SocialLinks/SocialLinks.js b/components/SocialLinks/SocialLinks.js
index b2c1bef..4fd2231 100644
--- a/components/SocialLinks/SocialLinks.js
+++ b/components/SocialLinks/SocialLinks.js
@@ -1,13 +1,14 @@
import { SocialLink } from "./SocialLink"
export function SocialLinksList() {
+ const width = 24
return (
- } />
- } />
- } />
- } />
- } />
+ } />
+ } />
+ } />
+ } />
+ } />
)
}
diff --git a/components/UsefulLinks/UsefulLink.js b/components/UsefulLinks/UsefulLink.js
index b783488..33a20ad 100644
--- a/components/UsefulLinks/UsefulLink.js
+++ b/components/UsefulLinks/UsefulLink.js
@@ -2,10 +2,10 @@ import ExternalLinkIcon from "../ExternalLinkIcon.js";
export function UsefulLink({ title, link }) {
return (
-
+
{title}
-
+
diff --git a/components/UsefulLinks/UsefulLinks.js b/components/UsefulLinks/UsefulLinks.js
index b165d8f..90e7b55 100644
--- a/components/UsefulLinks/UsefulLinks.js
+++ b/components/UsefulLinks/UsefulLinks.js
@@ -1,8 +1,10 @@
+import ListItem from "../ListItem"
import { UsefulLink } from "./UsefulLink"
export function UsefulLinksList() {
return (
+
diff --git a/next-env.d.ts b/next-env.d.ts
index 4f11a03..f557b4e 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,4 +1,6 @@
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
///
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
///
// NOTE: This file should not be edited
diff --git a/next.config.js b/next.config.js
deleted file mode 100644
index fc871fc..0000000
--- a/next.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- webpack: (config) => {
- config.resolve.fallback = { ...config.resolve.fallback, fs: false };
- return config;
- },
-}
diff --git a/next.config.ts b/next.config.ts
new file mode 100644
index 0000000..8a72074
--- /dev/null
+++ b/next.config.ts
@@ -0,0 +1,4 @@
+export default function webpack(config: { resolve: { fallback: Record } }): { resolve: { fallback: Record } } {
+ config.resolve.fallback = { ...config.resolve.fallback, fs: false }
+ return config
+}
diff --git a/package.json b/package.json
index 2a38f76..e2f1a99 100644
--- a/package.json
+++ b/package.json
@@ -19,10 +19,16 @@
"@mui/material": "latest",
"@mui/x-tree-view": "^6.17.0",
"@types/node": "^20.10.5",
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
"cytoscape-d3-force": "latest",
"cytoscape-node-html-label": "latest",
"d3": "latest",
"directory-tree": "latest",
+ "eslint-config-standard-with-typescript": "latest",
+ "eslint-plugin-import": "^2.25.2",
+ "eslint-plugin-n": "^16.0.0",
+ "eslint-plugin-promise": "^6.0.0",
+ "eslint-plugin-react": "latest",
"fs": "latest",
"gray-matter": "latest",
"jsnetworkx": "latest",
@@ -55,18 +61,24 @@
"autoprefixer": "^10.4.16",
"bimap": "latest",
"cytoscape": "latest",
- "eslint": "latest",
+ "eslint": "^8.0.1",
"eslint-config-next": "latest",
"postcss": "^8.4.32",
"remark-frontmatter": "latest",
"remark-react": "latest",
"remark-stringify": "latest",
"tailwindcss": "latest",
- "uuid": "latest"
+ "uuid": "latest",
+ "bun-types": "latest"
},
"resolutions": {
"react": "^18",
"react-dom": "^18",
"next": "^14"
+ },
+ "module": "index.ts",
+ "type": "module",
+ "peerDependencies": {
+ "typescript": "^5.0.0"
}
-}
+}
\ No newline at end of file
diff --git a/pages/index.tsx b/pages/index.tsx
index 1e09827..33d13be 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,10 +1,11 @@
-import Job, { type JobProps } from "../components/Job";
-import Skill, { type SkillProps } from "../components/Skill";
-import Project, { type ProjectProps } from "../components/Project";
-import Head from "next/head";
+import Job, { type JobProps } from '../components/Job'
+import Skill, { type SkillProps } from '../components/Skill'
+import ListItem, { type ListItemProps } from '../components/ListItem'
+import Head from 'next/head'
import { UsefulLinksList } from '../components/UsefulLinks/index'
import { SocialLinksList } from '../components/SocialLinks/SocialLinks'
-import type { InferGetStaticPropsType, GetStaticProps } from 'next'
+import type { GetStaticProps } from 'next'
+import { type HTMLAttributes } from 'react'
interface LandingProps {
jobs: JobsType[]
@@ -16,24 +17,24 @@ export default function Landing({ jobs, skills, projects }: LandingProps) {
return (
-
+
-
-