forked from vuejs/babel-plugin-jsx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 0f08ce7.
- Loading branch information
Showing
144 changed files
with
288,015 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const { builtinModules } = require('node:module'); | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
|
||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
plugins: ['import'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
rules: { | ||
eqeqeq: ['warn', 'always', { null: 'never' }], | ||
'no-debugger': ['error'], | ||
'no-empty': ['warn', { allowEmptyCatch: true }], | ||
'prefer-const': [ | ||
'warn', | ||
{ | ||
destructuring: 'all', | ||
}, | ||
], | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' }, | ||
], | ||
|
||
'import/no-nodejs-modules': [ | ||
'error', | ||
{ allow: builtinModules.map((mod) => `node:${mod}`) }, | ||
], | ||
'import/no-duplicates': 'error', | ||
'import/order': 'error', | ||
'sort-imports': [ | ||
'error', | ||
{ | ||
ignoreCase: false, | ||
ignoreDeclarationSort: true, | ||
ignoreMemberSort: false, | ||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], | ||
allowSeparatedGroups: false, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: 🐛 Report Bug | ||
about: Report Bug. | ||
title: '[BUG] Report bug' | ||
assignees: | ||
--- | ||
|
||
### 🐛 Bug description | ||
|
||
<!-- Please describe the bug in detail above so that everyone can understand. --> | ||
|
||
### 📝 Steps to reproduce | ||
|
||
<!-- Please describe the steps to reproduce the bug above. --> | ||
|
||
Reproduction Link (required): <!-- Please provide a link to a reproduction case. --> | ||
|
||
### 🏞 Desired result | ||
|
||
<!-- Please describe above what you expected to see. --> | ||
|
||
### 🚑 Other information | ||
|
||
<!-- Please enter other information such as screenshots above. --> | ||
<!-- From: https://github.com/one-template/issue-template --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: '❓ Question or need help' | ||
about: Question or need help | ||
title: '[Question] Help' | ||
labels: 'question' | ||
assignees: '' | ||
--- | ||
|
||
### 🧐 Problem Description | ||
|
||
<!-- Describe the problem in detail so that everyone can understand. --> | ||
|
||
### 💻 Sample code | ||
|
||
<!-- If you have a solution, state it clearly here. --> | ||
|
||
### 🚑 Other information | ||
|
||
<!-- Other information such as screenshots can be posted here. --> | ||
<!-- From: https://github.com/one-template/issue-template --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
First of all, thank you for your contribution! 😄 | ||
--> | ||
|
||
### 🤔 What is the nature of this change? | ||
|
||
- [ ] New feature | ||
- [ ] Fix bug | ||
- [ ] Style optimization | ||
- [ ] Code style optimization | ||
- [ ] Performance optimization | ||
- [ ] Build optimization | ||
- [ ] Refactor code or style | ||
- [ ] Test related | ||
- [ ] Other | ||
|
||
### 🔗 Related Issue | ||
|
||
<!-- | ||
Describe the source of related requirements, such as the related issue discussion link. | ||
--> | ||
|
||
### 💡 Background or solution | ||
|
||
<!-- | ||
The specific problem solved. | ||
--> | ||
|
||
### 📝 Changelog | ||
|
||
<!-- | ||
Describe changes from the user side, and list all potential break changes or other risks. | ||
---> | ||
|
||
| Language | Changelog | | ||
| ---------- | --------- | | ||
| 🇺🇸 English | | | ||
| 🇨🇳 Chinese | | | ||
|
||
### ☑️ Self Check before Merge | ||
|
||
⚠️ Please check all items below before review. ⚠️ | ||
|
||
- [ ] Doc is updated/provided or not needed | ||
- [ ] Demo is updated/provided or not needed | ||
- [ ] TypeScript definition is updated/provided or not needed | ||
- [ ] Changelog is provided or not needed | ||
|
||
<!-- From: https://github.com/one-template/pr-template --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
$schema: 'https://docs.renovatebot.com/renovate-schema.json', | ||
extends: [ | ||
'config:base', | ||
'schedule:weekly', | ||
'group:allNonMajor', | ||
':semanticCommitTypeAll(chore)', | ||
], | ||
labels: ['dependencies'], | ||
rangeStrategy: 'bump', | ||
packageRules: [ | ||
{ | ||
depTypeList: ['peerDependencies'], | ||
enabled: false, | ||
}, | ||
], | ||
ignoreDeps: [ | ||
// Pure ESM | ||
'camelcase', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CI | ||
|
||
permissions: {} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 20 | ||
runs-on: ubuntu-latest | ||
name: Unit Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: pnpm | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: Test unit | ||
run: pnpm run test | ||
|
||
lint: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: pnpm | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm run lint | ||
|
||
- name: Check formatting | ||
run: pnpm prettier --check . | ||
|
||
- name: Typecheck | ||
run: pnpm run typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Emoji Helper | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
emoji: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions-cool/emoji-helper@v1.0.0 | ||
with: | ||
type: 'release' | ||
emoji: '+1, laugh, heart, hooray, rocket, eyes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Issue Reply | ||
|
||
on: | ||
issues: | ||
types: [labeled] | ||
|
||
jobs: | ||
reply-helper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: help wanted | ||
if: github.event.label.name == 'help wanted' | ||
uses: actions-cool/issues-helper@v3 | ||
with: | ||
actions: 'create-comment' | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! | ||
- name: need reproduction | ||
if: github.event.label.name == 'need reproduction' | ||
uses: actions-cool/issues-helper@v3 | ||
with: | ||
actions: 'create-comment' | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Hello @${{ github.event.issue.user.login }}. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link [codesandbox](https://codesandbox.io/s/magical-vaughan-byzhk?file=/src/App.jsx) or provide your GitHub repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: pnpm | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npx changelogithub | ||
continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Install Dependencies | ||
run: pnpm i | ||
|
||
- name: PNPM build | ||
run: pnpm run build | ||
|
||
- name: Publish to NPM | ||
run: pnpm -r publish --access public --no-git-checks | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
NPM_CONFIG_PROVENANCE: true |
Oops, something went wrong.