Skip to content

Commit

Permalink
feat: finish
Browse files Browse the repository at this point in the history
  • Loading branch information
molvqingtai committed Mar 10, 2024
1 parent bea847c commit 4049d67
Show file tree
Hide file tree
Showing 14 changed files with 4,358 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
21 changes: 21 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["standard", "standard-with-typescript", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.eslint.json"
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
40 changes: 40 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CD

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: pnpm/[email protected]
with:
version: latest
- run: pnpm install --ignore-scripts
- run: pnpm run lint
- run: pnpm run tsc
release:
needs: linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: pnpm/[email protected]
with:
version: latest
- run: pnpm install --ignore-scripts
- run: pnpm run build
- run: pnpx semantic-release
env:
GH_TOKEN: ${{ secrets.EVENT_HUB_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.EVENT_HUB_NPM_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: pnpm/[email protected]
with:
version: latest
- run: pnpm install --ignore-scripts
- run: pnpm run lint
- run: pnpm run tsc
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

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

pnpm run lint & pnpm run tsc
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 120
}
13 changes: 13 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/git"
]
}
57 changes: 57 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "testing-library-by-class",
"version": "1.0.0",
"description": "This is a minimalist event hub.",
"main": "dist/index.js",
"type": "module",
"types": "dist/types/index.d.ts",
"scripts": {
"dev": "tsc --watch",
"build": "npm run clean && tsc",
"tsc": "tsc --noEmit",
"lint": "eslint src --ext .js,.ts --cache --fix",
"clean": "rm -rf dist",
"prepare": "husky"
},
"author": "molvqingtai",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/molvqingtai/testing-library-by-class.git"
},
"bugs": {
"url": "https://github.com/molvqingtai/testing-library-by-class/issues"
},
"homepage": "https://github.com/molvqingtai/testing-library-by-class#readme",
"keywords": [
"testing-library",
"puppeteer",
"playwright",
"jest",
"vitest"
],
"dependencies": {
"@testing-library/dom": "^9.3.4"
},
"devDependencies": {
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"semantic-release": "^23.0.2",
"typescript": "^5.3.3"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 4049d67

Please sign in to comment.