Skip to content

Commit

Permalink
basic config nextjs tailwind prettier eslint vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzpokorski committed Feb 15, 2023
1 parent 0daedb2 commit 5bbda93
Show file tree
Hide file tree
Showing 20 changed files with 2,167 additions and 772 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier",
],
parserOptions: {
project: ["tsconfig.json"],
},
settings: {
react: {
version: "detect",
},
},
ignorePatterns: ["build/", "dist/", "node_modules/", "*.js", "*.jsx"],
rules: {},
};
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
.next
node_modules
pnpm-lock.yaml
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.configPath": ".prettierrc.json"
}
13 changes: 11 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}
experimental: {
fontLoaders: [
{
loader: "@next/font/google",
options: { subsets: ["latin", "latin-ext"] },
},
],
legacyBrowsers: false,
},
};

module.exports = nextConfig
module.exports = nextConfig;
20 changes: 18 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,34 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"test": "vitest"
},
"dependencies": {
"@next/font": "13.1.6",
"@types/node": "18.13.0",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"eslint": "8.34.0",
"eslint-config-next": "13.1.6",
"next": "13.1.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"@vitejs/plugin-react": "^3.1.0",
"autoprefixer": "^10.4.13",
"eslint-config-next": "13.1.6",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react-hooks": "^4.6.0",
"jsdom": "^21.1.0",
"postcss": "^8.4.21",
"prettier": "2.8.4",
"tailwindcss": "^3.2.6",
"vitest": "^0.28.5"
}
}
Loading

0 comments on commit 5bbda93

Please sign in to comment.