Skip to content

Commit 44e0957

Browse files
getInitialPageProps and getInitialAppProps doc improvements (#418)
* `getInitialPageProps` and `getInitialAppProps` doc improvements * Playwright tests & cleanup * Deps upgrade * Redux Toolkit tests & cleanup * Upgrade ESLint & Prettier
1 parent 6ad1935 commit 44e0957

Some content is hidden

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

77 files changed

+5762
-7703
lines changed

.eslintrc.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
const prettierOptions = JSON.parse(
2-
require('fs')
3-
.readFileSync('./.prettierrc')
4-
.toString(),
5-
);
6-
71
module.exports = {
82
extends: ['ringcentral-typescript'],
93
rules: {
104
'import/no-default-export': 'off',
5+
'import/no-unresolved': 'off',
116
'jsx-a11y/anchor-is-valid': 'off', // Next.js use <a>
127
'no-console': 'off',
138
'no-unused-expressions': 'off', // tests
14-
'prettier/prettier': ['warn', Object.assign({}, prettierOptions)],
159
'react/sort-comp': 'off',
1610
'react/prop-types': 'off',
1711
'ringcentral/specified-comment-with-task-id': 'off',
@@ -26,7 +20,7 @@ module.exports = {
2620
},
2721
settings: {
2822
react: {
29-
version: '16.12.0',
23+
version: '17.0.2',
3024
},
3125
},
3226
globals: {

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

109
## Describe the bug
@@ -13,7 +12,7 @@ A clear and concise description of what the bug is.
1312

1413
## To Reproduce
1514

16-
*It is strongly recommended to fork CodeSandbox template https://codesandbox.io/s/next-redux-wrapper-demo-7n2t5 and create a reproducible case. It will greatly speed up debugging.*
15+
_It is strongly recommended to fork CodeSandbox template https://codesandbox.io/s/next-redux-wrapper-demo-7n2t5 and create a reproducible case. It will greatly speed up debugging._
1716

1817
Steps to reproduce the behavior:
1918

@@ -32,9 +31,9 @@ If applicable, add screenshots to help explain your problem.
3231

3332
## Desktop (please complete the following information):
3433

35-
- OS: [e.g. iOS]
36-
- Browser [e.g. chrome, safari]
37-
- Version [e.g. 6]
34+
- OS: [e.g. iOS]
35+
- Browser [e.g. chrome, safari]
36+
- Version [e.g. 6]
3837

3938
## Additional context
4039

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/publish.yml

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,60 @@
11
name: Publish
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610
build:
7-
811
runs-on: ubuntu-latest
912

1013
steps:
11-
- uses: actions/checkout@v2
12-
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: '15.x'
16-
registry-url: 'https://registry.npmjs.org'
17-
18-
- id: yarn-cache-dir-path
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
20-
21-
- uses: actions/cache@v2
22-
with:
23-
path: |
24-
${{ steps.yarn-cache-dir-path.outputs.dir }}
25-
packages/*/.next/cache
26-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-yarn-
29-
30-
- run: yarn install --prefer-offline
31-
32-
- run: DEBUG=eslint:cli-engine yarn lint:all
33-
34-
- run: yarn build
35-
36-
- run: yarn test
37-
env:
38-
CI: true
39-
40-
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
41-
42-
- run: yarn publish:release ${TAG} --yes
43-
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
44-
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
47-
- run: yarn publish:release ${TAG} --yes --dist-tag next
48-
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
49-
env:
50-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51-
52-
# - run: yarn test:coverage
53-
# env:
54-
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
55-
# - uses: coverallsapp/github-action@master
56-
# if: success()
57-
# with:
58-
# github-token: ${{ secrets.GITHUB_TOKEN }}
59-
# path-to-lcov: 'packages/*/coverage/lcov.info'
14+
- uses: actions/checkout@v2
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '15.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- id: yarn-cache-dir-path
22+
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
24+
- uses: actions/cache@v2
25+
with:
26+
path: |
27+
${{ steps.yarn-cache-dir-path.outputs.dir }}
28+
packages/*/.next/cache
29+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-yarn-
32+
33+
- run: yarn install --prefer-offline
34+
35+
- run: DEBUG=eslint:cli-engine yarn lint:all
36+
37+
- run: yarn build
38+
39+
- run: yarn test
40+
env:
41+
CI: true
42+
43+
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
44+
45+
- run: yarn publish:release ${TAG} --yes
46+
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- run: yarn publish:release ${TAG} --yes --dist-tag next
51+
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
55+
- uses: coverallsapp/github-action@master
56+
if: success()
57+
with:
58+
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
path-to-lcov: packages/wrapper/coverage/lcov.info
60+
base-path: packages/wrapper

.gitignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
.idea
22
.next
33
.tscache
4-
.eslint/cache
4+
.eslint
55
coverage
66
es6
77
lib
88
node_modules
99
npm-debug*
1010
out
1111
types
12-
lerna-debug.log
12+
lerna-debug.log
13+
14+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
15+
.yarn/*
16+
!.yarn/patches
17+
!.yarn/releases
18+
!.yarn/plugins
19+
!.yarn/sdks
20+
!.yarn/versions
21+
.pnp.*

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
yarn lint:staged
2+
yarn test:quick

.huskyrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.lintstagedrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"*.{ts,tsx,js,jsx}": [
3-
"yarn lint",
4-
"git add"
5-
]
2+
"*.{js,jsx,ts,tsx,css,scss,sass,less,md,yml,json}": ["yarn prettier", "git add"],
3+
"*.{js,jsx,ts,tsx}": ["yarn eslint", "git add"]
64
}

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
packages/*/.next
3+
packages/*/coverage
4+
packages/*/es6
5+
packages/*/lib

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)