Skip to content

Commit 28d9325

Browse files
committed
init commit
0 parents  commit 28d9325

29 files changed

+5446
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: NPM Publish
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: actions/setup-node@v5
16+
with:
17+
cache: 'npm'
18+
node-version: 22
19+
- run: npm ci --ignore-scripts --no-audit --no-fund
20+
- run: npm test
21+
22+
publish-npm:
23+
needs: test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v5
27+
- uses: actions/setup-node@v5
28+
with:
29+
node-version: 22
30+
cache: 'npm'
31+
registry-url: https://registry.npmjs.org/
32+
- run: npm ci --ignore-scripts --no-audit --no-fund
33+
- run: npm run build
34+
- run: npm publish --public
35+
env:
36+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Test
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
test:
14+
name: Unit tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
- name: Use Node.js
19+
uses: actions/setup-node@v5
20+
with:
21+
cache: 'npm'
22+
node-version: 22
23+
- name: Install dependencies
24+
run: npm ci --ignore-scripts --no-audit --no-fund
25+
- name: Install Playwright Browsers
26+
run: npx playwright install chromium --no-shell
27+
- run: npm test -- --forbid-only
28+
29+
check-ts:
30+
name: Check types
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v5
34+
- name: Use Node.js
35+
uses: actions/setup-node@v5
36+
with:
37+
cache: 'npm'
38+
node-version: 22
39+
- run: npm ci --ignore-scripts --no-audit --no-fund
40+
- run: npm run check
41+
42+
lint-code:
43+
name: Check types
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v5
47+
- name: Use Node.js
48+
uses: actions/setup-node@v5
49+
with:
50+
cache: 'npm'
51+
node-version: 22
52+
- run: npm ci --ignore-scripts --no-audit --no-fund
53+
- run: npm run lint
54+
55+
lint-package:
56+
name: Lint package
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v5
61+
- name: Use Node.js
62+
uses: actions/setup-node@v5
63+
with:
64+
cache: 'npm'
65+
node-version: 22
66+
- run: npm ci --ignore-scripts --no-audit --no-fund
67+
- name: Build package
68+
run: npm run build
69+
- name: Lint package
70+
run: npm run lint-package
71+
72+
npm-audit:
73+
name: Audit packages
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Checkout code
77+
uses: actions/checkout@v5
78+
- name: Use Node.js
79+
uses: actions/setup-node@v5
80+
with:
81+
cache: 'npm'
82+
node-version: 22
83+
- name: npm audit
84+
run: npm audit --audit-level=high

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/test-results
2+
/node_modules
3+
/dist
4+
/coverage

.oxlintrc.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"import",
5+
"typescript",
6+
"oxc",
7+
"unicorn"
8+
],
9+
"env": {
10+
"node": true,
11+
"browser": true,
12+
"es2024": true
13+
},
14+
"categories": {
15+
"perf": "error",
16+
"correctness": "error",
17+
"pedantic": "error"
18+
},
19+
"rules": {
20+
"unicorn/no-null": "error",
21+
"unicorn/prefer-set-has": "off",
22+
"prefer-string-slice": "off",
23+
"prefer-code-point": "off",
24+
"no-lonely-if": "off",
25+
"no-unused-vars": "off",
26+
"no-await-in-loop": "off",
27+
"prefer-query-selector": "off",
28+
"max-dependencies": "off",
29+
"ban-types": "off",
30+
"no-undefined": "off",
31+
"no-useless-undefined": "off",
32+
"max-classes-per-file": "off",
33+
"max-lines-per-function": "off",
34+
"prefer-math-trunc": "off",
35+
"max-lines": "off",
36+
"max-depth": [
37+
"warn",
38+
{
39+
"max": 5
40+
}
41+
],
42+
"explicit-function-return-type": "off",
43+
"no-console": "off",
44+
"no-optional-chaining": "off",
45+
"no-commonjs": "off",
46+
"unambiguous": "off",
47+
"no-default-export": "off",
48+
"no-async-await": "off",
49+
"no-non-null-assertion": "off",
50+
"no-plusplus": "off",
51+
"no-bitwise": "off",
52+
"default-case": "off",
53+
"no-rest-spread-properties": "off",
54+
"require-await": "warn"
55+
},
56+
"overrides": [
57+
{
58+
"files": [
59+
"*.svelte"
60+
],
61+
"rules": {
62+
"no-unassigned-vars": "off"
63+
}
64+
},
65+
{
66+
"files": [
67+
".stylelintrc.mjs"
68+
],
69+
"rules": {
70+
"unicorn/no-null": "off"
71+
}
72+
}
73+
]
74+
}

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"semi": false,
6+
"printWidth": 140
7+
}

0 commit comments

Comments
 (0)