Skip to content

Commit 2b099d4

Browse files
authored
Merge pull request #239 from ruisaraiva19/develop
chore: release
2 parents 717e586 + 018072c commit 2b099d4

File tree

109 files changed

+6217
-3223
lines changed

Some content is hidden

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

109 files changed

+6217
-3223
lines changed

.all-contributorsrc

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
"code",
5252
"review"
5353
]
54+
},
55+
{
56+
"login": "miguellteixeira",
57+
"name": "Miguel Teixeira",
58+
"avatar_url": "https://avatars1.githubusercontent.com/u/17954325?v=4",
59+
"profile": "https://github.com/miguellteixeira",
60+
"contributions": [
61+
"code",
62+
"review"
63+
]
5464
}
5565
],
5666
"contributorsPerLine": 7

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.next
3+
storybook-static

.eslintrc.json

+18-4
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,41 @@
22
"parser": "@typescript-eslint/parser",
33
"extends": [
44
"react-app",
5-
"prettier",
5+
"plugin:prettier/recommended",
66
"prettier/react",
77
"prettier/@typescript-eslint",
88
"plugin:react/recommended",
9+
"plugin:react-hooks/recommended",
910
"plugin:@typescript-eslint/recommended",
1011
"plugin:@typescript-eslint/recommended-requiring-type-checking"
1112
],
12-
"plugins": ["@typescript-eslint", "react", "react-hooks", "prettier"],
1313
"parserOptions": {
1414
"project": "./tsconfig.json"
1515
},
1616
"rules": {
1717
"prettier/prettier": "error",
1818
"react/prop-types": "off",
1919
"no-param-reassign": "off",
20-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".ts", "tsx"] }],
20+
"react/jsx-filename-extension": [
21+
1,
22+
{
23+
"extensions": [".js", ".ts", ".tsx"]
24+
}
25+
],
2126
"@typescript-eslint/explicit-function-return-type": "off",
2227
"@typescript-eslint/explicit-member-accessibility": "off",
2328
"@typescript-eslint/member-delimiter-style": "off",
2429
"@typescript-eslint/no-explicit-any": "off",
25-
"@typescript-eslint/ban-ts-ignore": "off"
30+
"@typescript-eslint/ban-ts-ignore": "off",
31+
"@typescript-eslint/ban-ts-comment": "off",
32+
"@typescript-eslint/explicit-module-boundary-types": "off",
33+
"@typescript-eslint/no-unsafe-call": "off",
34+
"@typescript-eslint/no-extra-semi": "off",
35+
"@typescript-eslint/no-unsafe-assignment": "off",
36+
"@typescript-eslint/no-unsafe-return": "off",
37+
"@typescript-eslint/no-floating-promises": "off",
38+
"@typescript-eslint/no-unsafe-member-access": "off",
39+
"@typescript-eslint/unbound-method": "off"
2640
},
2741
"overrides": [
2842
{

.github/workflows/commitlint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: pull_request
44

55
jobs:
66
lint:
7+
name: Lint commit messages
78
runs-on: ubuntu-latest
89
steps:
910
- name: Checkout

.github/workflows/lint.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ on: pull_request
44

55
jobs:
66
code:
7+
name: Lint code
78
runs-on: ubuntu-latest
89
steps:
910
- name: Checkout
1011
uses: actions/checkout@v2
1112
- name: Use Node.js 12
1213
uses: actions/setup-node@v1
1314
with:
14-
node-version: 12.x
15+
node-version: "12"
1516
- name: Install dependencies
16-
run: yarn install --frozen-lockfile &> /dev/null
17-
- name: Lint
18-
run: yarn lint
17+
uses: bahmutov/npm-install@v1
18+
- name: Lint Scripts
19+
run: yarn lint:scripts
20+
- name: Lint CSS
21+
run: yarn lint:styles

.github/workflows/release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ on:
77

88
jobs:
99
release:
10+
name: Semantic Release
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout
1314
uses: actions/checkout@v2
1415
- name: Use Node.js 12
1516
uses: actions/setup-node@v1
1617
with:
17-
node-version: 12.x
18+
node-version: "12"
1819
- name: Install dependencies
19-
run: yarn install --frozen-lockfile &> /dev/null
20+
uses: bahmutov/npm-install@v1
2021
- name: Build static assets
2122
run: yarn build
2223
- name: Semantic Release

.github/workflows/tests.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on: pull_request
4+
5+
jobs:
6+
wait_deploy:
7+
name: Wait Vercel Deploy
8+
runs-on: ubuntu-latest
9+
outputs:
10+
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
11+
steps:
12+
- name: Wait for Vercel preview deployment to be ready
13+
uses: patrickedqvist/wait-for-vercel-preview@master
14+
id: waitForVercelPreviewDeployment
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
max_timeout: 120
18+
19+
test_e2e:
20+
name: Run Cypress
21+
needs: wait_deploy
22+
runs-on: ubuntu-16.04
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Run Cypress
26+
uses: cypress-io/github-action@v1
27+
with:
28+
config: baseUrl=${{ needs.wait_deploy.outputs.preview_url }}
29+
wait-on: ${{ needs.wait_deploy.outputs.preview_url }}
30+
wait-on-timeout: 120
31+
# after the test run completes
32+
# store videos and any screenshots
33+
# NOTE: screenshots will be generated only if E2E test failed
34+
# thus we store screenshots only on failures
35+
- uses: actions/upload-artifact@v2
36+
if: failure()
37+
with:
38+
name: cypress-screenshots
39+
path: cypress/screenshots
40+
# Test run video was always captured, so this action uses "always()" condition
41+
- uses: actions/upload-artifact@v2
42+
if: always()
43+
with:
44+
name: cypress-videos
45+
path: cypress/videos

.gitignore

+151-21
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,162 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
1+
# Created by https://www.toptal.com/developers/gitignore/api/now,yarn,node,macos
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=now,yarn,node,macos
23

3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
4+
### macOS ###
5+
# General
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
79

8-
# testing
9-
/coverage
10+
# Icon must end with two \r
11+
Icon
1012

11-
# next.js
12-
/.next/
13-
/out/
13+
# Thumbnails
14+
._*
1415

15-
# production
16-
/build
16+
# Files that might appear in the root of a volume
17+
.DocumentRevisions-V100
18+
.fseventsd
19+
.Spotlight-V100
20+
.TemporaryItems
21+
.Trashes
22+
.VolumeIcon.icns
23+
.com.apple.timemachine.donotpresent
1724

18-
# misc
19-
.DS_Store
25+
# Directories potentially created on remote AFP share
26+
.AppleDB
27+
.AppleDesktop
28+
Network Trash Folder
29+
Temporary Items
30+
.apdisk
2031

21-
# debug
32+
### Node ###
33+
# Logs
34+
logs
35+
*.log
2236
npm-debug.log*
2337
yarn-debug.log*
2438
yarn-error.log*
39+
lerna-debug.log*
40+
41+
# Diagnostic reports (https://nodejs.org/api/report.html)
42+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
43+
44+
# Runtime data
45+
pids
46+
*.pid
47+
*.seed
48+
*.pid.lock
49+
50+
# Directory for instrumented libs generated by jscoverage/JSCover
51+
lib-cov
52+
53+
# Coverage directory used by tools like istanbul
54+
coverage
55+
*.lcov
56+
57+
# nyc test coverage
58+
.nyc_output
59+
60+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
61+
.grunt
62+
63+
# Bower dependency directory (https://bower.io/)
64+
bower_components
65+
66+
# node-waf configuration
67+
.lock-wscript
68+
69+
# Compiled binary addons (https://nodejs.org/api/addons.html)
70+
build/Release
71+
72+
# Dependency directories
73+
node_modules/
74+
jspm_packages/
75+
76+
# TypeScript v1 declaration files
77+
typings/
78+
79+
# TypeScript cache
80+
*.tsbuildinfo
81+
82+
# Optional npm cache directory
83+
.npm
84+
85+
# Optional eslint cache
86+
.eslintcache
87+
88+
# Microbundle cache
89+
.rpt2_cache/
90+
.rts2_cache_cjs/
91+
.rts2_cache_es/
92+
.rts2_cache_umd/
93+
94+
# Optional REPL history
95+
.node_repl_history
96+
97+
# Output of 'npm pack'
98+
*.tgz
99+
100+
# Yarn Integrity file
101+
.yarn-integrity
102+
103+
# dotenv environment variables file
104+
.env
105+
.env.test
106+
107+
# parcel-bundler cache (https://parceljs.org/)
108+
.cache
109+
110+
# Next.js build output
111+
.next
112+
113+
# Nuxt.js build / generate output
114+
.nuxt
115+
dist
116+
117+
# Gatsby files
118+
.cache/
119+
# Comment in the public line in if your project uses Gatsby and not Next.js
120+
# https://nextjs.org/blog/next-9-1#public-directory-support
121+
# public
122+
123+
# vuepress build output
124+
.vuepress/dist
125+
126+
# Serverless directories
127+
.serverless/
128+
129+
# FuseBox cache
130+
.fusebox/
131+
132+
# DynamoDB Local files
133+
.dynamodb/
134+
135+
# TernJS port file
136+
.tern-port
137+
138+
# Stores VSCode versions used for testing VSCode extensions
139+
.vscode-test
140+
141+
### now ###
142+
.now
143+
144+
### yarn ###
145+
# https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored
146+
147+
# .yarn/unplugged and .yarn/build-state.yml should likely always be ignored since
148+
# they typically hold machine-specific build artifacts. Ignoring them might however
149+
# prevent Zero-Installs from working (to prevent this, set enableScripts to false).
150+
.yarn/unplugged
151+
.yarn/build-state.yml
152+
153+
# .yarn/cache and .pnp.* may be safely ignored, but you'll need to run yarn install
154+
# to regenerate them between each branch switch.
155+
# Uncomment the following lines if you're not using Zero-Installs:
156+
# .yarn/cache
157+
# .pnp.*
25158

26-
# local env files
27-
.env.local
28-
.env.development.local
29-
.env.test.local
30-
.env.production.local
159+
# End of https://www.toptal.com/developers/gitignore/api/now,yarn,node,macos
31160

32-
.now
161+
# Storybook
162+
storybook-static

.huskyrc.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"hooks": {
3-
"pre-commit": "lint-staged",
4-
"pre-push": "npm run lint",
5-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
6-
}
2+
"hooks": {
3+
"pre-commit": "lint-staged",
4+
"pre-push": "npm run lint",
5+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
6+
}
77
}

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.18.3

.storybook/main.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ const path = require('path')
22

33
// Export a function. Accept the base config as the only param.
44
module.exports = {
5-
webpackFinal: async (baseConfig) => {
6-
const nextConfig = require('../next.config.js')
7-
8-
// Make whatever fine-grained changes you need
9-
baseConfig.module.rules.push({
5+
webpackFinal: async (config) => {
6+
config.module.rules.push({
107
test: /\.scss$/,
118
use: [
129
'style-loader',
@@ -23,6 +20,6 @@ module.exports = {
2320
})
2421

2522
// merge whatever from nextConfig into the webpack config storybook will use
26-
return { ...baseConfig }
23+
return config
2724
},
2825
}

0 commit comments

Comments
 (0)