Skip to content

Commit 85a509b

Browse files
committed
init
0 parents  commit 85a509b

31 files changed

+6496
-0
lines changed

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
actions: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
id-token: write
22+
steps:
23+
- uses: actions/checkout@v5
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: "20.x"
27+
registry-url: "https://registry.npmjs.org"
28+
- run: |
29+
apt install jq curl -y
30+
pv=$(jq -r .version package.json)
31+
rv=$(curl -s https://registry.npmjs.org/$(jq -r .name package.json) | jq -r '."dist-tags".latest')
32+
[ "$pv" = "$rv" ] && exit 0
33+
npm ci
34+
npm run build
35+
- run: npm publish --provenance --access public
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

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

LICENSE.md

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

eslint.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import tseslint from 'typescript-eslint'
2+
import stylistic from '@stylistic/eslint-plugin'
3+
4+
export default tseslint.config(
5+
{
6+
ignores: [
7+
'dist/**',
8+
'build/**',
9+
'node_modules/**'
10+
]
11+
},
12+
{
13+
files: ['**/*.ts'],
14+
languageOptions: {
15+
parser: tseslint.parser,
16+
parserOptions: {
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
project: './tsconfig.json',
20+
tsconfigRootDir: import.meta.dirname
21+
}
22+
},
23+
plugins: {
24+
'@typescript-eslint': tseslint.plugin,
25+
'@stylistic': stylistic
26+
},
27+
extends: [
28+
...tseslint.configs.recommended
29+
],
30+
rules: {
31+
'@stylistic/semi': ['error', 'always'],
32+
'@stylistic/member-delimiter-style': ['error', {
33+
multiline: { delimiter: 'semi', requireLast: true },
34+
singleline: { delimiter: 'semi', requireLast: true }
35+
}],
36+
'@typescript-eslint/no-explicit-any': 'off',
37+
'@typescript-eslint/no-extraneous-class': 'off',
38+
'@typescript-eslint/no-unsafe-function-type': 'off',
39+
'@typescript-eslint/no-unused-vars': 'off'
40+
}
41+
}
42+
)

0 commit comments

Comments
 (0)