Skip to content

Commit 160b160

Browse files
committed
initial commit
0 parents  commit 160b160

13 files changed

+7336
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["next/babel", "@emotion/babel-preset-css-prop"]
3+
}

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.py]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.rb]
17+
indent_style = space
18+
indent_size = 4

.eslintrc.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
extends: [
3+
'airbnb',
4+
'airbnb/hooks',
5+
'prettier',
6+
'prettier/react',
7+
'plugin:prettier/recommended',
8+
'plugin:@typescript-eslint/recommended',
9+
],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['@typescript-eslint'],
12+
settings: {
13+
// Append 'ts' and 'tsx' extensions to Airbnb 'import/resolver' setting
14+
'import/resolver': {
15+
node: {
16+
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json'],
17+
},
18+
},
19+
// Append 'ts' and 'tsx' extensions to Airbnb 'import/extensions' setting
20+
'import/extensions': ['.js', '.ts', '.mjs', '.jsx', '.tsx'],
21+
},
22+
rules: {
23+
'@typescript-eslint/explicit-module-boundary-types': ['off'],
24+
'import/no-extraneous-dependencies': ['off'],
25+
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
26+
'react/jsx-props-no-spreading': ['off'],
27+
},
28+
};

.gitignore

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# =========================
2+
# Node.js-Specific Ignores
3+
# =========================
4+
5+
# Build directory
6+
.next/
7+
8+
# Static export path
9+
out/
10+
11+
# Logs
12+
logs
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
34+
.grunt
35+
36+
# Bower dependency directory (https://bower.io/)
37+
bower_components
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (http://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directories
46+
node_modules/
47+
jspm_packages/
48+
49+
# Typescript v1 declaration files
50+
typings/
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Optional REPL history
59+
.node_repl_history
60+
61+
# Output of 'npm pack'
62+
*.tgz
63+
64+
# Yarn Integrity file
65+
.yarn-integrity
66+
67+
# dotenv environment variables file
68+
.env
69+
70+
# =========================
71+
# Operating System Files
72+
# =========================
73+
74+
# OSX
75+
# =========================
76+
77+
.DS_Store
78+
.AppleDouble
79+
.LSOverride
80+
81+
# Thumbnails
82+
._*
83+
84+
# Files that might appear on external disk
85+
.Spotlight-V100
86+
.Trashes
87+
88+
# Directories potentially created on remote AFP share
89+
.AppleDB
90+
.AppleDesktop
91+
Network Trash Folder
92+
Temporary Items
93+
.apdisk
94+
95+
# Windows
96+
# =========================
97+
98+
# Windows image file caches
99+
Thumbs.db
100+
ehthumbs.db
101+
102+
# Folder config file
103+
Desktop.ini
104+
105+
# Recycle Bin used on file shares
106+
$RECYCLE.BIN/
107+
108+
# Windows Installer files
109+
*.cab
110+
*.msi
111+
*.msm
112+
*.msp
113+
114+
# Windows shortcuts
115+
*.lnk

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": true,
6+
"trailingComma": "es5",
7+
"arrowParens": "avoid",
8+
"endOfLine": "auto"
9+
}

.vscode/settings.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.insertSpaces": true,
4+
"editor.renderWhitespace": "boundary",
5+
"editor.rulers": [140],
6+
"editor.formatOnSave": true,
7+
"files.encoding": "utf8",
8+
"files.trimTrailingWhitespace": true,
9+
"files.insertFinalNewline": true,
10+
"search.exclude": {
11+
"out/**": true,
12+
".next/**": true,
13+
"node_modules/**": true
14+
},
15+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
16+
"[javascript]": {
17+
"editor.formatOnSave": true
18+
},
19+
"[typescript]": {
20+
"editor.formatOnSave": true
21+
},
22+
"[typescriptreact]": {
23+
"editor.formatOnSave": true
24+
},
25+
"[markdown]": {
26+
"editor.formatOnSave": true
27+
}
28+
}

next-env.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/types/global" />

