diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..87715a78
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,16 @@
+.DS_Store
+node_modules
+build
+public
+dist
+.next
+.svelte-kit
+.env
+.env.*
+!.env.example
+.git
+
+# Ignore files for PNPM, NPM and YARN
+pnpm-lock.yaml
+package-lock.json
+yarn.lock
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..87715a78
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,16 @@
+.DS_Store
+node_modules
+build
+public
+dist
+.next
+.svelte-kit
+.env
+.env.*
+!.env.example
+.git
+
+# Ignore files for PNPM, NPM and YARN
+pnpm-lock.yaml
+package-lock.json
+yarn.lock
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..9e8a261a
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,10 @@
+{
+ "semi": false,
+ "useTabs": true,
+ "singleQuote": false,
+ "trailingComma": "all",
+ "printWidth": 100,
+ "plugins": [],
+ "pluginSearchDirs": ["."],
+ "overrides": []
+}
diff --git a/apps/next/components/Layout.tsx b/apps/next/components/Layout.tsx
index aded7138..9a02f351 100644
--- a/apps/next/components/Layout.tsx
+++ b/apps/next/components/Layout.tsx
@@ -1,9 +1,7 @@
-import type { FunctionComponent, ReactNode } from 'react'
+import type { FunctionComponent, ReactNode } from "react"
const Layout: FunctionComponent<{ children: ReactNode }> = ({ children }) => {
- return (
- {children}
- )
+ return {children}
}
export default Layout
diff --git a/apps/next/x.eslintrc.js b/apps/next/x.eslintrc.js
new file mode 100644
index 00000000..8cd60cfd
--- /dev/null
+++ b/apps/next/x.eslintrc.js
@@ -0,0 +1,8 @@
+module.exports = {
+ ...require("config/eslint-preset.js"),
+ parserOptions: {
+ tsconfigRootDir: __dirname,
+ project: "./tsconfig.json",
+ },
+ ignorePatterns: [".eslintrc.js"],
+}
diff --git a/package.json b/package.json
index bdfd1821..542933dc 100644
--- a/package.json
+++ b/package.json
@@ -1,49 +1,50 @@
{
- "name": "emiljohansson.dev",
- "description": "Playground for Emil Johansson",
- "version": "1.2.1",
- "author": "emiljohansson.dev@gmail.com",
- "keywords": [
- "emil",
- "johansson"
- ],
- "license": "MIT",
- "scripts": {
- "build": "turbo run build",
- "export": "turbo run export",
- "dev": "turbo run dev --parallel",
- "start": "turbo run start",
- "test": "turbo run test",
- "test:ci": "start-server-and-test start http://localhost:3000 \"cypress run --headless --browser chrome\"",
- "cy:run": "cypress run --headless --browser chrome",
- "cy:open": "cypress open",
- "lint": "turbo run lint"
- },
- "workspaces": [
- "packages/*",
- "apps/*"
- ],
- "dependencies": {
- "@tailwindcss/typography": "0.5.4",
- "autoprefixer": "10.4.2",
- "postcss": "8.4.14",
- "tailwindcss": "3.1.7"
- },
- "devDependencies": {
- "@cypress-audit/lighthouse": "1.3.1",
- "@types/jest": "27.4.0",
- "@types/node": "18.0.1",
- "@types/react": "18.0.15",
- "@types/react-dom": "18.0.6",
- "axe-core": "4.4.3",
- "cypress": "12.1.0",
- "cypress-axe": "1.2.0",
- "husky": "8.0.1",
- "jest": "27.5.1",
- "start-server-and-test": "1.14.0",
- "ts-jest": "27.1.3",
- "turbo": "1.4.5",
- "typescript": "4.8.2"
- },
- "packageManager": "pnpm@7.1.3"
+ "name": "emiljohansson.dev",
+ "description": "Playground for Emil Johansson",
+ "version": "1.2.1",
+ "author": "emiljohansson.dev@gmail.com",
+ "keywords": [
+ "emil",
+ "johansson"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "build": "turbo run build",
+ "export": "turbo run export",
+ "dev": "turbo run dev --parallel",
+ "start": "turbo run start",
+ "test": "turbo run test",
+ "test:ci": "start-server-and-test start http://localhost:3000 \"cypress run --headless --browser chrome\"",
+ "cy:run": "cypress run --headless --browser chrome",
+ "cy:open": "cypress open",
+ "lint": "turbo run lint"
+ },
+ "workspaces": [
+ "packages/*",
+ "apps/*"
+ ],
+ "dependencies": {
+ "@tailwindcss/typography": "0.5.4",
+ "autoprefixer": "10.4.2",
+ "postcss": "8.4.14",
+ "tailwindcss": "3.1.7"
+ },
+ "devDependencies": {
+ "@cypress-audit/lighthouse": "1.3.1",
+ "@types/jest": "27.4.0",
+ "@types/node": "18.0.1",
+ "@types/react": "18.0.15",
+ "@types/react-dom": "18.0.6",
+ "axe-core": "4.4.3",
+ "cypress": "12.1.0",
+ "cypress-axe": "1.2.0",
+ "husky": "8.0.1",
+ "jest": "27.5.1",
+ "prettier": "2.8.4",
+ "start-server-and-test": "1.14.0",
+ "ts-jest": "27.1.3",
+ "turbo": "1.4.5",
+ "typescript": "4.8.2"
+ },
+ "packageManager": "pnpm@7.1.3"
}
diff --git a/packages/config/eslint-preset.js b/packages/config/eslint-preset.js
index 7c7a735b..f76ed1f2 100644
--- a/packages/config/eslint-preset.js
+++ b/packages/config/eslint-preset.js
@@ -1,40 +1,32 @@
module.exports = {
- env: {
- browser: true,
- es2021: true,
- },
- settings: {
- next: {
- rootDir: ['apps/*/', 'packages/*/'],
- },
- },
- extends: [
- 'standard',
- 'plugin:@typescript-eslint/recommended',
- ],
- parser: '@typescript-eslint/parser',
- parserOptions: {
- ecmaFeatures: {
- jsx: true,
- },
- ecmaVersion: 'latest',
- sourceType: 'module',
- },
- plugins: [
- 'react',
- '@typescript-eslint',
- ],
- rules: {
- 'react/react-in-jsx-scope': 'off',
- 'import/no-anonymous-default-export': 'off',
- 'comma-dangle': ['error', 'always-multiline'],
- 'no-unused-vars': 'off',
- '@typescript-eslint/no-unused-vars': ['error'],
- '@typescript-eslint/no-explicit-any': 'error',
- 'func-call-spacing': 'off',
- '@typescript-eslint/func-call-spacing': 'error',
- indent: 'off',
- '@typescript-eslint/indent': ['error', 2],
- 'jsx-quotes': ['error', 'prefer-double'],
- },
+ env: {
+ browser: true,
+ es2021: true,
+ },
+ settings: {
+ next: {
+ rootDir: ["apps/*/", "packages/*/"],
+ },
+ },
+ extends: ["standard", "plugin:@typescript-eslint/recommended", "prettier"],
+ parser: "@typescript-eslint/parser",
+ parserOptions: {
+ ecmaFeatures: {
+ jsx: true,
+ },
+ ecmaVersion: "latest",
+ sourceType: "module",
+ },
+ plugins: ["react", "@typescript-eslint"],
+ // rules: {
+ // "react/react-in-jsx-scope": "off",
+ // "import/no-anonymous-default-export": "off",
+ // "comma-dangle": ["error", "always-multiline"],
+ // "no-unused-vars": "off",
+ // "@typescript-eslint/no-unused-vars": ["error"],
+ // "@typescript-eslint/no-explicit-any": "error",
+ // "func-call-spacing": "off",
+ // "@typescript-eslint/func-call-spacing": "error",
+ // "jsx-quotes": ["error", "prefer-double"],
+ // },
}
diff --git a/packages/config/package.json b/packages/config/package.json
index ca31ed14..935a500f 100644
--- a/packages/config/package.json
+++ b/packages/config/package.json
@@ -1,24 +1,25 @@
{
- "name": "config",
- "version": "1.0.0",
- "main": "eslint-preset.js",
- "license": "MIT",
- "dependencies": {
- "next": "13.1.1",
- "react": "18.2.0",
- "react-dom": "18.2.0"
- },
- "devDependencies": {
- "@typescript-eslint/eslint-plugin": "5.10.0",
- "@typescript-eslint/parser": "5.10.0",
- "eslint": "8.23.0",
- "eslint-config-next": "13.0.0",
- "eslint-config-standard": "17.0.0",
- "eslint-plugin-import": "2.25.4",
- "eslint-plugin-n": "^15.2.0",
- "eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "6.0.0",
- "eslint-plugin-react": "7.28.0",
- "typescript": "4.8.2"
- }
+ "name": "config",
+ "version": "1.0.0",
+ "main": "eslint-preset.js",
+ "license": "MIT",
+ "dependencies": {
+ "next": "13.1.1",
+ "react": "18.2.0",
+ "react-dom": "18.2.0"
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "5.10.0",
+ "@typescript-eslint/parser": "5.10.0",
+ "eslint": "8.23.0",
+ "eslint-config-next": "13.0.0",
+ "eslint-config-standard": "17.0.0",
+ "eslint-plugin-import": "2.25.4",
+ "eslint-plugin-n": "^15.2.0",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-config-prettier": "latest",
+ "eslint-plugin-promise": "6.0.0",
+ "eslint-plugin-react": "7.28.0",
+ "typescript": "4.8.2"
+ }
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 189a80b1..df24a2b6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,6 +17,7 @@ importers:
husky: 8.0.1
jest: 27.5.1
postcss: 8.4.14
+ prettier: 2.8.4
start-server-and-test: 1.14.0
tailwindcss: 3.1.7
ts-jest: 27.1.3
@@ -38,6 +39,7 @@ importers:
cypress-axe: 1.2.0_2hjo27vwqrtlfr5rbdl7tqkluy
husky: 8.0.1
jest: 27.5.1
+ prettier: 2.8.4
start-server-and-test: 1.14.0
ts-jest: 27.1.3_vvcvcp7cgkchkmj45x3ngkywme
turbo: 1.4.5
@@ -76,7 +78,7 @@ importers:
'@radix-ui/react-icons': 1.1.1_react@18.2.0
'@radix-ui/react-label': 1.0.0_biqbaboplfbrettd7655fr4n2y
'@radix-ui/react-progress': 1.0.0_biqbaboplfbrettd7655fr4n2y
- '@radix-ui/react-radio-group': 1.1.0_biqbaboplfbrettd7655fr4n2y
+ '@radix-ui/react-radio-group': 1.1.1_biqbaboplfbrettd7655fr4n2y
framer-motion: 6.2.3_biqbaboplfbrettd7655fr4n2y
lib: link:../../packages/lib
next: 13.1.1_biqbaboplfbrettd7655fr4n2y
@@ -204,6 +206,7 @@ importers:
'@typescript-eslint/parser': 5.10.0
eslint: 8.23.0
eslint-config-next: 13.0.0
+ eslint-config-prettier: latest
eslint-config-standard: 17.0.0
eslint-plugin-import: 2.25.4
eslint-plugin-n: ^15.2.0
@@ -223,6 +226,7 @@ importers:
'@typescript-eslint/parser': 5.10.0_yqf6kl63nyoq5megxukfnom5rm
eslint: 8.23.0
eslint-config-next: 13.0.0_yqf6kl63nyoq5megxukfnom5rm
+ eslint-config-prettier: 8.6.0_eslint@8.23.0
eslint-config-standard: 17.0.0_ljfjrecfthdt4f3klkysgrhoyi
eslint-plugin-import: 2.25.4_mucud53oeiamfrgzicgup4ksyq
eslint-plugin-n: 15.3.0_eslint@8.23.0
@@ -1393,8 +1397,8 @@ packages:
react-dom: 18.2.0_react@18.2.0
dev: false
- /@radix-ui/react-radio-group/1.1.0_biqbaboplfbrettd7655fr4n2y:
- resolution: {integrity: sha512-7rrkZCXu0Q7oC0MxCm497X1DdV/tI78oNIGXA8sDbCkboiTkuLSe728zCCpRYHw+9PifHIx86nsbITPEq5yijg==}
+ /@radix-ui/react-radio-group/1.1.1_biqbaboplfbrettd7655fr4n2y:
+ resolution: {integrity: sha512-fmg1CuDKt3GAkL3YnHekmdOicyrXlbp/s/D0MrHa+YB2Un+umpJGheiRowlQtxSpb1eeehKNTINgNESi8WK5rA==}
peerDependencies:
react: ^16.8 || ^17.0 || ^18.0
react-dom: ^16.8 || ^17.0 || ^18.0
@@ -1406,7 +1410,7 @@ packages:
'@radix-ui/react-direction': 1.0.0_react@18.2.0
'@radix-ui/react-presence': 1.0.0_biqbaboplfbrettd7655fr4n2y
'@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y
- '@radix-ui/react-roving-focus': 1.0.1_biqbaboplfbrettd7655fr4n2y
+ '@radix-ui/react-roving-focus': 1.0.2_biqbaboplfbrettd7655fr4n2y
'@radix-ui/react-use-controllable-state': 1.0.0_react@18.2.0
'@radix-ui/react-use-previous': 1.0.0_react@18.2.0
'@radix-ui/react-use-size': 1.0.0_react@18.2.0
@@ -1434,8 +1438,8 @@ packages:
react-dom: 18.2.0_react@18.2.0
dev: false
- /@radix-ui/react-roving-focus/1.0.1_biqbaboplfbrettd7655fr4n2y:
- resolution: {integrity: sha512-TB76u5TIxKpqMpUAuYH2VqMhHYKa+4Vs1NHygo/llLvlffN6mLVsFhz0AnSFlSBAvTBYVHYAkHAyEt7x1gPJOA==}
+ /@radix-ui/react-roving-focus/1.0.2_biqbaboplfbrettd7655fr4n2y:
+ resolution: {integrity: sha512-HLK+CqD/8pN6GfJm3U+cqpqhSKYAWiOJDe+A+8MfxBnOue39QEeMa43csUn2CXCHQT0/mewh1LrrG4tfkM9DMA==}
peerDependencies:
react: ^16.8 || ^17.0 || ^18.0
react-dom: ^16.8 || ^17.0 || ^18.0
@@ -3581,6 +3585,15 @@ packages:
- supports-color
dev: true
+ /eslint-config-prettier/8.6.0_eslint@8.23.0:
+ resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==}
+ hasBin: true
+ peerDependencies:
+ eslint: '>=7.0.0'
+ dependencies:
+ eslint: 8.23.0
+ dev: true
+
/eslint-config-standard/17.0.0_ljfjrecfthdt4f3klkysgrhoyi:
resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==}
peerDependencies:
@@ -6306,6 +6319,12 @@ packages:
engines: {node: '>= 0.8.0'}
dev: true
+ /prettier/2.8.4:
+ resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==}
+ engines: {node: '>=10.13.0'}
+ hasBin: true
+ dev: true
+
/pretty-bytes/5.6.0:
resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==}
engines: {node: '>=6'}