Skip to content

Commit 59090e0

Browse files
committed
Initial commit
0 parents  commit 59090e0

44 files changed

Lines changed: 10751 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.{yml,yaml}]
13+
indent_size = 2

.eslintrc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "no-only-tests", "eslint-comments"],
5+
"ignorePatterns": ["node_modules", "dist"],
6+
"parserOptions": {
7+
"project": ["./tsconfig.json", "./tsconfig.node.json", "./test/tsconfig.json"],
8+
"tsconfigRootDir": ".",
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
/*
13+
forgot to remove/implement
14+
*/
15+
"no-console": "warn",
16+
"no-debugger": "warn",
17+
"prefer-const": "warn",
18+
"require-await": "warn",
19+
"@typescript-eslint/no-unused-vars": [
20+
"warn",
21+
{
22+
"argsIgnorePattern": "^_",
23+
"varsIgnorePattern": "^_",
24+
"caughtErrorsIgnorePattern": "^_"
25+
}
26+
],
27+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
28+
"@typescript-eslint/no-unnecessary-condition": "warn",
29+
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
30+
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
31+
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
32+
"@typescript-eslint/no-useless-empty-export": "warn",
33+
"@typescript-eslint/no-empty-function": "warn",
34+
"no-empty": "warn",
35+
"@typescript-eslint/no-unused-expressions": [
36+
"warn",
37+
{"allowShortCircuit": true, "allowTernary": true}
38+
],
39+
"eslint-comments/no-unused-disable": "warn",
40+
/*
41+
code style | readability
42+
*/
43+
"@typescript-eslint/explicit-function-return-type": [
44+
"warn",
45+
{
46+
"allowExpressions": true,
47+
"allowTypedFunctionExpressions": true,
48+
"allowHigherOrderFunctions": true,
49+
"allowDirectConstAssertionInArrowFunctions": true,
50+
"allowConciseArrowFunctionExpressionsStartingWithVoid": true,
51+
"allowIIFEs": true
52+
}
53+
],
54+
/*
55+
prevent unexpected behavior
56+
*/
57+
"@typescript-eslint/ban-types": "warn",
58+
"@typescript-eslint/switch-exhaustiveness-check": "warn",
59+
"no-fallthrough": ["warn", {"allowEmptyCase": true}],
60+
/*
61+
tests
62+
*/
63+
"no-only-tests/no-only-tests": "warn"
64+
}
65+
}

.github/workflows/format.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
format:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
# Give the default GITHUB_TOKEN write permission to commit and push the
13+
# added or changed files to the repository.
14+
contents: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: pnpm/action-setup@v4
20+
21+
- name: Setup Node.js environment
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: pnpm
26+
27+
- name: Install dependencies
28+
run: |
29+
pnpm install --no-frozen-lockfile --ignore-scripts
30+
git restore .
31+
32+
- name: Setup prettier cache
33+
uses: actions/cache@v4
34+
with:
35+
path: node_modules/.cache/prettier
36+
key: prettier-${{ github.sha }}
37+
restore-keys: |
38+
prettier-
39+
40+
- name: Format
41+
run: pnpm run format
42+
43+
- name: Add, Commit and Push
44+
uses: stefanzweifel/git-auto-commit-action@v5
45+
with:
46+
commit_message: "Format"

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
build_test:
13+
name: Build and Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
20+
- name: Setup Node.js environment
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: pnpm
25+
26+
- name: Install dependencies
27+
run: pnpm install --no-frozen-lockfile --ignore-scripts
28+
29+
- name: Build package
30+
run: pnpm run build
31+
32+
- name: Test
33+
run: pnpm run test
34+
35+
- name: Lint
36+
run: pnpm lint

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode/settings.json
2+
3+
dist
4+
node_modules
5+
storybook-static

.prettierignore

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

.prettierrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"trailingComma": "all",
3+
"tabWidth": 4,
4+
"printWidth": 100,
5+
"semi": false,
6+
"singleQuote": false,
7+
"useTabs": true,
8+
"arrowParens": "avoid",
9+
"bracketSpacing": false,
10+
"endOfLine": "lf",
11+
"plugins": [],
12+
"overrides": [
13+
{
14+
"files": ["*.yml", "*.yaml"],
15+
"options": {
16+
"tabWidth": 2
17+
}
18+
},
19+
{
20+
"files": ["*.md"],
21+
"options": {
22+
"tabWidth": 2,
23+
"useTabs": false,
24+
"printWidth": 80
25+
}
26+
}
27+
]
28+
}

.storybook/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type {StorybookConfig} from "storybook-solidjs-vite"
2+
3+
export default {
4+
stories: ["../stories/**/*.stories.@(ts|tsx)"],
5+
framework: "storybook-solidjs-vite",
6+
} satisfies StorybookConfig

.storybook/preview.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type {Preview} from "storybook-solidjs-vite"
2+
3+
export default {
4+
parameters: {
5+
controls: {expanded: true},
6+
},
7+
} satisfies Preview

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) 2023 Damian Tarnawski, David Di Biase
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.

0 commit comments

Comments
 (0)