package.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "feid.dev",
3+
"version": "1.0.0",
4+
"description": "Source code for https://feid.dev/",
5+
"main": "N/A",
6+
"repository": "https://github.com/frontend-id/feid.dev.git",
7+
"author": "Resi Respati <[email protected]>",
8+
"license": "MIT",
9+
"private": true,
10+
"scripts": {
11+
"dev": "next",
12+
"build": "next build",
13+
"export": "next export",
14+
"start": "next start",
15+
"format": "prettier --write \"./**/*.{ts,tsx}\"",
16+
"lint": "eslint \"**/*.{ts,tsx}\" \"*.config.js\"",
17+
"test": "npm run type-check && npm run lint",
18+
"type-check": "tsc --noEmit"
19+
},
20+
"dependencies": {
21+
"@chakra-ui/core": "^1.0.0-rc.3",
22+
"@emotion/babel-preset-css-prop": "^10.0.27",
23+
"emotion": "^10.0.27",
24+
"emotion-server": "^10.0.27",
25+
"next": "^9.5.2",
26+
"react": "^16.13.1",
27+
"react-dom": "^16.13.1"
28+
},
29+
"devDependencies": {
30+
"@types/node": "^12.12.54",
31+
"@types/react": "^16.9.48",
32+
"@types/react-dom": "^16.9.8",
33+
"@typescript-eslint/eslint-plugin": "^3.10.1",
34+
"@typescript-eslint/parser": "^3.10.1",
35+
"eslint": "^7.7.0",
36+
"eslint-config-airbnb": "^18.2.0",
37+
"eslint-config-prettier": "^6.11.0",
38+
"eslint-plugin-import": "^2.22.0",
39+
"eslint-plugin-jsx-a11y": "^6.3.1",
40+
"eslint-plugin-prettier": "^3.1.4",
41+
"eslint-plugin-react": "^7.20.6",
42+
"eslint-plugin-react-hooks": "^4.1.0",
43+
"prettier": "^2.1.1",
44+
"typescript": "^4.0.2"
45+
}
46+
}

src/pages/_app.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as React from 'react';
2+
import { AppProps } from 'next/app';
3+
import Head from 'next/head';
4+
import { CacheProvider } from '@emotion/core';
5+
import { cache } from 'emotion';
6+
import { ChakraProvider } from '@chakra-ui/core';
7+
8+
export default function MyApp({ Component, pageProps }: AppProps) {
9+
return (
10+
<CacheProvider value={cache}>
11+
<Head>
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13+
<title>Next.js TypeScript Quickstart</title>
14+
</Head>
15+
<ChakraProvider resetCSS>
16+
<Component {...pageProps} />
17+
</ChakraProvider>
18+
</CacheProvider>
19+
);
20+
}

src/pages/_document.tsx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* eslint-disable react/no-danger */
2+
import * as React from 'react';
3+
import Document, { DocumentContext } from 'next/document';
4+
import { extractCritical } from 'emotion-server';
5+
6+
export default class MyDocument extends Document {
7+
static async getInitialProps(ctx: DocumentContext) {
8+
const initialProps = await Document.getInitialProps(ctx);
9+
const styles = extractCritical(initialProps.html);
10+
return {
11+
...initialProps,
12+
styles: (
13+
<>
14+
{initialProps.styles}
15+
<style
16+
data-emotion-css={styles.ids.join(' ')}
17+
dangerouslySetInnerHTML={{ __html: styles.css }}
18+
/>
19+
</>
20+
),
21+
};
22+
}
23+
}

src/pages/index.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from 'react';
2+
import { NextPage } from 'next';
3+
import { Box } from '@chakra-ui/core';
4+
5+
const IndexPage: NextPage = () => {
6+
return <Box>IndexPage</Box>;
7+
};
8+
9+
export default IndexPage;

tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"baseUrl": ".",
6+
"paths": {
7+
"~/*": ["src/*"]
8+
},
9+
"allowJs": true,
10+
"skipLibCheck": true,
11+
"strict": false,
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": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
22+
"exclude": ["node_modules"]
23+
}

0 commit comments

Comments
 (0)