Add eslint standard + use pnpm

This commit is contained in:
Hydroxycarbamide 2022-11-21 10:33:40 +01:00
parent de4772e9e9
commit aafc769f33
8 changed files with 2185 additions and 5 deletions

View file

@ -1,3 +1,9 @@
{ {
"extends": "next/core-web-vitals" "parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"next/core-web-vitals",
"standard-with-typescript"
]
} }

9
app/head.tsx Normal file
View file

@ -0,0 +1,9 @@
export default function Head() {
return (
<>
<title></title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link rel="icon" href="/favicon.ico" />
</>
)
}

12
app/layout.tsx Normal file
View file

@ -0,0 +1,12 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html>
<head />
<body>{children}</body>
</html>
)
}

5
app/page.tsx Normal file
View file

@ -0,0 +1,5 @@
export default function HomePage (): JSX.Element {
return (
<div>Hello World</div>
)
}

View file

@ -1,5 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
experimental: {
appDir: true
},
reactStrictMode: true, reactStrictMode: true,
swcMinify: true, swcMinify: true,
} }

View file

@ -18,5 +18,14 @@
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"typescript": "4.9.3" "typescript": "4.9.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-module-utils": "^2.7.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.5.1",
"eslint-plugin-promise": "^6.1.1"
} }
} }

2120
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@ -13,8 +17,20 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
"incremental": true "incremental": true,
"plugins": [
{
"name": "next"
}
]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }