Skip to content

Commit

Permalink
Merge b6bb7cd into c435ed5
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-konshin committed Sep 15, 2021
2 parents c435ed5 + b6bb7cd commit af3362f
Show file tree
Hide file tree
Showing 84 changed files with 5,732 additions and 7,563 deletions.
10 changes: 2 additions & 8 deletions .eslintrc.js
@@ -1,17 +1,11 @@
const prettierOptions = JSON.parse(
require('fs')
.readFileSync('./.prettierrc')
.toString(),
);

module.exports = {
extends: ['ringcentral-typescript'],
rules: {
'import/no-default-export': 'off',
'import/no-unresolved': 'off',
'jsx-a11y/anchor-is-valid': 'off', // Next.js use <a>
'no-console': 'off',
'no-unused-expressions': 'off', // tests
'prettier/prettier': ['warn', Object.assign({}, prettierOptions)],
'react/sort-comp': 'off',
'react/prop-types': 'off',
'ringcentral/specified-comment-with-task-id': 'off',
Expand All @@ -26,7 +20,7 @@ module.exports = {
},
settings: {
react: {
version: '16.12.0',
version: '17.0.2',
},
},
globals: {
Expand Down
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

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

## To Reproduce

*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.*
_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._

Steps to reproduce the behavior:

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

## Desktop (please complete the following information):

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 6]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 6]

## Additional context

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
103 changes: 52 additions & 51 deletions .github/workflows/publish.yml
@@ -1,59 +1,60 @@
name: Publish

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '15.x'
registry-url: 'https://registry.npmjs.org'

- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
packages/*/.next/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --prefer-offline

- run: DEBUG=eslint:cli-engine yarn lint:all

- run: yarn build

- run: yarn test
env:
CI: true

- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- run: yarn publish:release ${TAG} --yes
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: yarn publish:release ${TAG} --yes --dist-tag next
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# - run: yarn test:coverage
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# - uses: coverallsapp/github-action@master
# if: success()
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: 'packages/*/coverage/lcov.info'
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '15.x'
registry-url: 'https://registry.npmjs.org'

- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
packages/*/.next/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --prefer-offline

- run: DEBUG=eslint:cli-engine yarn lint:all

- run: yarn build

- run: yarn test
env:
CI: true

- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- run: yarn publish:release ${TAG} --yes
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: yarn publish:release ${TAG} --yes --dist-tag next
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: coverallsapp/github-action@master
if: success()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: packages/wrapper/coverage/lcov.info
base-path: packages/wrapper
13 changes: 11 additions & 2 deletions .gitignore
@@ -1,12 +1,21 @@
.idea
.next
.tscache
.eslint/cache
.eslint
coverage
es6
lib
node_modules
npm-debug*
out
types
lerna-debug.log
lerna-debug.log

# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
2 changes: 2 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,2 @@
yarn lint:staged
yarn test:quick
5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

6 changes: 2 additions & 4 deletions .lintstagedrc
@@ -1,6 +1,4 @@
{
"*.{ts,tsx,js,jsx}": [
"yarn lint",
"git add"
]
"*.{js,jsx,ts,tsx,css,scss,sass,less,md,yml,json}": ["yarn prettier", "git add"],
"*.{js,jsx,ts,tsx}": ["yarn eslint", "git add"]
}
5 changes: 5 additions & 0 deletions .prettierignore
@@ -0,0 +1,5 @@
node_modules
packages/*/.next
packages/*/coverage
packages/*/es6
packages/*/lib
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.js
@@ -0,0 +1 @@
module.exports = require('eslint-config-ringcentral-typescript/src/prettier');
34 changes: 17 additions & 17 deletions .travis.yml
Expand Up @@ -11,23 +11,23 @@ node_js: 13.9
before_install: npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}

before_script:
- DEBUG=eslint:cli-engine yarn lint:all
- yarn build
- DEBUG=eslint:cli-engine yarn lint:all
- yarn build

deploy:
- provider: script
script: yarn publish:release ${TRAVIS_TAG} --yes
skip_cleanup: true
on:
all_branches: true
condition: $TRAVIS_TAG != "" && $TRAVIS_TAG != *"-"*
repo: kirill-konshin/next-redux-wrapper
- provider: script
script: yarn publish:release ${TRAVIS_TAG} --yes --dist-tag next
skip_cleanup: true
on:
all_branches: true
condition: $TRAVIS_TAG == *"-"*
repo: kirill-konshin/next-redux-wrapper
- provider: script
script: yarn publish:release ${TRAVIS_TAG} --yes
skip_cleanup: true
on:
all_branches: true
condition: $TRAVIS_TAG != "" && $TRAVIS_TAG != *"-"*
repo: kirill-konshin/next-redux-wrapper
- provider: script
script: yarn publish:release ${TRAVIS_TAG} --yes --dist-tag next
skip_cleanup: true
on:
all_branches: true
condition: $TRAVIS_TAG == *"-"*
repo: kirill-konshin/next-redux-wrapper

after_success: yarn test:coverage
after_success: yarn test:coverage

0 comments on commit af3362f

Please sign in to comment.