Skip to content

Commit

Permalink
feat: setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
tak-bro committed Jul 24, 2024
1 parent 943d9b1 commit 3236e69
Show file tree
Hide file tree
Showing 79 changed files with 14,919 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 4
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package.json
package-lock.json
pnpm-lock.yaml
dist
e2e/**
karma.conf.js
commitlint.config.js
49 changes: 49 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "unused-imports", "import"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"globals": { "BigInt": true, "console": true, "WebAssembly": true },
"rules": {
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description"
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
["sibling", "parent", "index"],
"type",
"unknown"
],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"no-unused-vars": "off",
"no-useless-escape": "off",
"@typescript-eslint/no-explicit-any": "off",
"curly": "error",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-unused-vars": "off",
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true,
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
"allowSeparatedGroups": true
}
],
"no-case-declarations": "off"
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: tak-bro
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug report
description: File a bug report
labels: [bug, pending triage]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file this bug report.
- type: textarea
attributes:
label: Bug description
description: A clear and concise description of the bug.
placeholder: |
<!--
What did you do, what did you expect to happen, and what happened instead?
-->
validations:
required: true
- type: input
attributes:
label: aipick version
description: |
Run and paste the output of:
```sh
aipick --version
```
placeholder: v0.0.0
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
Run and paste the output of:
```sh
npx envinfo --system --binaries
```
This information is used to for reproduction and debugging.
placeholder: |
System:
OS:
CPU:
Shell:
Binaries:
Node:
npm:
render: shell
validations:
required: true
- type: checkboxes
attributes:
label: Can you contribute a fix?
description: We would love it if you can open a pull request to fix this bug!
options:
- label: I’m interested in opening a pull request for this issue.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Feature request
description: Suggest an idea for this project
labels: [feature, pending triage]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file this feature request.
- type: textarea
attributes:
label: Feature request
description: A description of the feature you would like.
validations:
required: true
- type: textarea
attributes:
label: Why?
description: |
Describe the problem you’re tackling with this feature request.
placeholder: |
<!--
What’s the motivation behind this issue?
eg. “I’m frustrated when...”
-->
validations:
required: true
- type: textarea
attributes:
label: Alternatives
description: |
Have you considered alternative solutions? Is there a workaround?
placeholder: |
<!--
Do you have alternative proposals?
Do you have a workaround?
-->
- type: textarea
attributes:
label: Additional context
description: |
Anything else to share? Screenshots? Links?
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Issue
Issue number, if available, prefixed with "#"

### Description
What does this implement/fix? Explain your changes.

### Testing
How was this change tested?

### Additional context
Add any other context about the PR here.

---
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches: [main]

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
id-token: write

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

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm dlx semantic-release
45 changes: 45 additions & 0 deletions .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Close stale issues"

# Controls when the action will run.
on:
schedule:
- cron: "0 0 * * *"

jobs:
cleanup:
runs-on: ubuntu-latest
name: Stale issue job
steps:
- uses: aws-actions/stale-issue-cleanup@v3
with:
# Setting messages to an empty string will cause the automation to skip
# that category
ancient-issue-message: Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
stale-issue-message: This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
stale-pr-message: This PR has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the PR from automatically closing.
# These labels are required
stale-issue-label: stale
exempt-issue-label: 'pinned, security, no-autoclose'
stale-pr-label: stale
exempt-pr-label: pr/needs-review
response-requested-label: response-requested

# Don't set closed-for-staleness label to skip closing very old issues
# regardless of label
closed-for-staleness-label: closed-for-staleness

# Issue timing
days-before-stale: 7
days-before-close: 2
days-before-ancient: 365

# If you don't want to mark a issue as being ancient based on a
# threshold of "upvotes", you can set this here. An "upvote" is
# the total number of +1, heart, hooray, and rocket reactions
# on an issue.
minimum-upvotes-to-exempt: 10

repo-token: ${{ secrets.GITHUB_TOKEN }}
loglevel: DEBUG
# Set dry-run to true to not perform label or close actions.
# dry-run: true
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on:
push:
branches: [main, develop]
pull_request:

jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}
timeout-minutes: 10

steps:
- name: TODO
run: echo "TODO test"
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version-file: '.nvmrc'
#
# - name: Setup pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# run_install: true
#
# - name: Type check
# run: pnpm type-check
#
# - name: Lint
# run: pnpm lint
#
# - name: Build
# run: pnpm build
#
# - name: Install tinyproxy
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo apt-get install tinyproxy
# tinyproxy
# - name: Test
# env:
# OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
# run: |
# pnpm test
# pnpm --use-node-version=14.21.3 test
Loading

0 comments on commit 3236e69

Please sign in to comment.