diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e5b84ab --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json.schemastore.org/eslintrc", + "root": true, + "extends": ["next", "prettier"], + "plugins": ["tailwindcss"], + "rules": { + "@next/next/no-html-link-for-pages": "off", + "react/jsx-key": "off", + "tailwindcss/no-custom-classname": "off" + }, + "settings": { + "tailwindcss": { + "callees": ["cn"], + "config": "tailwind.config.js" + }, + "next": { + "rootDir": ["./"] + } + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "parser": "@typescript-eslint/parser" + } + ] +} diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..f5a575d --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "trailingComma": "es5", + "semi": true, + "tabWidth": 2, + "singleQuote": true, + "jsxSingleQuote": true, + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/components.json b/components.json index 7681c2f..8f3b104 100644 --- a/components.json +++ b/components.json @@ -10,7 +10,10 @@ "cssVariables": true }, "aliases": { + "utils": "@/lib/utils", "components": "@/components", - "utils": "@/lib/utils" + "types": "@/types", + "hooks": "@/hooks", + "helpers": "@/helpers" } -} \ No newline at end of file +} diff --git a/package.json b/package.json index b8c03d7..2e06bac 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,14 @@ "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", - "autoprefixer": "^10", + "autoprefixer": "^10.4.16", "eslint": "^8", "eslint-config-next": "14.0.0", - "postcss": "^8", - "tailwindcss": "^3", + "eslint-config-prettier": "^9.0.0", + "postcss": "^8.4.31", + "prettier": "^3.0.3", + "prettier-plugin-tailwindcss": "^0.5.6", + "tailwindcss": "^3.3.5", "typescript": "^5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a246ea..8865def 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,7 +41,7 @@ devDependencies: specifier: ^18 version: 18.2.14 autoprefixer: - specifier: ^10 + specifier: ^10.4.16 version: 10.4.16(postcss@8.4.31) eslint: specifier: ^8 @@ -49,11 +49,20 @@ devDependencies: eslint-config-next: specifier: 14.0.0 version: 14.0.0(eslint@8.52.0)(typescript@5.2.2) + eslint-config-prettier: + specifier: ^9.0.0 + version: 9.0.0(eslint@8.52.0) postcss: - specifier: ^8 + specifier: ^8.4.31 version: 8.4.31 + prettier: + specifier: ^3.0.3 + version: 3.0.3 + prettier-plugin-tailwindcss: + specifier: ^0.5.6 + version: 0.5.6(prettier@3.0.3) tailwindcss: - specifier: ^3 + specifier: ^3.3.5 version: 3.3.5 typescript: specifier: ^5 @@ -912,6 +921,15 @@ packages: - supports-color dev: true + /eslint-config-prettier@9.0.0(eslint@8.52.0): + resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.52.0 + dev: true + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: @@ -2030,6 +2048,67 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prettier-plugin-tailwindcss@0.5.6(prettier@3.0.3): + resolution: {integrity: sha512-2Xgb+GQlkPAUCFi3sV+NOYcSI5XgduvDBL2Zt/hwJudeKXkyvRS65c38SB0yb9UB40+1rL83I6m0RtlOQ8eHdg==} + engines: {node: '>=14.21.3'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@shufo/prettier-plugin-blade': '*' + '@trivago/prettier-plugin-sort-imports': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + prettier-plugin-twig-melody: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@shufo/prettier-plugin-blade': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + prettier-plugin-twig-melody: + optional: true + dependencies: + prettier: 3.0.3 + dev: true + + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: diff --git a/tsconfig.json b/tsconfig.json index c714696..1b03bc2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,26 +1,28 @@ { "compilerOptions": { - "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, + "forceConsistentCasingInFileNames": true, "noEmit": true, + "incremental": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", - "incremental": true, + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + }, "plugins": [ { "name": "next" } ], - "paths": { - "@/*": ["./*"] - } + "strictNullChecks": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"]