Skip to content

Commit

Permalink
feat: initial
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Jul 2, 2024
0 parents commit 7e39631
Show file tree
Hide file tree
Showing 46 changed files with 9,124 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

root = true

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

[*.{diff,md}]
trim_trailing_whitespace = false
16 changes: 16 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/docker
node_modules
**/coverage/
*.js
!.storybook
.changeset
dist
CHANGELOG.md
*.typegen.ts
.next/
kube-manifests/
buildspec.yml
deployspec.yml
.storybook/*.html
cz-adapter.cjs
LICENSE
103 changes: 103 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"extends": ["airbnb-base", "prettier"],
"plugins": ["json", "prettier"],
"env": {
"es2020": true
},
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"endOfLine": "auto"
}
],
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-await-in-loop": "off",
"no-continue": "off",
"no-plusplus": "off",
"no-bitwise": "off",
"no-empty": "off",
"consistent-return": "off",
"no-promise-executor-return": "off",
"class-methods-use-this": "off",
"import/no-cycle": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_|[pP]rops$"
}
],
"@typescript-eslint/return-await": "off"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.mts"],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"airbnb-typescript/base",
"prettier"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"plugins": [
"@typescript-eslint",
"unused-imports",
"prettier"
],
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"endOfLine": "auto"
}
],
"import/extensions": "off",
"@typescript-eslint/comma-dangle": "off",
"import/prefer-default-export": "off",
"import/order": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/consistent-type-imports": "off",
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-await-in-loop": "off",
"no-continue": "off",
"no-plusplus": "off",
"no-bitwise": "off",
"no-empty": "off",
"consistent-return": "off",
"no-promise-executor-return": "off",
"class-methods-use-this": "off",
"import/no-cycle": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_|[pP]rops$"
}
],
"@typescript-eslint/return-await": "off",
"guard-for-in": "off",
"no-restricted-syntax": "off",
"@typescript-eslint/no-explicit-any": "off",
"max-classes-per-file": "off",
"no-underscore-dangle": "off",
"@typescript-eslint/naming-convention": "off",
"no-alert": "off",
"@typescript-eslint/ban-types": "off",
"import/no-extraneous-dependencies": "off"
}
}
]
}
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [nicepkg, 2214962083]
open_collective: nicepkg
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
push:
branches:
- '**'

jobs:
release:
if: "contains(github.event.head_commit.message, 'chore: release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: https://registry.npmjs.org/
cache: pnpm

- run: pnpm install

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm run test

- name: Publish
run: pnpm run publish
env:
VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
OVSX_TOKEN: ${{secrets.OVSX_TOKEN}}

- name: Git commit
id: commit
run: |
git config --local user.email github-actions[bot]@users.noreply.github.com
git config --local user.name github-actions[bot]
git config --global core.autocrlf true
git config --global core.safecrlf false
git add .
git commit -m "chore: ci build" -a
continue-on-error: true

- name: Git push
uses: ad-m/github-push-action@master
if: ${{ steps.commit.outcome == 'success' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

- name: Log
if: ${{ steps.commit.outcome != 'success' }}
run: echo Nothing to commit.
39 changes: 39 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check

on:
push:
branches:
- '**'
pull_request:
branches:
- master

jobs:
check:
if: "!contains(github.event.head_commit.message, 'chore: release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: https://registry.npmjs.org/
cache: pnpm

- run: pnpm install

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm run test

- name: Build
run: pnpm run build
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release-please

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release

- name: Release Please Results
env:
RESULTS: ${{ toJSON(steps.release.outputs) }}
run: echo "$RESULTS"
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.cache
.DS_Store
.idea
*.log
*.tgz
*.vsix
coverage
dist
lib-cov
logs
node_modules
temp
.aider*
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec commitlint --edit ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run test
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore-workspace-root-check=true
node-linker=hoisted
15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**/*.template
.changeset
.coverage_*
.github
CHANGELOG.md
coverage
dist
node_modules
pnpm-lock.yaml
*.hbs
.next/
kube-manifests/
buildspec.yml
deployspec.yml
/docker
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ ".": "0.0.1" }
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: dev"
}
]
}
60 changes: 60 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"i18n-ally.pathMatcher": "package.nls.{locale}.json",
"i18n-ally.keystyle": "flat",
"i18n-ally.localesPaths": ["."],
"i18n-ally.enabledFrameworks": ["vscode", "react"],
"i18n-ally.dirStructure": "file",
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"json",
"jsonc",
"yaml"
],
"editor.tabSize": 2,
"editor.detectIndentation": false,
"search.exclude": {
"package-lock.json": true
},
"editor.codeActionsOnSave": [
"source.addMissingImports",
"source.fixAll.eslint"
],
"typescript.tsdk": "node_modules/typescript/lib", // Use the workspace version of TypeScript
"typescript.enablePromptUseWorkspaceTsdk": true, // For security reasons it's require that users opt into using the workspace version of typescript
"typescript.preferences.preferTypeOnlyAutoImports": true, // Prefer type-only imports
"testing.openTesting": "neverOpen", // Don't open the testing view automatically when running tests
"prettier.ignorePath": ".gitignore", // Don't run prettier for files listed in .gitignore
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"typescript.inlayHints.parameterNames.enabled": "all",
// "typescript.inlayHints.variableTypes.enabled": true,
// "typescript.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.inlayHints.parameterTypes.enabled": true,
// "typescript.inlayHints.functionLikeReturnTypes.enabled": true,

"workbench.colorCustomizations": {
"activityBar.background": "#0E3140",
"titleBar.activeBackground": "#14455A",
"titleBar.activeForeground": "#F8FCFD"
},
"cSpell.words": [
"commitlint",
"esno",
"execa",
"ianvs",
"knip",
"Nicepkg",
"nodir",
"tsup",
"vsix"
]
}
Loading

0 comments on commit 7e39631

Please sign in to comment.