Skip to content

Commit 643aa8f

Browse files
committed
Initial commit
0 parents  commit 643aa8f

11 files changed

Lines changed: 886 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# vim: sw=2
2+
name: Misc
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
jobs:
15+
check-version-bump:
16+
name: Check version bump
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Check if version bumped
21+
uses: del-systems/check-if-version-bumped@v2
22+

.github/workflows/lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# vim: sw=2
2+
name: Lint
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
jobs:
15+
type-check:
16+
name: Type check
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install tsc
21+
run: npm install
22+
- name: Run tsc
23+
run: npm run typecheck
24+
25+
xo:
26+
name: xo
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Install tsc
31+
run: npm install
32+
- name: Run linters
33+
run: npm run lint

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# vim: sw=2
2+
name: Publish
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
test:
10+
name: Publish new version
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build
25+
run: npm run build
26+
27+
- name: Publish
28+
run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

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

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 silicon-heaven
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# vue-shv
2+
Vue support for libshv-js

eslint.config.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import xo from "eslint-config-xo";
2+
import typescriptEslintParser from "@typescript-eslint/parser";
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import unicornPlugin from 'eslint-plugin-unicorn';
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
eslint.configs.recommended,
10+
...tseslint.configs.recommendedTypeChecked,
11+
...tseslint.configs.stylisticTypeChecked,
12+
unicornPlugin.configs.recommended,
13+
...xo,
14+
{
15+
languageOptions: {
16+
parser: typescriptEslintParser,
17+
parserOptions: {
18+
project: "./tsconfig.json",
19+
},
20+
},
21+
rules: {
22+
"@stylistic/function-paren-newline": ["off"],
23+
"@stylistic/indent": ["error", 4],
24+
"@stylistic/indent-binary-ops": ["error", 4],
25+
"@stylistic/max-len": ["off"],
26+
"@stylistic/multiline-ternary": ["off"],
27+
"@stylistic/operator-linebreak": ["off"],
28+
"@typescript-eslint/no-misused-promises": ["error", {
29+
checksVoidReturn: false
30+
}],
31+
"@typescript-eslint/no-unsafe-assignment": ["off"],
32+
"@typescript-eslint/no-unsafe-call": ["off"],
33+
"@typescript-eslint/no-unsafe-enum-comparison": ["off"],
34+
"@typescript-eslint/consistent-type-definitions": ["error",
35+
"type"
36+
],
37+
"@typescript-eslint/array-type": ["error", {
38+
default: "array-simple"
39+
}],
40+
"@typescript-eslint/naming-convention": ["error",
41+
{
42+
"selector": "variableLike",
43+
"format": ["camelCase"]
44+
},
45+
{
46+
"selector": "variableLike",
47+
"format": null,
48+
"modifiers": ["unused"]
49+
},
50+
{
51+
"format": ["camelCase", "UPPER_CASE"],
52+
"selector": "variable",
53+
"modifiers": ["const"]
54+
},
55+
{
56+
"format": ["PascalCase"],
57+
"selector": "variable",
58+
"modifiers": ["const"],
59+
"filter": "Validation$|Zod$"
60+
}
61+
],
62+
"@typescript-eslint/prefer-promise-reject-errors": "off",
63+
"@typescript-eslint/promise-function-async": "off",
64+
"@typescript-eslint/strict-boolean-expressions": ["error",
65+
{
66+
"allowString": false,
67+
"allowNumber": false,
68+
"allowNullableObject": false
69+
}
70+
],
71+
"@typescript-eslint/triple-slash-reference": "off",
72+
"capitalized-comments": "off",
73+
"@stylistic/object-curly-newline": ["error", {
74+
"ImportDeclaration": "never"
75+
}],
76+
"n/file-extension-in-import": "off",
77+
"promise-function-async": "off",
78+
"camelcase": "off",
79+
"default-case": "off",
80+
"import/extensions": "off",
81+
"import/no-unassigned-import": "off",
82+
"no-dupe-class-members": "off",
83+
"no-negated-condition": "off",
84+
"no-redeclare": "off",
85+
"no-unused-vars": "off",
86+
"no-useless-constructor": "off",
87+
"no-void": ["error", {
88+
allowAsStatement: true
89+
}],
90+
"no-warning-comments": "off",
91+
"prefer-promise-reject-errors": "off",
92+
"unicorn/consistent-function-scoping": "off",
93+
"unicorn/explicit-length-check": "off",
94+
"unicorn/filename-case": "off",
95+
"unicorn/no-negated-condition": "off",
96+
"unicorn/no-useless-undefined": ["error", {
97+
checkArguments: false
98+
}],
99+
"unicorn/prefer-top-level-await": "off",
100+
"unicorn/switch-case-braces": "off",
101+
"unicorn/prevent-abbreviations": "off",
102+
}
103+
}
104+
);

package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "vue-shv",
3+
"version": "1.0.0",
4+
"description": "Vue support for libshv-js",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"files": [
8+
"dist"
9+
],
10+
"scripts": {
11+
"lint": "eslint --format unix src/",
12+
"fix": "npm run lint -- --fix",
13+
"build": "tsc",
14+
"typecheck": "tsc --noEmit"
15+
},
16+
"author": "Elektroline",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/silicon-heaven/vue-shv.git"
20+
},
21+
"bugs": {
22+
"url": "https://github.com/silicon-heaven/vue-shv/issues"
23+
},
24+
"homepage": "https://github.com/silicon-heaven/vue-shv",
25+
"exports": {
26+
".": "./dist/index.js",
27+
"./vue-shv": "./dist/vue-shv.js"
28+
},
29+
"dependencies": {
30+
"@vueuse/core": "^13.5.0",
31+
"js-pkce": "^2.0.0",
32+
"libshv-js": "^3.24.0",
33+
"vue": "^3.5.22"
34+
},
35+
"devDependencies": {
36+
"@typescript-eslint/parser": "^8.38.0",
37+
"eslint": "^9.31.0",
38+
"eslint-config-xo": "^0.49.0",
39+
"eslint-formatter-unix": "^8.40.0",
40+
"eslint-plugin-unicorn": "^60.0.0",
41+
"typescript": "^5.8.3",
42+
"typescript-eslint": "^8.38.0"
43+
}
44+
}

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './vue-shv';

0 commit comments

Comments
 (0)