Skip to content

Commit 69cbfcd

Browse files
committed
Initial commit
0 parents  commit 69cbfcd

Some content is hidden

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

45 files changed

+28458
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/node_modules/**
2+
**/dist/**
3+
**/storybook-static/**
4+
**/coverage/**
5+
**/build/**
6+
**/.git/**
7+
**/public/**
8+
serviceWorker.ts

.eslintrc.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3+
extends: [
4+
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
5+
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from @typescript-eslint/eslint-plugin
6+
"plugin:react-hooks/recommended",
7+
],
8+
plugins: ["@typescript-eslint"],
9+
parserOptions: {
10+
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
11+
sourceType: "module", // Allows for the use of imports
12+
ecmaFeatures: {
13+
jsx: false, // Allows for the parsing of JSX
14+
destructuring: true,
15+
},
16+
},
17+
rules: {
18+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
19+
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
20+
"@typescript-eslint/no-empty-interface": 0,
21+
// 'no-unused-vars': 'off',
22+
// '@typescript-eslint/no-unused-vars': [
23+
// 'error',
24+
// {
25+
// varsIgnorePattern: '^_',
26+
// ignoreRestSiblings: false,
27+
// },
28+
// ],
29+
"react/display-name": ["off"],
30+
"@typescript-eslint/camelcase": "off",
31+
"no-empty-function": "off",
32+
"@typescript-eslint/no-empty-function": ["off"],
33+
"@typescript-eslint/naming-convention": [
34+
"error",
35+
{
36+
selector: "property",
37+
format: ["camelCase", "snake_case", "PascalCase"],
38+
filter: {
39+
// you can expand this regex as you find more cases that require quoting that you want to allow
40+
regex: "_",
41+
match: false,
42+
},
43+
},
44+
],
45+
"react/prop-types": 0,
46+
},
47+
settings: {
48+
react: {
49+
version: "detect", // Tells eslint-plugin-react to automatically detect the version of React to use
50+
},
51+
},
52+
};

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/labeler-config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Add 'chore' label to any root file changes
2+
chore:
3+
- ./*
4+
5+
# Add 'test' label to any change to *.spec.js files within the source dir
6+
test:
7+
- src/**/*.test.*
8+
9+
# Related to github actions pipelines
10+
pipeline:
11+
- .github/**/*
12+
13+
# Related to IDE
14+
lint:
15+
- .vscode/**/*
16+
- .prettierrc.js
17+
- .eslintignore
18+
- .editorconfig
19+
- commitlint.config.js
20+
21+
# Related to Docs
22+
docs:
23+
- ./**/*.md
24+
25+
# Docker
26+
docker:
27+
- Dockerfile.*
28+
- docker*

