-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 953a385
Showing
17 changed files
with
4,181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ["plugin:react/recommended", "airbnb", "prettier"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
}, | ||
plugins: ["react", "@typescript-eslint"], | ||
settings: { | ||
"import/resolver": { | ||
typescript: {}, | ||
}, | ||
}, | ||
rules: { | ||
"no-undef": "off", | ||
"no-use-before-define": "off", | ||
"import/extensions": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"arrow-body-style": "off", | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ extensions: [".js", ".jsx", ".tsx", ".ts", ".d.ts"] }, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "next/core-web-vitals", | ||
"globals": { | ||
"React": true, | ||
"JSX": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
echo '🏗️👷 Styling, testing and building your project before committing' | ||
|
||
# Check Prettier standards | ||
yarn check-format || | ||
( | ||
echo '🤢🤮🤢🤮 Its FOKING RAW - Your styling looks disgusting. 🤢🤮🤢🤮 | ||
Prettier Check Failed. Run yarn format, add changes and try commit again.'; | ||
false; | ||
) | ||
|
||
# Check ESLint Standards | ||
yarn check-lint || | ||
( | ||
echo '😤🏀👋😤 Get that weak shit out of here! 😤🏀👋😤 | ||
ESLint Check Failed. Make the required changes listed above, add changes and try to commit again.' | ||
false; | ||
) | ||
|
||
# Check tsconfig standards | ||
yarn check-types || | ||
( | ||
echo '🤡😂❌🤡 Failed Type check. 🤡😂❌🤡 | ||
Are you seriously trying to write that? Make the changes required above.' | ||
false; | ||
) | ||
|
||
# If everything passes... Now we can commit | ||
echo '🤔🤔🤔🤔... Alright.... Code looks good to me... Trying to build now. 🤔🤔🤔🤔' | ||
|
||
yarn build || | ||
( | ||
echo '❌👷🔨❌ Better call Bob... Because your build failed ❌👷🔨❌ | ||
Next build failed: View the errors above to see why. | ||
' | ||
false; | ||
) | ||
|
||
# If everything passes... Now we can commit | ||
echo '✅✅✅✅ You win this time... I am committing this now. ✅✅✅✅' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true, | ||
"source.fixAll.format": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
presets: ["next/babel"], | ||
plugins: [["styled-components", { ssr: true }]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
reactStrictMode: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "sugarpix", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint", | ||
"prepare": "husky install", | ||
"check-types": "tsc --pretty --noEmit", | ||
"check-format": "prettier --check .", | ||
"check-lint": "eslint . --ext ts --ext tsx --ext js", | ||
"format": "prettier --write .", | ||
"test-all": "yarn check-format && yarn check-lint && yarn check-types && yarn build" | ||
}, | ||
"dependencies": { | ||
"next": "11.1.2", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"styled-components": "^5.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.9.1", | ||
"@types/react": "^17.0.20", | ||
"@types/styled-components": "^5.1.14", | ||
"@typescript-eslint/eslint-plugin": "^4.31.0", | ||
"@typescript-eslint/parser": "^4.31.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-next": "11.1.2", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-import-resolver-typescript": "^2.4.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.25.1", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"husky": "^7.0.0", | ||
"lint-staged": "^11.1.2", | ||
"prettier": "^2.4.0", | ||
"typescript": "^4.4.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import { AppProps } from "next/app"; | ||
|
||
import GlobalStyle from "../styles/global"; | ||
|
||
const MyApp: React.FC<AppProps> = ({ Component, pageProps }) => { | ||
return ( | ||
<> | ||
<Component {...pageProps} /> | ||
<GlobalStyle /> | ||
</> | ||
); | ||
}; | ||
|
||
export default MyApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from "react"; | ||
import Document, { | ||
DocumentInitialProps, | ||
DocumentContext, | ||
Html, | ||
Head, | ||
Main, | ||
NextScript, | ||
} from "next/document"; | ||
import { ServerStyleSheet } from "styled-components"; | ||
|
||
export default class MyDocument extends Document { | ||
static async getInitialProps( | ||
ctx: DocumentContext | ||
): Promise<DocumentInitialProps> { | ||
const sheet = new ServerStyleSheet(); | ||
const originalRenderPage = ctx.renderPage; | ||
|
||
try { | ||
ctx.renderPage = () => | ||
originalRenderPage({ | ||
enhanceApp: (App) => (props) => | ||
sheet.collectStyles(<App {...props} />), | ||
}); | ||
|
||
const initialProps = await Document.getInitialProps(ctx); | ||
return { | ||
...initialProps, | ||
styles: ( | ||
<> | ||
{initialProps.styles} | ||
{sheet.getStyleElement()} | ||
</> | ||
), | ||
}; | ||
} finally { | ||
sheet.seal(); | ||
} | ||
} | ||
|
||
render(): JSX.Element { | ||
return ( | ||
<Html lang="pt"> | ||
<Head> | ||
<meta charSet="utf-8" /> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import Head from "next/head"; | ||
|
||
import { Page } from "../styles/global"; | ||
|
||
/** | ||
* Home Page | ||
* @return {JSX.Element} | ||
*/ | ||
|
||
export default function Home(): JSX.Element { | ||
return ( | ||
<Page> | ||
<Head> | ||
<title>Home | Arthur Sena</title> | ||
</Head> | ||
<h1> | ||
SITE DO <a href="https://linkedin.com/in/senaarth">SENAARTH</a> | ||
</h1> | ||
</Page> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import styled, { createGlobalStyle } from "styled-components"; | ||
|
||
export const Page = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
width: 100%; | ||
`; | ||
|
||
export default createGlobalStyle` | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
html, body, #__next { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve" | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "babel.config.js"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.
953a385
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: