3 Commits

18 changed files with 2181 additions and 4233 deletions

View File

@ -1 +0,0 @@
{ "extends": ["@commitlint/config-conventional"] }

View File

@ -1,11 +0,0 @@
{
"extends": ["conventions", "prettier"],
"plugins": ["prettier", "import", "unicorn"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"prettier/prettier": "error",
"import/extensions": ["error", "always"]
}
}

View File

@ -4,16 +4,16 @@ on:
push: push:
branches: [develop] branches: [develop]
pull_request: pull_request:
branches: [master, develop] branches: [main, develop]
jobs: jobs:
lint: lint:
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps:
- uses: "actions/checkout@v4.1.1" - uses: "actions/checkout@v4.1.7"
- name: "Setup Node.js" - name: "Setup Node.js"
uses: "actions/setup-node@v4.0.2" uses: "actions/setup-node@v4.0.3"
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: "npm" cache: "npm"
@ -21,9 +21,15 @@ jobs:
- name: "Install dependencies" - name: "Install dependencies"
run: "npm clean-install" run: "npm clean-install"
- run: 'npm run lint:commit -- --to "${{ github.sha }}"' - run: "node --run lint:editorconfig"
- run: "npm run lint:editorconfig" - run: "node --run lint:markdown"
- run: "npm run lint:markdown" - run: "node --run lint:eslint"
- run: "npm run lint:eslint" - run: "node --run lint:prettier"
- run: "npm run lint:prettier" - run: "node --run lint:typescript"
- run: "npm run lint:javascript"
commitlint:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.7"
- uses: "wagoid/commitlint-github-action@v6.1.2"

View File

@ -2,7 +2,7 @@ name: "Release"
on: on:
push: push:
branches: [master] branches: [main]
jobs: jobs:
release: release:
@ -13,13 +13,13 @@ jobs:
pull-requests: "write" pull-requests: "write"
id-token: "write" id-token: "write"
steps: steps:
- uses: "actions/checkout@v4.1.1" - uses: "actions/checkout@v4.1.7"
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: "Setup Node.js" - name: "Setup Node.js"
uses: "actions/setup-node@v4.0.2" uses: "actions/setup-node@v4.0.3"
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: "npm" cache: "npm"
@ -31,7 +31,7 @@ jobs:
run: "npm audit signatures" run: "npm audit signatures"
- name: "Release" - name: "Release"
run: "npm run release" run: "node --run release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -4,16 +4,16 @@ on:
push: push:
branches: [develop] branches: [develop]
pull_request: pull_request:
branches: [master, develop] branches: [main, develop]
jobs: jobs:
test: test:
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps:
- uses: "actions/checkout@v4.1.1" - uses: "actions/checkout@v4.1.7"
- name: "Setup Node.js" - name: "Setup Node.js"
uses: "actions/setup-node@v4.0.2" uses: "actions/setup-node@v4.0.3"
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: "npm" cache: "npm"
@ -22,4 +22,4 @@ jobs:
run: "npm clean-install" run: "npm clean-install"
- name: "Test" - name: "Test"
run: "npm run test" run: "node --run test"

4
.gitignore vendored
View File

@ -20,10 +20,6 @@ npm-debug.log*
# IDE - VSCode # IDE - VSCode
.vscode/* .vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc # misc
.DS_Store .DS_Store

View File

@ -1,3 +0,0 @@
#!/usr/bin/env sh
npm run lint:commit -- --edit

View File

@ -1,5 +0,0 @@
#!/usr/bin/env sh
npm run lint:staged
npm run lint:javascript
npm run test

View File

@ -1,7 +0,0 @@
{
"**/*": ["editorconfig-checker", "prettier --write --ignore-unknown"],
"**/*.md": ["markdownlint-cli2 --fix --no-globs"],
"**/*.{js,jsx,ts,tsx}": [
"eslint --fix --max-warnings 0 --report-unused-disable-directives"
]
}

4
.npmrc
View File

