Skip to content

Commit

Permalink
Merge branch 'next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
learner-pm authored Dec 6, 2022
2 parents b3fcdf5 + 81d6b76 commit 6b09635
Show file tree
Hide file tree
Showing 1,295 changed files with 176,399 additions and 91,121 deletions.
3 changes: 0 additions & 3 deletions .commitlintrc.js

This file was deleted.

130 changes: 86 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,64 +1,106 @@
module.exports = {
'parser': '@typescript-eslint/parser',
'plugins': ['@typescript-eslint', 'jest', 'react'],
'extends': [
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import',
'jest',
'react',
'simple-import-sort',
'prettier'
],
extends: [
'eslint:recommended',
'standard',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended'
'plugin:react/jsx-runtime',
'plugin:react/recommended',
'prettier'
],
'rules': {
'no-use-before-define': 0,
'no-unused-vars': 'off',
'camelcase': 0,
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/explicit-function-return-type': 0,
"indent": "off",
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_', 'args': 'after-used', }],
'@typescript-eslint/indent': [2, 2],
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/member-delimiter-style': [1, { multiline: { delimiter: 'none' }, singleline: { delimiter: 'comma' } }],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-use-before-define': ['warn', { 'functions': false, 'classes': false }],
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/member-delimiter-style': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/ban-ts-comment': 0,
'standard/no-callback-literal': 0,
'no-console': ['error', { allow: ['warn', 'error'] }],
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-this-alias': 0,
'@typescript-eslint/no-unused-vars': [2, { argsIgnorePattern: '^_', args: 'after-used' }],
'@typescript-eslint/no-use-before-define': [1, { functions: false, classes: false }],
'@typescript-eslint/no-var-requires': 0,
camelcase: 0,
'import/first': 2,
'import/newline-after-import': 2,
'import/no-duplicates': 2,
indent: 'off',
'no-console': [2, { allow: ['warn', 'error'] }],
'no-prototype-builtins': 0,
'no-unused-expressions': 0,
'no-unused-vars': 'off',
'no-use-before-define': 0,
'no-empty': 1,
'prefer-spread': 0,
'prefer-rest-params': 0,
'no-prototype-builtins': 0,
'react/jsx-uses-vars': 'warn',
'react/jsx-uses-vars': 1,
'react/prop-types': 0,
'react/no-find-dom-node': 0,
'no-unused-expressions': 0,
// 'camelcase': ['error', {allow: ['^internal_', '^unstable_']}]
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
semi: [2, 'never'],
'simple-import-sort/imports': [2, {
groups: [
// Side effect imports.
['^\\u0000'],
// Node.js builtins prefixed with `node:`.
['^node:'],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
['^@?\\w'],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
['^'],
// Relative imports.
// Anything that starts with a dot.
['^\\.'],
// Types Group
['^node:.*\\u0000$', '^@?\\w.*\\u0000$', '(?<=\\u0000)$', '^\\..*\\u0000$'],
]
}],
'simple-import-sort/exports': 2,
'space-before-function-paren': [2, 'always'],
'standard/no-callback-literal': 0
},
'env': {
env: {
'jest/globals': true,
'browser': true,
'node': true,
'es6': true,
browser: true,
node: true,
es6: true
},
'globals': {
'testRule': 'readonly',
'wx': 'readonly',
'qq': 'readonly',
'tt': 'readonly',
'swan': 'readonly',
'my': 'readonly',
'getCurrentPages': 'readonly',
'getApp': 'readonly',
'requirePlugin': 'readonly',
'jd': 'readonly',
'ks': 'readonly',
'LOCATION_APIKEY': 'readonly'
globals: {
testRule: 'readonly',
wx: 'readonly',
qq: 'readonly',
tt: 'readonly',
swan: 'readonly',
my: 'readonly',
getCurrentPages: 'readonly',
getApp: 'readonly',
requirePlugin: 'readonly',
jd: 'readonly',
ks: 'readonly',
LOCATION_APIKEY: 'readonly'
},
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
'parserOptions': {
'ecmaFeatures': {
'jsx': true
settings: {
react: {
version: 'detect'
}
}
}
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=text
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
#
*.json linguist-language=JSON-with-Comments
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 新建一个新的 Issue
url: https://issue.taro.zone/
url: https://taro-issue-pro.pf.jd.com
about: 请点击 「Open」 按钮打开新链接创建 Issue
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ https://github.com/NervJS/taro/blob/master/CONTRIBUTING.md

**这个 PR 是什么类型?** (至少选择一个)

- [ ] 错误修复(Bugfix) issue id #
- [ ] 错误修复(Bugfix) issue: fix #
- [ ] 新功能(Feature)
- [ ] 代码重构(Refactor)
- [ ] TypeScript 类型定义修改(Typings)
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-update-lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# https://github.com/dependabot/dependabot-core/issues/1736
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
update-lockfile:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with :
ref : ${{ github.head_ref }}
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: install
uses: pnpm/[email protected]
with:
version: 7
run_install: |
- recursive: true
args: [--no-frozen-lockfile]
- run: |
git add pnpm-lock.yaml
git commit -m "build(deps-dev): update pnpm-lock.yaml"
git push
70 changes: 35 additions & 35 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ on:
push:
branches:
- next
- feat/use-h5
- feat/**
pull_request:
branches:
- next

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
build:

Expand All @@ -20,38 +23,35 @@ jobs:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# - name: restore lerna
# uses: actions/cache@v2
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Checkout
uses: actions/checkout@v3
with :
ref : ${{ github.ref || github.head_ref || github.ref_name }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: npm install -g yarn
- run: yarn config set registry https://registry.yarnpkg.com
- name: install
run: yarn
- name: lint
run: yarn run lint
- name: build
run: yarn run build
- name: test
run: yarn test
env:
CI: true
# Bootstrap project
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: install
uses: pnpm/[email protected]
with:
version: 7
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: lint
run: pnpm run lint
- name: build
run: pnpm run build
- name: test
run: pnpm run test
env:
CI: true
Loading

0 comments on commit 6b09635

Please sign in to comment.