Skip to content

Commit 1ca8eaf

Browse files
committed
untested commit
This project isn't tested as seperated.
1 parent 7c47aba commit 1ca8eaf

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

+16079
-0
lines changed

.eslintrc.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": [
7+
"next",
8+
"next/core-web-vitals",
9+
"eslint:recommended",
10+
"prettier/react",
11+
"plugin:react/recommended",
12+
"plugin:prettier/recommended",
13+
"plugin:storybook/recommended"
14+
],
15+
"parser": "babel-eslint",
16+
"parserOptions": {
17+
"ecmaFeatures": { "jsx": true }
18+
},
19+
"plugins": ["react", "prettier"],
20+
"rules": {
21+
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
22+
"import/prefer-default-export": "off",
23+
"jsx-quotes": ["error", "prefer-single"],
24+
"prettier/prettier": "error"
25+
}
26+
}

.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
37+
#amplify-do-not-edit-begin
38+
amplify/\#current-cloud-backend
39+
amplify/.config/local-*
40+
amplify/logs
41+
amplify/mock-data
42+
amplify/backend/amplify-meta.json
43+
amplify/backend/.temp
44+
build/
45+
dist/
46+
node_modules/
47+
aws-exports.js
48+
awsconfiguration.json
49+
amplifyconfiguration.json
50+
amplifyconfiguration.dart
51+
amplify-build-config.json
52+
amplify-gradle-config.json
53+
amplifytools.xcconfig
54+
.secret-*
55+
**.sample
56+
#amplify-do-not-edit-end

.husky/pre-commit

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# https://paulintrognon.fr/blog/typescript-prettier-eslint-next-js
5+
6+
7+
#######################################################################################
8+
######################### IF YOU WANT TO USE JUST HUSKY ###############################
9+
#######################################################################################
10+
# https://typicode.github.io/husky/
11+
# Run the tsc command to make sure there are no TypeScript errors
12+
# Run the eslint command to make sure there are no ESLint errors
13+
# Format our code using prettier
14+
15+
# yarn tsc --noEmit && yarn eslint . && yarn prettier --write .
16+
17+
# Note: If you want to skip the check, you can add a --no-verify flag to your commit command.
18+
# For example: git commit --no-verify -m "Update README.md"
19+
#######################################################################################
20+
#######################################################################################
21+
22+
23+
#######################################################################################
24+
#################### IF YOU WANT TO USE HUSKY WITH LINT-STAGED ########################
25+
#######################################################################################
26+
27+
yarn lint-staged # this will only checks your code when necessary
28+
# (e.g. if one md or json file has been changed it will run just prettier command)
29+
30+
# do not forget to create lint-staged.config.js file
31+
# for linting and error checking configuration before commit
32+
33+
#######################################################################################
34+
#######################################################################################

.prettierrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"jsxSingleQuote": true
7+
}

.storybook/main.js

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
module.exports = {
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
staticDirs: ['../public'],
4+
addons: [
5+
'@storybook/addon-links',
6+
'@storybook/addon-essentials',
7+
'@storybook/addon-interactions',
8+
'@storybook/preset-scss',
9+
{
10+
/**
11+
* Fix Storybook issue with PostCSS@8
12+
* @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085
13+
*/
14+
name: '@storybook/addon-postcss',
15+
options: {
16+
cssLoaderOptions: {
17+
// When you have splitted your css over multiple files
18+
// and use @import('./other-styles.css')
19+
importLoaders: 1,
20+
},
21+
postcssLoaderOptions: {
22+
implementation: require('postcss'),
23+
},
24+
},
25+
},
26+
],
27+
framework: '@storybook/react',
28+
core: {
29+
builder: '@storybook/builder-webpack5',
30+
},
31+
webpackFinal: async (config) => {
32+
/**
33+
* Add support for alias-imports
34+
* @see https://github.com/storybookjs/storybook/issues/11989#issuecomment-715524391
35+
*/
36+
config.resolve.alias = {
37+
...config.resolve?.alias,
38+
'@': [
39+
require('path').resolve(__dirname, '../src/'),
40+
require('path').resolve(__dirname, '../'),
41+
],
42+
}
43+
44+
/**
45+
* Fixes font import with /
46+
* @see https://github.com/storybookjs/storybook/issues/12844#issuecomment-867544160
47+
*/
48+
config.resolve.roots = [
49+
require('path').resolve(__dirname, '../public'),
50+
'node_modules',
51+
]
52+
53+
config.module.rules.push({
54+
test: /\.s[ac]ss$/,
55+
use: [
56+
{
57+
loader: 'postcss-loader',
58+
options: {
59+
postcssOptions: {
60+
plugins: [require('tailwindcss'), require('autoprefixer')],
61+
},
62+
},
63+
},
64+
{
65+
loader: 'sass-loader',
66+
options: {
67+
implementation: require('sass'),
68+
},
69+
},
70+
],
71+
include: require('path').resolve(__dirname, '../'),
72+
})
73+
74+
return config
75+
},
76+
}

.storybook/preview.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
import '../src/styles/globals.scss';
3+
import * as NextImage from 'next/image';
4+
5+
const OriginalNextImage = NextImage.default;
6+
7+
Object.defineProperty(NextImage, 'default', {
8+
configurable: true,
9+
value: (props) => <OriginalNextImage {...props} unoptimized />,
10+
});
11+
12+
export const parameters = {
13+
actions: { argTypesRegex: '^on[A-Z].*' },
14+
controls: {
15+
matchers: {
16+
color: /(background|color)$/i,
17+
date: /Date$/,
18+
},
19+
},
20+
previewTabs: {
21+
'storybook/docs/panel': { index: -1 },
22+
},
23+
}

.vscode/settings.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"files.exclude": {
3+
"amplify/.config": true,
4+
"amplify/**/*-parameters.json": true,
5+
"amplify/**/amplify.state": true,
6+
"amplify/**/transform.conf.json": true,
7+
"amplify/#current-cloud-backend": true,
8+
"amplify/backend/amplify-meta.json": true,
9+
"amplify/backend/awscloudformation": true
10+
},
11+
"compile-hero.disable-compile-files-on-did-save-code": true,
12+
"scss.lint.unknownAtRules": "ignore",
13+
"editor.codeActionsOnSave": {
14+
"source.fixAll.eslint": false
15+
},
16+
"editor.formatOnSave": true, // Tell VSCode to format files on save
17+
"editor.defaultFormatter": "esbenp.prettier-vscode" // Tell VSCode to use Prettier as default file formatter
18+
}

0 commit comments

Comments
 (0)