@ -1,2 +1,2 @@
save-exact=true save-exact = true
provenance=true provenance = true

View File

@ -1,18 +1,8 @@
{ {
"branches": ["master"], "branches": ["main", { "name": "beta", "prerelease": true }],
"plugins": [ "plugins": [
[ "@semantic-release/commit-analyzer",
"@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/npm", "@semantic-release/npm",
"@semantic-release/github" "@semantic-release/github"
] ]

View File

@ -1,8 +0,0 @@
{
"recommendations": [
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint"
]
}

View File

@ -1,8 +0,0 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.configPath": ".prettierrc.json",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
}

View File

@ -107,7 +107,7 @@ We recommend configuring [markdownlint-cli2](https://github.com/DavidAnson/markd
## Usage ## Usage
```sh ```sh
npm run lint:markdown node --run lint:markdown
``` ```
## 💡 Contributing ## 💡 Contributing

13
eslint.config.mjs Normal file
View File

@ -0,0 +1,13 @@
import typescriptESLint from "typescript-eslint"
import configConventions from "eslint-config-conventions"
export default typescriptESLint.config(...configConventions, {
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptESLint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
})

6239
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,46 +26,35 @@
"provenance": true "provenance": true
}, },
"engines": { "engines": {
"node": ">=16.0.0", "node": ">=16.0.0"
"npm": ">=9.0.0"
}, },
"scripts": { "scripts": {
"lint:commit": "commitlint",
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",
"lint:markdown": "markdownlint-cli2", "lint:markdown": "markdownlint-cli2",
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives --ignore-path .gitignore", "lint:eslint": "eslint . --max-warnings 0",
"lint:prettier": "prettier . --check --ignore-path .gitignore", "lint:prettier": "prettier . --check",
"lint:javascript": "tsc --project jsconfig.json --noEmit", "lint:typescript": "tsc --noEmit",
"lint:staged": "lint-staged",
"test": "node --test", "test": "node --test",
"release": "semantic-release", "release": "semantic-release"
"postinstall": "husky",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
}, },
"dependencies": { "dependencies": {
"markdown-it": "14.1.0" "markdown-it": "14.1.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "19.2.2", "@types/markdown-it": "14.1.2",
"@commitlint/config-conventional": "19.2.2", "@types/node": "22.9.0",
"@types/markdown-it": "14.1.1", "editorconfig-checker": "6.0.0",
"@types/node": "20.12.12", "eslint": "9.14.0",
"editorconfig-checker": "5.1.5", "eslint-config-conventions": "17.0.0",
"eslint": "8.57.0", "eslint-plugin-promise": "7.1.0",
"eslint-config-conventions": "14.2.0", "eslint-plugin-unicorn": "56.0.0",
"eslint-config-prettier": "9.1.0", "eslint-plugin-import-x": "4.4.0",
"eslint-plugin-import": "2.29.1", "globals": "15.12.0",
"eslint-plugin-prettier": "5.1.3", "markdownlint": "0.36.1",
"eslint-plugin-promise": "6.2.0", "markdownlint-cli2": "0.15.0",
"eslint-plugin-unicorn": "53.0.0", "prettier": "3.3.3",
"husky": "9.0.11",
"lint-staged": "15.2.5",
"markdownlint": "0.34.0",
"markdownlint-cli2": "0.13.0",
"pinst": "3.0.0",
"prettier": "3.2.5",
"semantic-release": "23.1.1", "semantic-release": "23.1.1",
"typescript": "5.4.5" "typescript-eslint": "8.13.0",
"typescript": "5.6.3"
} }
} }

View File

@ -2,8 +2,8 @@
"compilerOptions": { "compilerOptions": {
"lib": ["ESNext"], "lib": ["ESNext"],
"target": "ESNext", "target": "ESNext",
"module": "CommonJS", "module": "NodeNext",
"moduleResolution": "Node", "moduleResolution": "NodeNext",
"checkJs": true, "checkJs": true,
"allowJs": true, "allowJs": true,
"noEmit": true, "noEmit": true,