Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
lcx-seima committed Apr 8, 2022
2 parents cd1fc84 + f0ffe28 commit 8476fb5
Show file tree
Hide file tree
Showing 89 changed files with 3,687 additions and 2,151 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ lib
dist
.idea
*.d.ts
.eslintrc*
130 changes: 0 additions & 130 deletions .eslintrc

This file was deleted.

132 changes: 132 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
extends: [
'airbnb-base/legacy',
'prettier',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
],
env: {
es6: true,
node: true,
browser: true,
jest: true,
'vue/setup-compiler-macros': true,
},
parser: '@typescript-eslint/parser',
plugins: ['prettier', '@typescript-eslint', 'import', 'vue'],
settings: {
jest: {
version: 26,
},
react: {
version: 'detect',
},
},
rules: {
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'prettier/prettier': [
1,
{
endOfLine: 'lf',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
printWidth: 80,
proseWrap: 'never',
overrides: [{ files: '.prettierrc', options: { parser: 'json' } }],
},
],
'import/order': 2,
'import/no-default-export': 2,
'no-restricted-syntax': 0,
semi: 0,
'no-console': 2,
'consistent-return': 0,
'import/no-extraneous-dependencies': 2,
'import/prefer-default-export': 0,
'no-underscore-dangle': [
2,
{
allowAfterThis: true,
},
],
'no-plusplus': [
1,
{
allowForLoopAfterthoughts: true,
},
],
'class-methods-use-this': 0,
'no-param-reassign': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'import/no-named-default': 0,
'react/jsx-filename-extension': [
1,
{
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
],
'react/display-name': 0,
'react/prop-types': 0,
'react/state-in-constructor': 0,
'react/jsx-props-no-spreading': 0,
'react/no-array-index-key': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'jsx-a11y/no-static-element-interactions': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'no-use-before-define': 0,
'@typescript-eslint/no-use-before-define': [2],
'no-shadow': 0,
'@typescript-eslint/no-shadow': [1],
'no-alert': 2,
'no-caller': 2,
'no-else-return': 2,
'no-useless-return': 2,
'no-extra-bind': 2,
'no-magic-numbers': 0,
'no-self-compare': 2,
'no-multi-spaces': 2,
'require-await': 2,
'no-multi-assign': 2,
'no-var': 2,
'no-useless-rename': 2,
'object-shorthand': 2,
'prefer-arrow-callback': 2,
'prefer-const': 2,
'max-statements-per-line': [2, { max: 1 }],
'max-params': [1, 3],
'no-unreachable': 2,
eqeqeq: [
2,
'always',
{
null: 'ignore',
},
],
curly: [2, 'multi-line', 'consistent'],
},
overrides: [
{
files: ['*.vue'],
parser: 'vue-eslint-parser',
},
],
};
4 changes: 2 additions & 2 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
uses: actions-cool/issues-helper@main
with:
actions: 'close-issues'
labels: '🤔 Need Reproduce'
labels: '🤔 need reproduce'
inactive-day: 15
body: |
由于该 issue 被标记为需要复现,却 15 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
Since the issue was labeled as "🤔 Need Reproduce" but no response was received for 15 days. Now close the issue. If you have any questions, feel free to comment.
Since the issue was labeled as "🤔 need reproduce" but no response was received for 15 days. Now close the issue. If you have any questions, feel free to comment.
- name: Needs more info
uses: actions-cool/issues-helper@main
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
你好 @${{ github.event.issue.user.login }},你所提供的信息不足于我们排查问题, 请按照 issue 模板填写相关信息, 提供 gif, 截图, 代码片段, 配置信息, 可复现链接等方式, 详细说明复现步骤, 感谢配合, 谢谢! 15 天内未回复issue自动关闭。
你好 @${{ github.event.issue.user.login }},你所提供的信息不足于我们排查问题, 请按照 issue 模板填写相关信息 (参考 #852 #848), 提供 gif, 截图, 代码片段, 配置信息, 版本号, 可复现链接等方式, 详细说明复现步骤, 感谢配合, 谢谢! 15 天内未回复issue自动关闭。
Hello, @${{ github.event.issue.user.login }}, the information you provided is not enough for us to troubleshoot the problem. Please complete the issue description, provide gifs, screenshots, etc. And explain the reproduction steps in detail. Thanks so much for your cooperation! The issue will be closed without any replay within 15 days.
Hello, @${{ github.event.issue.user.login }}, the information you provided is not enough for us to troubleshoot the problem. Please complete the issue description (refer #852 #848), provide gifs, screenshots, config, version. And explain the reproduction steps in detail. Thanks so much for your cooperation! The issue will be closed without any replay within 15 days.
- name: Invalid
if: github.event.label.name == '⛔ invalid'
Expand All @@ -41,9 +41,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
你好 @${{ github.event.issue.user.login }},请按照 issue 模板填写相关信息, 方便大家高效沟通。
你好 @${{ github.event.issue.user.login }},请按照 issue 模板填写相关信息 (参考 #852 #848), 方便大家高效沟通。
Hello @${{ github.event.issue.user.login }}, please fill in the relevant information according to the issue template to facilitate communication efficiently. Thanks so much!
Hello @${{ github.event.issue.user.login }}, please fill in the relevant information according to the issue template to facilitate communication efficiently (refer #852 #848). Thanks so much!
- name: Enhancement
if: github.event.label.name == '⚡ enhancement'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
你好 @${{ github.event.issue.user.login }}Issue 板块是用于 bug 反馈与需求讨论的地方。你可以试着在 [antv s2 discussions](https://github.com/antvis/S2/discussions) 新开一个 discussion选择 `🙏Q&A` 类别进行提问, 我们会及时进行解答, 感谢你的理解。
你好 @${{ github.event.issue.user.login }}, Issue 板块是用于 bug 反馈与需求讨论的地方。你可以试着在 [antv s2 discussions](https://github.com/antvis/S2/discussions) 新开一个 discussion, 选择 `🙏Q&A` 类别进行提问, 我们会及时进行解答, 感谢你的理解。
Hello, @${{ github.event.issue.user.login }}. The Issue section is used for bug feedback and requirement discussion. You could open a new discussion in [antv s2 discussions](https://github.com/antvis/S2/discussions), choose the `🙏Q&A` category to ask questions. We will answer in time. Thanks so much for your understanding.
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/issue-remove-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Issue Remove Inactive

on:
issues:
types: [edited]
issue_comment:
types: [created, edited]

jobs:
issue-remove-inactive:
runs-on: ubuntu-latest
steps:
- name: remove inactive
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
issue-number: ${{ github.event.issue.number }}
labels: '🤔 need reproduce, 👀 need more info'
17 changes: 17 additions & 0 deletions .github/workflows/issues-similarity-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Issues Similarity Analysis

on:
issues:
types: [opened, edited]

jobs:
similarity-analysis:
runs-on: ubuntu-latest
steps:
- name: analysis
uses: actions-cool/issues-similarity-analysis@main
with:
filter-threshold: 0.5
title-excludes: ''
comment-title: '### 你要找的是不是 (You may look for issues):'
comment-body: '${index}. ${similarity} #${number}'
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- name: Build
run: |
yarn react:build
yarn vue:build
- name: Lint scripts, type, style and docs
run: yarn lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
你好 @${{ github.event.pull_request.user.login }},感谢你的贡献, 为了让代码更健壮, 请补充相应单元测试, 如果有API改动, 请修改 [相应的文档](https://github.com/antvis/S2/tree/master/s2-site)
你好 @${{ github.event.pull_request.user.login }},感谢你的贡献, 为了让代码更健壮, 请补充相应单元测试, 如果有 API 改动, 请修改 [相应的文档](https://github.com/antvis/S2/tree/master/s2-site)
Hello, @${{ github.event.pull_request.user.login }}, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the [docs](https://github.com/antvis/S2/tree/master/s2-site) if there are API changes.
Expand All @@ -28,6 +28,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
你好 @${{ github.event.pull_request.user.login }},感谢你的贡献, 请根据模板完善 PR 描述, 说明其改动目的和类型, 以便于我们可以更好的进行 Code Review
你好 @${{ github.event.pull_request.user.login }},感谢你的贡献, 请根据模板完善 PR 描述, 并站在用户的角度说明其改动目的和解决了什么问题 (而非你的解决方式), 以便于我们可以更好的进行 Code Review, 同时请确保已关联相应 issue (如有), 检查你的 commit 是否有描述清楚你这个 PR 所做的事情。
Hello, @${{ github.event.pull_request.user.login }}, Thanks for your contribution. Please improve the PR description based on the template, and explain the purpose and type of changes for a better Code Review.
Hello, @${{ github.event.pull_request.user.login }}, Thanks for your contribution. Please improve the PR description based on the template, and explain the purpose of the change and the problems solved from the perspective of users (not your solution), so that we can conduct a better Code Review. At the same time, please make sure corresponding issue is associated (if any) Meanwhile, please check whether your commit clearly describes what you do as a PR.
Loading

0 comments on commit 8476fb5

Please sign in to comment.