Skip to content

Commit

Permalink
finish-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivadimko committed May 15, 2022
1 parent 947c2b1 commit a66d0ee
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 66 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#airbnb
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[{package.json,*.yml,*.graphql}]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"frontend/*.{js,ts,tsx}": [
"frontend/**/*.{js,ts,tsx}": [
"eslint --fix"
],
"cms/*.{js,ts,tsx}": [
Expand Down
2 changes: 2 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
module.exports = {
extends: [
'next/core-web-vitals',
'airbnb',
'airbnb-typescript',
'plugin:react-hooks/recommended',
],
parserOptions: {
project: `${__dirname}/tsconfig.json`,
},
rules: {
'react/function-component-definition': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
Expand Down
37 changes: 36 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
"@types/react": "18.0.9",
"@types/react-dom": "18.0.4",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"eslint": "8.15.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-next": "12.1.6",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"typescript": "4.6.4"
}
}
134 changes: 71 additions & 63 deletions frontend/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,85 @@ import Head from 'next/head';
import Image from 'next/image';
import styles from '@/styles/Home.module.css';

const Home: NextPage = () => {
var a = 1;
const Home: NextPage = () => (
<div className={styles.container}>
<Head>
<title>Create Next App</title>
<meta
name="description"
content="Generated by create next app"
/>
<link rel="icon" href="/favicon.ico" />
</Head>

console.log(a);
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to
{' '}
<a href="https://nextjs.org">Next.js!</a>
</h1>

<p className={styles.description}>
Get started by editing
{' '}
<code className={styles.code}>pages/index.tsx</code>
</p>

<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2>
<p>
Find in-depth information about Next.js features and
API.
</p>
</a>

<a href="https://nextjs.org/learn" className={styles.card}>
<h2>Learn &rarr;</h2>
<p>
Learn about Next.js in an interactive course with
quizzes!
</p>
</a>

return (
<div className={styles.container}>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</Head>

<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>

<p className={styles.description}>
Get started by editing{' '}
<code className={styles.code}>pages/index.tsx</code>
</p>

<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>

<a href="https://nextjs.org/learn" className={styles.card}>
<h2>Learn &rarr;</h2>
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>

<a
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
<h2>Deploy &rarr;</h2>
<p>
Instantly deploy your Next.js site to a public URL with Vercel.
</p>
</a>
</div>
</main>
<a
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
<p>
Discover and deploy boilerplate example Next.js
projects.
</p>
</a>

<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
Powered by{' '}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
<h2>Deploy &rarr;</h2>
<p>
Instantly deploy your Next.js site to a public URL
with Vercel.
</p>
</a>
</footer>
</div>
);
};
</div>
</main>

<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by
{' '}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
);

export default Home;

0 comments on commit a66d0ee

Please sign in to comment.