.github/pr-labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
feature: ["feature/*", "feat/*"]
2+
fix: fix/*
3+
chore: chore/*
4+
docs: docs/*
5+
style: style/*
6+
refactor: refactor/*
7+
test: test/*

.github/workflows/deploy.yml

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
name: Build uselocalstorage react frontend
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Discord notification - start build
13+
uses: rjstone/discord-webhook-notify@v1.0.4
14+
with:
15+
severity: info
16+
text: ${{github.repository}} - ${{github.workflow}}
17+
details: "- **Pipeline:** https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
18+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
19+
20+
- name: Checkout Repo
21+
uses: actions/checkout@master
22+
23+
- name: Install Dependencies
24+
run: npm run i-all
25+
26+
- name: Check lint
27+
run: yarn lint
28+
29+
# - name: Check tests
30+
# run: yarn test
31+
32+
- name: Build
33+
run: npm run build:all
34+
35+
- name: "Automated Version Bump"
36+
uses: "phips28/gh-action-bump-version@master"
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
skip-tag: "true"
41+
42+
- name: Generate dist artifact for package
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: dist-folder
46+
path: dist/**/*
47+
48+
- name: Archive playground Artifact
49+
uses: actions/upload-artifact@master
50+
with:
51+
name: playground-artifact
52+
path: |
53+
./playground/build
54+
./playground/firebase.json
55+
./playground/.firebaserc
56+
if-no-files-found: error
57+
58+
- name: Discord notification - finished build (Success)
59+
if: success()
60+
uses: rjstone/discord-webhook-notify@v1.0.4
61+
with:
62+
severity: success
63+
description: Finished the build pipeline, starting deploys
64+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
65+
66+
- name: Discord notification - finished build (error)
67+
if: failure()
68+
uses: rjstone/discord-webhook-notify@v1.0.4
69+
with:
70+
severity: error
71+
description: Build uselocalstorage react frontend failed
72+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
73+
74+
- name: Discord notification - finished build (cancelled)
75+
if: cancelled()
76+
uses: rjstone/discord-webhook-notify@v1.0.4
77+
with:
78+
severity: warn
79+
description: Build uselocalstorage react frontend cancelled
80+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
81+
82+
publish:
83+
name: Generates new release and publish
84+
needs: [build]
85+
runs-on: ubuntu-latest
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
89+
steps:
90+
- name: Checkout Repo
91+
uses: actions/checkout@master
92+
93+
- uses: actions/download-artifact@v2
94+
with:
95+
name: dist-folder
96+
path: dist
97+
98+
- name: Publish on NPM
99+
uses: mikeal/merge-release@master
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
103+
104+
- name: release on Github
105+
uses: rymndhng/release-on-push-action@master
106+
with:
107+
bump_version_scheme: patch
108+
109+
- name: Notify discord
110+
if: success()
111+
uses: rjstone/discord-webhook-notify@v1.0.4
112+
with:
113+
severity: success
114+
description: Deploy finished - new release deployed
115+
details: |
116+
**- Tag name:** ${{ steps.release.outputs.tag_name }}
117+
**- Release version:** ${{ steps.release.outputs.version }}
118+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
119+
120+
- name: Discord notification - Github generated release (error)
121+
if: failure()
122+
uses: rjstone/discord-webhook-notify@v1.0.4
123+
with:
124+
severity: error
125+
description: Github generated release failed
126+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
127+
128+
- name: Discord notification - Github generated release (cancelled)
129+
if: cancelled()
130+
uses: rjstone/discord-webhook-notify@v1.0.4
131+
with:
132+
severity: warn
133+
description: Github generated release cancelled
134+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
135+
136+
deploy-firebase:
137+
name: Deploy on Firebase
138+
needs: [publish]
139+
runs-on: ubuntu-latest
140+
steps:
141+
- name: Download Playground Artifact
142+
uses: actions/download-artifact@master
143+
with:
144+
name: playground-artifact
145+
146+
- name: Deploy to Firebase
147+
uses: w9jds/firebase-action@master
148+
with:
149+
args: deploy
150+
env:
151+
FIREBASE_TOKEN: ${{ secrets.USELOCALSTORAGE_FIREBASE_TOKEN }}
152+
153+
- name: Discord notification - deploy (success)
154+
if: success()
155+
uses: rjstone/discord-webhook-notify@v1.0.4
156+
with:
157+
severity: info
158+
description: Deploy finished - uselocalstorage
159+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
160+
161+
- name: Discord notification - deploy (error)
162+
if: failure()
163+
uses: rjstone/discord-webhook-notify@v1.0.4
164+
with:
165+
severity: error
166+
description: Deploy failed
167+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}
168+
169+
- name: Discord notification - deploy (cancelled)
170+
if: cancelled()
171+
uses: rjstone/discord-webhook-notify@v1.0.4
172+
with:
173+
severity: warn
174+
description: Deploy cancelled
175+
webhookUrl: ${{ secrets.DISCORD_CHANNEL_WEBHOOK }}

.github/workflows/labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
pull_request:
4+
types: [assigned, opened, synchronize, reopened, edited, ready_for_review]
5+
6+
jobs:
7+
triage:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/labeler@main
11+
with:
12+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
13+
configuration-path: .github/labeler-config.yml
14+
sync-labels: true

.github/workflows/pr-labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PR Labeler
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
pr-labeler:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: TimonVS/pr-labeler-action@v3
11+
with:
12+
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
# production
12+
/build
13+
/dist
14+
15+
# misc
16+
.DS_Store
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
27+
## Playground
28+
# dependencies
29+
/playground/node_modules
30+
/playground/.pnp
31+
/playground/.pnp.js
32+
33+
# testing
34+
/playground/coverage
35+
36+
# production
37+
/playground/build
38+
/playground/dist
39+
40+
# misc
41+
/playground/.DS_Store
42+
/playground/.env.local
43+
/playground/.env.development.local
44+
/playground/.env.test.local
45+
/playground/.env.production.local
46+
47+
/playground/npm-debug.log*
48+
/playground/yarn-debug.log*
49+
/playground/yarn-error.log*

0 commit comments

Comments
 (0)