Skip to content

Commit 669b979

Browse files
committed
Code refactoring & update package use 🎉
1 parent 9065b07 commit 669b979

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1847
-1515
lines changed

.eslintrc.json

+21-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"plugin:react-hooks/recommended",
1414
"next/core-web-vitals"
1515
],
16-
"overrides": [],
1716
"parser": "@typescript-eslint/parser",
1817
"parserOptions": {
1918
"ecmaVersion": "latest",
@@ -27,12 +26,19 @@
2726
"version": "detect"
2827
}
2928
},
30-
"plugins": ["react", "@typescript-eslint", "import", "prettier", "@next/eslint-plugin-next"],
29+
"plugins": [
30+
"react",
31+
"react-refresh",
32+
"import",
33+
"prettier",
34+
"@next/eslint-plugin-next",
35+
"@typescript-eslint"
36+
],
3137
"rules": {
3238
"indent": "off",
33-
"linebreak-style": ["error", "unix"],
34-
"quotes": ["error", "double"],
35-
"semi": ["error", "always"],
39+
"no-console": "warn",
40+
"quotes": "error",
41+
"semi": "error",
3642
"import/order": [
3743
"error",
3844
{
@@ -43,12 +49,18 @@
4349
"newlines-between": "always"
4450
}
4551
],
46-
"react/prop-types": "off",
47-
"react/jsx-uses-react": "off",
4852
"react/react-in-jsx-scope": "off",
53+
"react-refresh/only-export-components": "warn",
4954
"react-hooks/rules-of-hooks": "error",
50-
"react-hooks/exhaustive-deps": "warn",
5155
"@typescript-eslint/no-var-requires": 0,
5256
"prettier/prettier": ["error", { "endOfLine": "auto" }, { "usePrettierrc": true }]
53-
}
57+
},
58+
"overrides": [
59+
{
60+
"files": ["app/page.tsx"],
61+
"rules": {
62+
"no-console": "off"
63+
}
64+
}
65+
]
5466
}

.husky/pre-commit

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

.husky/pre-push

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
#npm run test
1+
# yarn test

.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ node_modules
55
.idea
66
assets
77
.git
8-
pages
8+
app
99
styles
1010
.next
1111
.rollup.cache

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ We currently use `next.js` as server for live testing.
4949

5050
You can run the `dev` script and open your browser to `http://localhost:8888`.
5151

52-
See complete `props` usage in `pages/index.js` file.
52+
See complete `props` usage in `app/page.tsx` file.
5353

5454
**Using yarn**
5555

app/layout.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { ReactNode } from "react";
2+
import "../styles/globals.css";
3+
4+
interface Props {
5+
children: ReactNode;
6+
}
7+
8+
const RootLayout = (props: Props) => {
9+
const { children } = props;
10+
11+
return (
12+
<html lang="en">
13+
<body>{children}</body>
14+
</html>
15+
);
16+
};
17+
18+
export default RootLayout;

0 commit comments

Comments
 (0)