Skip to content

Commit

Permalink
refactor: JSX (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe authored Oct 14, 2023
1 parent 129f6cb commit bc1e2b6
Show file tree
Hide file tree
Showing 96 changed files with 26,672 additions and 24,939 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
source
69 changes: 69 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"extends": [
"hexo",
"plugin:react/recommended",
"plugin:json/recommended"
],
"settings": {
"node": {
"tryExtensions": [
".js",
".jsx",
".json"
]
},
"react": {
"version": "16.0"
}
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module",
"ecmaVersion": "latest"
},
"plugins": [
"react"
],
"rules": {
"react/jsx-uses-vars": "error",
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"react/no-unknown-property": [
"error",
{
"ignore": [
"class",
"onclick",
"onload",
"onsubmit",
"crossorigin"
]
}
],
"react/react-in-jsx-scope": [
"off"
],
"react/prop-types": [
"off"
],
"react/display-name": [
"off"
],
"react/jsx-key": [
"off"
],
"react/jsx-no-target-blank": [
"error",
{
"allowReferrer": true
}
]
}
}
40 changes: 20 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report_en.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
name: 🐛 Bug Report
about: Submit discovered bugs
---

<!--
Please ensure you have read [documentation], and provide all the information required by this template.
Otherwise the issue will be closed immediately.Please do not repeat the issue.
-->

### BUG occurrence address

### What is expected?

### What is actually happening?

### Additional info (logs errors etc)

<!--
Please ensure you have deployed the [master branch](https://github.com/nexmoe/hexo-theme-nexmoe/tree/master)
---
name: 🐛 Bug Report
about: Submit discovered bugs
---

<!--
Please ensure you have read [documentation], and provide all the information required by this template.
Otherwise the issue will be closed immediately.Please do not repeat the issue.
-->

### BUG occurrence address

### What is expected?

### What is actually happening?

### Additional info (logs errors etc)

<!--
Please ensure you have deployed the [master branch](https://github.com/nexmoe/hexo-theme-nexmoe/tree/master)
-->
40 changes: 20 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report_zh.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
name: 🐛 Bug 报告
about: 早起的虫子被你抓
---

<!--
请确保已阅读 [文档](https://docs.nexmoe.com) 内相关部分,并按照模版提供信息
否则 issue 将被立即关闭,请勿重复提issue
-->

### BUG 发生地址

### 预期是什么?

### 实际发生了什么?

### 额外信息(日志、报错等)

<!--
请确保您部署的是[主线 master 分支](https://github.com/nexmoe/hexo-theme-nexmoe/tree/master)的最新版
---
name: 🐛 Bug 报告
about: 早起的虫子被你抓
---

<!--
请确保已阅读 [文档](https://docs.nexmoe.com) 内相关部分,并按照模版提供信息
否则 issue 将被立即关闭,请勿重复提issue
-->

### BUG 发生地址

### 预期是什么?

### 实际发生了什么?

### 额外信息(日志、报错等)

<!--
请确保您部署的是[主线 master 分支](https://github.com/nexmoe/hexo-theme-nexmoe/tree/master)的最新版
-->
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request_en.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 🍰 Feature Request
about: Submit a new feature request
---

<!--
Feature Request(https://docs.nexmoe.com) or [issue](https://github.com/nexmoe/hexo-theme-nexmoe/issues) , and provide all the information required by this template.
Otherwise the issue will be closed immediately.
-->

### What feature is it?

### What can this function do?

---
name: 🍰 Feature Request
about: Submit a new feature request
---

<!--
Feature Request(https://docs.nexmoe.com) or [issue](https://github.com/nexmoe/hexo-theme-nexmoe/issues) , and provide all the information required by this template.
Otherwise the issue will be closed immediately.
-->

### What feature is it?

### What can this function do?

### Additional description
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request_zh.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 🍰 功能需求
about: 提交新的功能需求
---

<!--
请确保 [文档](https://docs.nexmoe.com) 和 [issue](https://github.com/nexmoe/hexo-theme-nexmoe/issues) 中没有相关内容,并按照模版提供信息
否则 issue 将被立即关闭
-->

### 这是一个什么样的功能?

### 这个功能可以干什么?

---
name: 🍰 功能需求
about: 提交新的功能需求
---

<!--
请确保 [文档](https://docs.nexmoe.com) 和 [issue](https://github.com/nexmoe/hexo-theme-nexmoe/issues) 中没有相关内容,并按照模版提供信息
否则 issue 将被立即关闭
-->

### 这是一个什么样的功能?

### 这个功能可以干什么?

### 额外描述
62 changes: 31 additions & 31 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
44 changes: 22 additions & 22 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
64 changes: 32 additions & 32 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit bc1e2b6

Please sign in to comment.