Skip to content

Commit 90bab36

Browse files
committed
chore: init
0 parents  commit 90bab36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4227
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
docs
3+
dist

.eslintrc.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const { defineConfig } = require('eslint-define-config')
2+
3+
module.exports = defineConfig({
4+
root: true,
5+
env: {
6+
es6: true,
7+
node: true
8+
},
9+
parser: '@typescript-eslint/parser',
10+
parserOptions: {
11+
// tsconfigRootDir: __dirname,
12+
// project: ['./tsconfig.json', './packages/*/tsconfig.json'],
13+
sourceType: 'module',
14+
ecmaVersion: 2021
15+
},
16+
plugins: ['@typescript-eslint'],
17+
extends: [
18+
'eslint:recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'plugin:@typescript-eslint/eslint-recommended',
21+
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
22+
'plugin:prettier/recommended'
23+
],
24+
rules: {
25+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
26+
'@typescript-eslint/explicit-function-return-type': 'error',
27+
'@typescript-eslint/explicit-module-boundary-types': 'off',
28+
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
29+
'@typescript-eslint/no-explicit-any': 'error',
30+
'@typescript-eslint/no-non-null-assertion': 'off',
31+
'@typescript-eslint/no-var-requires': 'off'
32+
},
33+
overrides: [
34+
{
35+
files: ['*.js'],
36+
rules: {
37+
'@typescript-eslint/explicit-function-return-type': 'off'
38+
}
39+
}
40+
]
41+
})

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "\U0001F41E Bug Report"
2+
description: Report an issue with electron-toolkit
3+
labels: ['bug', 'triage']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
id: bug-description
11+
attributes:
12+
label: Describe the bug
13+
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
14+
placeholder: Bug description
15+
validations:
16+
required: true
17+
- type: input
18+
id: electron-toolkit-version
19+
attributes:
20+
label: Electron-Toolkit Version
21+
description: What version of Electron-Toolkit are you using?
22+
validations:
23+
required: true
24+
- type: input
25+
id: electron-version
26+
attributes:
27+
label: Electron Version
28+
description: What version of Electron are you using?
29+
validations:
30+
required: true
31+
- type: checkboxes
32+
id: checkboxes
33+
attributes:
34+
label: Validations
35+
description: Before submitting the issue, please make sure you do the following
36+
options:
37+
- label: Follow the [Code of Conduct](https://github.com/alex8088/electron-toolkit/blob/master/CODE_OF_CONDUCT.md).
38+
required: true
39+
- label: Read the [Contributing Guidelines](https://github.com/alex8088/electron-toolkit/blob/master/CONTRIBUTING.md).
40+
required: true
41+
- label: Read the [docs](https://github.com/alex8088/electron-toolkit#readme).
42+
required: true
43+
- label: Check that there isn't [already an issue](https://github.com/alex8088/electron-toolkit/issues) that reports the same bug to avoid creating a duplicate.
44+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "\U0001F680 New Feature Proposal"
2+
description: Propose a new feature to be added to electron-toolkit
3+
labels: ['enhancement']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for your interest in the project and taking the time to fill out this feature report!
9+
- type: textarea
10+
id: feature-description
11+
attributes:
12+
label: Clear and concise description of the problem
13+
description: 'As a developer using Vite I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: suggested-solution
18+
attributes:
19+
label: Suggested solution
20+
description: 'In module [xy] we could provide following implementation...'
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternative
25+
attributes:
26+
label: Alternative
27+
description: Clear and concise description of any alternative solutions or features you've considered.
28+
- type: textarea
29+
id: additional-context
30+
attributes:
31+
label: Additional context
32+
description: Any other context or screenshots about the feature request here.
33+
- type: checkboxes
34+
id: checkboxes
35+
attributes:
36+
label: Validations
37+
description: Before submitting the issue, please make sure you do the following
38+
options:
39+
- label: Follow the [Code of Conduct](https://github.com/alex8088/electron-toolkit/blob/master/CODE_OF_CONDUCT.md).
40+
required: true
41+
- label: Read the [Contributing Guidelines](https://github.com/alex8088/electron-toolkit/blob/master/CONTRIBUTING.md).
42+
required: true
43+
- label: Read the [docs](https://github.com/alex8088/electron-toolkit#readme).
44+
required: true
45+
- label: Check that there isn't [already an issue](https://github.com/alex8088/electron-toolkit/issues) that reports the same bug to avoid creating a duplicate.
46+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Thank you for contributing! -->
2+
3+
### Description
4+
5+
<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
6+
7+
### Additional context
8+
9+
<!-- e.g. is there anything you'd like reviewers to focus on? -->
10+
11+
---
12+
13+
### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->
14+
15+
- [ ] Bug fix
16+
- [ ] New Feature
17+
- [ ] Documentation update
18+
- [ ] Other
19+
20+
### Before submitting the PR, please make sure you do the following
21+
22+
- [ ] Read the [Contributing Guidelines](https://github.com/alex8088/electron-toolkit/blob/master/CONTRIBUTING.md).
23+
- [ ] Read the [Pull Request Guidelines](https://github.com/alex8088/electron-toolkit/blob/master/CONTRIBUTING.md#pull-request) and follow the [Commit Convention](https://github.com/alex8088/electron-toolkit/blob/master/.github/commit-convention.md).
24+
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).

.github/commit-convention.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
<!-- prettier-ignore -->
10+
```js
11+
/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/
12+
```
13+
14+
#### Examples
15+
16+
Appears under "Features" header, `dev` subheader:
17+
18+
```
19+
feat(dev): add 'comments' option
20+
```
21+
22+
Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28:
23+
24+
```
25+
fix(dev): fix dev error
26+
27+
close #28
28+
```
29+
30+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
31+
32+
```
33+
perf(build): remove 'foo' option
34+
35+
BREAKING CHANGE: The 'foo' option has been removed.
36+
```
37+
38+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
39+
40+
```
41+
revert: feat(compiler): add 'comments' option
42+
43+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
44+
```
45+
46+
### Full Message Format
47+
48+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
49+
50+
```
51+
<type>(<scope>): <subject>
52+
<BLANK LINE>
53+
<body>
54+
<BLANK LINE>
55+
<footer>
56+
```
57+
58+
The **header** is mandatory and the **scope** of the header is optional.
59+
60+
### Revert
61+
62+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
63+
64+
### Type
65+
66+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
67+
68+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
69+
70+
### Scope
71+
72+
The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc...
73+
74+
### Subject
75+
76+
The subject contains a succinct description of the change:
77+
78+
- use the imperative, present tense: "change" not "changed" nor "changes"
79+
- don't capitalize the first letter
80+
- no dot (.) at the end
81+
82+
### Body
83+
84+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
85+
The body should include the motivation for the change and contrast this with previous behavior.
86+
87+
### Footer
88+
89+
The footer should contain any information about **Breaking Changes** and is also the place to
90+
reference GitHub issues that this commit **Closes**.
91+
92+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/workflows/release-tag.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5+
- 'utils-v*'
6+
- 'tsconfig-v*'
7+
- 'preload-v*'
8+
9+
name: Create Release
10+
11+
jobs:
12+
build:
13+
name: Create Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@master
18+
- name: Create Release for Tag
19+
id: release_tag
20+
uses: actions/create-release@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
tag_name: ${{ github.ref }}
25+
release_name: ${{ github.ref }}
26+
body: |
27+
Please refer to [CHANGELOG.md](https://github.com/alex8088/electron-toolkit/blob/${{ github.ref_name }}/CHANGELOG.md) for details.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
*.log

0 commit comments

Comments
 (0)