Skip to content

Commit bbc5c7d

Browse files
authored
Initial project (#2)
* Bootstrap project with create-next-app * Add license.md * Update .gitignore & .gitattributes * Update Eslint config * Setup Husky & Lint Staged close #1 #2
1 parent e3e48cb commit bbc5c7d

22 files changed

+3867
-0
lines changed

.eslintignore

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# git
4+
/.git
5+
/.github
6+
/.gitlab
7+
8+
# dependencies
9+
/node_modules
10+
/.pnp
11+
.pnp.js
12+
13+
# testing
14+
/coverage
15+
16+
# production
17+
/build
18+
/dist
19+
/.next
20+
21+
# env
22+
!.env.sample
23+
.env*
24+
25+
# misc
26+
.DS_Store
27+
*.pem
28+
29+
# debug
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
.pnpm-debug.log*
34+
35+
# storybook
36+
!.storybook
37+
38+
# others
39+
.eslintrc.cjs
40+
.lintstagedrc.cjs
41+
.prettierrc.js

.eslintrc.cjs

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/** @type {import('eslint').ESLint.ConfigData} */
2+
3+
module.exports = {
4+
globals: {
5+
React: true,
6+
JSX: true,
7+
},
8+
extends: [
9+
'airbnb',
10+
'airbnb-typescript',
11+
'airbnb/hooks',
12+
'eslint:recommended',
13+
'next/core-web-vitals',
14+
'plugin:prettier/recommended',
15+
'plugin:react-hooks/recommended',
16+
'plugin:react/recommended',
17+
],
18+
parser: '@typescript-eslint/parser',
19+
parserOptions: {
20+
ecmaFeatures: {
21+
jsx: true,
22+
tsx: true,
23+
},
24+
ecmaVersion: 'latest',
25+
sourceType: 'module',
26+
project: './tsconfig.json',
27+
warnOnUnsupportedTypeScriptVersion: false,
28+
},
29+
plugins: ['prettier', 'react-hooks', 'react'],
30+
rules: {
31+
'arrow-body-style': 'off',
32+
'comma-dangle': 'off',
33+
'max-len': 'off',
34+
'no-alert': 'off',
35+
'no-console': 'off',
36+
'no-empty': 'warn',
37+
'no-plusplus': 'off',
38+
'no-unused-vars': [
39+
'warn',
40+
{
41+
ignoreRestSiblings: false,
42+
args: 'none',
43+
},
44+
],
45+
'no-restricted-exports': 'off',
46+
47+
// prettier
48+
'prettier/prettier': 'error',
49+
50+
// react-hooks
51+
'react-hooks/exhaustive-deps': 'warn',
52+
'react-hooks/rules-of-hooks': 'error',
53+
54+
// react
55+
'react/button-has-type': 'warn',
56+
'react/destructuring-assignment': 'off',
57+
'react/display-name': 'off',
58+
'react/forbid-prop-types': 'off',
59+
'react/function-component-definition': 'off',
60+
'react/jsx-filename-extension': 'off',
61+
'react/jsx-key': 'warn',
62+
'react/jsx-no-bind': 'off',
63+
'react/jsx-no-useless-fragment': 'warn',
64+
'react/jsx-one-expression-per-line': 'off',
65+
'react/jsx-pascal-case': 'warn',
66+
'react/jsx-props-no-spreading': 'off',
67+
'react/no-array-index-key': 'off',
68+
'react/no-children-prop': 'off',
69+
'react/no-inline-styles': 'off',
70+
'react/no-unescaped-entities': 'off',
71+
'react/no-unknown-property': 'off',
72+
'react/no-unused-prop-types': 'warn',
73+
'react/prop-types': 'off',
74+
'react/react-in-jsx-scope': 'off',
75+
'react/require-default-props': 'off',
76+
'react/self-closing-comp': 'warn',
77+
},
78+
};

.gitattributes

+215
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
## GITATTRIBUTES FOR WEB PROJECTS
2+
#
3+
# These settings are for any web project.
4+
#
5+
# Details per file setting:
6+
# text These files should be normalized (i.e. convert CRLF to LF).
7+
# binary These files are binary and should be left untouched.
8+
#
9+
# Note that binary is a macro for -text -diff.
10+
######################################################################
11+
12+
# Auto detect
13+
## Handle line endings automatically for files detected as
14+
## text and leave all files detected as binary untouched.
15+
## This will handle all files NOT defined below.
16+
* text=auto
17+
18+
# Source code
19+
*.bash text eol=lf
20+
*.bat text eol=crlf
21+
*.cmd text eol=crlf
22+
*.coffee text
23+
*.css text eol=lf diff=css
24+
*.htm text diff=html
25+
*.html text diff=html
26+
*.inc text
27+
*.ini text
28+
*.js text eol=lf
29+
*.json text eol=lf
30+
*.jsx text eol=lf
31+
*.less text eol=lf
32+
*.ls text eol=lf
33+
*.map text eol=lf -diff
34+
*.od text eol=lf
35+
*.onlydata text eol=lf
36+
*.php text eol=lf diff=php
37+
*.pl text eol=lf
38+
*.ps1 text eol=crlf
39+
*.py text eol=lf diff=python
40+
*.rb text eol=lf diff=ruby
41+
*.sass text eol=lf
42+
*.scm text eol=lf
43+
*.scss text diff=css
44+
*.sh text eol=lf
45+
.husky/* text eol=lf
46+
*.sql text eol=lf
47+
*.styl text eol=lf
48+
*.tag text eol=lf
49+
*.ts text eol=lf
50+
*.tsx text eol=lf
51+
*.xml text eol=lf
52+
*.xhtml text diff=html
53+
54+
# Docker
55+
Dockerfile text
56+
57+
# Documentation
58+
*.ipynb text eol=lf
59+
*.markdown text eol=lf diff=markdown
60+
*.md text eol=lf diff=markdown
61+
*.mdwn text eol=lf diff=markdown
62+
*.mdown text eol=lf diff=markdown
63+
*.mkd text eol=lf diff=markdown
64+
*.mkdn text eol=lf diff=markdown
65+
*.mdtxt text eol=lf
66+
*.mdtext text eol=lf
67+
*.txt text eol=lf
68+
AUTHORS text eol=lf
69+
CHANGELOG text eol=lf
70+
CHANGES text eol=lf
71+
CONTRIBUTING text eol=lf
72+
COPYING text eol=lf
73+
copyright text eol=lf
74+
*COPYRIGHT* text eol=lf
75+
INSTALL text eol=lf
76+
license text eol=lf
77+
LICENSE text eol=lf
78+
NEWS text eol=lf
79+
readme text eol=lf
80+
*README* text eol=lf
81+
TODO text eol=lf
82+
83+
# Templates
84+
*.dot text eol=lf
85+
*.ejs text eol=lf
86+
*.erb text eol=lf
87+
*.haml text eol=lf
88+
*.handlebars text eol=lf
89+
*.hbs text eol=lf
90+
*.hbt text eol=lf
91+
*.jade text eol=lf
92+
*.latte text eol=lf
93+
*.mustache text eol=lf
94+
*.njk text eol=lf
95+
*.phtml text eol=lf
96+
*.svelte text eol=lf
97+
*.tmpl text eol=lf
98+
*.tpl text eol=lf
99+
*.twig text eol=lf
100+
*.vue text eol=lf
101+
102+
# Configs
103+
*.cnf text eol=lf -diff
104+
*.conf text eol=lf -diff
105+
*.config text eol=lf -diff
106+
.editorconfig text eol=lf -diff
107+
.env text eol=lf -diff
108+
.gitattributes text eol=lf -diff
109+
.gitconfig text eol=lf -diff
110+
.htaccess text eol=lf -diff
111+
*.lock text eol=lf -diff
112+
package.json text eol=lf
113+
package-lock.json text eol=lf -diff
114+
pnpm-lock.yaml text eol=lf -diff
115+
.prettierrc text eol=lf -diff
116+
yarn.lock text eol=lf -diff
117+
*.toml text eol=lf -diff
118+
*.yaml text eol=lf -diff
119+
*.yml text eol=lf -diff
120+
browserslist text eol=lf -diff
121+
Makefile text eol=lf -diff
122+
makefile text eol=lf -diff
123+
124+
# Heroku
125+
Procfile text eol=lf
126+
127+
# Graphics
128+
*.ai binary
129+
*.bmp binary
130+
*.eps binary
131+
*.gif binary
132+
*.gifv binary
133+
*.ico binary
134+
*.jng binary
135+
*.jp2 binary
136+
*.jpg binary
137+
*.jpeg binary
138+
*.jpx binary
139+
*.jxr binary
140+
*.pdf binary
141+
*.png binary
142+
*.psb binary
143+
*.psd binary
144+
# SVG treated as an asset (binary) by default.
145+
*.svg text
146+
# If you want to treat it as binary,
147+
# use the following line instead.
148+
# *.svg binary
149+
*.svgz binary
150+
*.tif binary
151+
*.tiff binary
152+
*.wbmp binary
153+
*.webp binary
154+
155+
# Audio
156+
*.kar binary
157+
*.m4a binary
158+
*.mid binary
159+
*.midi binary
160+
*.mp3 binary
161+
*.ogg binary
162+
*.ra binary
163+
164+
# Video
165+
*.3gpp binary
166+
*.3gp binary
167+
*.as binary
168+
*.asf binary
169+
*.asx binary
170+
*.avi binary
171+
*.fla binary
172+
*.flv binary
173+
*.m4v binary
174+
*.mng binary
175+
*.mov binary
176+
*.mp4 binary
177+
*.mpeg binary
178+
*.mpg binary
179+
*.ogv binary
180+
*.swc binary
181+
*.swf binary
182+
*.webm binary
183+
184+
# Archives
185+
*.7z binary
186+
*.gz binary
187+
*.jar binary
188+
*.rar binary
189+
*.tar binary
190+
*.zip binary
191+
192+
# Fonts
193+
*.ttf binary
194+
*.eot binary
195+
*.otf binary
196+
*.woff binary
197+
*.woff2 binary
198+
199+
# Executables
200+
*.exe binary
201+
*.pyc binary
202+
203+
# RC files (like .babelrc or .eslintrc)
204+
*.*rc text eol=lf
205+
206+
# Ignore files (like .npmignore or .gitignore)
207+
*.*ignore text eol=lf
208+
209+
#
210+
# Exclude files from exporting
211+
#
212+
213+
.gitattributes export-ignore
214+
.gitignore export-ignore
215+
.gitkeep export-ignore

.gitignore

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
/.nyc_output
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# env files
29+
.env*
30+
!.env.local
31+
!.env.sample
32+
33+
# vercel
34+
.vercel
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
# IDEs and editors
40+
/.idea
41+
.project
42+
.classpath
43+
.c9/
44+
*.launch
45+
.settings/
46+
*.sublime-workspace
47+
48+
# IDE - VSCode
49+
.vscode/*
50+
!.vscode/settings.json
51+
!.vscode/tasks.json
52+
!.vscode/launch.json
53+
!.vscode/extensions.json

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx tsc --noEmit && npx lint-staged

0 commit comments

Comments
 (0)