Skip to content

Commit

Permalink
chore(react-componnets): 分析配置组件包初始化 (#2751)
Browse files Browse the repository at this point in the history
* chore(react-componnets): 分析配置组件包初始化

* chore: 修复打包配置和 React 18.3 defaultProps warning

* build: 修复 pnpm 类型 reference 问题

* build: 还原 core 打包配置

* chore: 更新 lock 文件

* style: 全量格式化

* build: 修复打包失败

* build: 修复打包失败

* test: 更新快照
  • Loading branch information
lijinke666 authored Jun 3, 2024
1 parent 1b4492c commit afd48ac
Show file tree
Hide file tree
Showing 398 changed files with 21,060 additions and 15,628 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
s2-site
node_modules
.cache
package.json
.history
esm
lib
Expand Down
24 changes: 21 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,26 @@ module.exports = {
trailingComma: 'all',
printWidth: 80,
proseWrap: 'never',
overrides: [{ files: '.prettierrc', options: { parser: 'json' } }],
overrides: [
{ files: '.eslintrc', options: { parser: 'json' } },
{ files: '.prettierrc', options: { parser: 'json' } },
],
plugins: [
require.resolve('prettier-plugin-packagejson'),
require.resolve('prettier-plugin-organize-imports'),
],
pluginSearchDirs: false,
},
],
'import/no-duplicates': [2, { considerQueryString: true }],
'import/no-deprecated': 1,
'import/no-cycle': 1,
'import/order': [
2,
{
warnOnUnassignedImports: false,
},
],
'import/order': 2,
'import/no-default-export': 0,
'no-restricted-syntax': 0,
semi: 0,
Expand Down Expand Up @@ -115,7 +131,7 @@ module.exports = {
'no-useless-computed-key': 2,
'block-spacing': [2, 'always'],
'lines-between-class-members': [2, 'always'],
'no-unused-vars': 'off',
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
'no-unsafe-optional-chaining': 0,
Expand Down Expand Up @@ -157,6 +173,7 @@ module.exports = {
// 'as-needed',
// { requireReturnForObjectLiteral: true },
// ],
'no-promise-executor-return': 2,
'no-unneeded-ternary': 2,
'array-callback-return': 2,
'dot-notation': 0,
Expand Down Expand Up @@ -216,6 +233,7 @@ module.exports = {
rules: {
'max-lines-per-function': 0,
'line-comment-position': 0,
'import/order': 0,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -57,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -71,4 +71,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 7
version: 9

- uses: preactjs/compressed-size-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: 'pnpm'

- name: Git bootstrap
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ yarn.lock
yarn-error.log
npm-debug.log
lerna-debug.log
package.json
tsconfig.json
CNAME
LICENSE
Expand All @@ -26,6 +25,3 @@ s2-site/public
esm
dist
lib



14 changes: 0 additions & 14 deletions .prettierrc

This file was deleted.

19 changes: 19 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
endOfLine: 'lf',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
printWidth: 80,
arrowParens: 'always',
proseWrap: 'never',
overrides: [
{ files: '.eslintrc', options: { parser: 'json' } },
{ files: '.prettierrc', options: { parser: 'json' } },
],
plugins: [
require.resolve('prettier-plugin-packagejson'),
require.resolve('prettier-plugin-organize-imports'),
],
pluginSearchDirs: false,
};
5 changes: 3 additions & 2 deletions .releaserc.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
{ type: 'perf', release: 'patch' },
{ type: 'refactor', release: 'patch' },
{ type: 'style', release: 'patch' },
{ type: 'docs', release: false },
{ scope: 'no-release', release: false },
],
},
Expand All @@ -28,9 +29,9 @@ module.exports = {
'@semantic-release/npm',
[
'@semantic-release/git',
{
{
message: 'chore(release): 🤖 ${nextRelease.gitTag} [skip ci]',
},
},
],
'@semantic-release/github',
[
Expand Down
4 changes: 2 additions & 2 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare global {
interface HTMLCanvasElement {
__s2_instance__?: any;
__s2_instance__?: any;
}
}
export {}
export {};
Loading

0 comments on commit afd48ac

Please sign in to comment.