├── .gitignore ├── styles └── base.css ├── next-env.d.ts ├── public └── og.png ├── postcss.config.js ├── .vscode └── settings.json ├── pages ├── index.tsx └── _app.tsx ├── .prettierrc.js ├── tailwind.config.js ├── tsconfig.json └── .eslintrc.js /.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .next 3 | node_modules/ 4 | 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /styles/base.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /public/og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gangludev/nextjs-typescript-tailwind/HEAD/public/og.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "editor.formatOnSave": true 6 | } 7 | -------------------------------------------------------------------------------- /pages/index.tsx: -------------------------------------------------------------------------------- 1 | function Homepage(): JSX.Element { 2 | return ( 3 |

4 | Our homepage 5 |

6 | ) 7 | } 8 | 9 | export default Homepage 10 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | trailingComma: 'es5', 4 | singleQuote: true, 5 | printWidth: 80, 6 | tabWidth: 2, 7 | useTabs: false, 8 | jsxBracketSameLine: false, 9 | bracketSpacing: true, 10 | } 11 | -------------------------------------------------------------------------------- /pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { AppProps } from 'next/app' 2 | 3 | import '../styles/base.css' 4 | 5 | function MyApp({ Component, pageProps }: AppProps): JSX.Element { 6 | return 7 | } 8 | 9 | export default MyApp 10 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], 3 | darkMode: false, // or 'media' or 'class' 4 | theme: { 5 | extend: {}, 6 | }, 7 | variants: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "strict": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "noEmit": true, 14 | "esModuleInterop": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "jsx": "preserve" 20 | }, 21 | "include": [ 22 | "next-env.d.ts", 23 | "**/*.ts", 24 | "**/*.tsx" 25 | ], 26 | "exclude": [ 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | es6: true, 6 | }, 7 | parserOptions: { ecmaVersion: 8 }, 8 | ignorePatterns: ['node_modules/*', '.next/*', '.out/*', '!.prettierrc.js'], 9 | extends: ['eslint:recommended'], 10 | overrides: [ 11 | { 12 | files: ['**/*.ts', '**/*.tsx'], 13 | parser: '@typescript-eslint/parser', 14 | settings: { react: { version: 'detect' } }, 15 | env: { 16 | browser: true, 17 | node: true, 18 | es6: true, 19 | }, 20 | extends: [ 21 | 'eslint:recommended', 22 | 'plugin:@typescript-eslint/recommended', 23 | 'plugin:react/recommended', 24 | 'plugin:react-hooks/recommended', 25 | 'plugin:jsx-a11y/recommended', 26 | 'prettier/@typescript-eslint', 27 | 'plugin:prettier/recommended', 28 | ], 29 | rules: { 30 | 'react/prop-types': 'off', 31 | 'react/react-in-jsx-scope': 'off', 32 | 'jsx-a11y/anchor-is-valid': 'off', 33 | '@typescript-eslint/no-unused-vars': ['error'], 34 | '@typescript-eslint/explicit-function-return-type': [ 35 | 'warn', 36 | { 37 | allowExpressions: true, 38 | allowConciseArrowFunctionExpressionsStartingWithVoid: true, 39 | }, 40 | ], 41 | 'prettier/prettier': ['error', {}, { usePrettierrc: true }], 42 | }, 43 | }, 44 | ], 45 | } 46 | --------------------------------------------------------------------------------