Skip to content

Commit 144b895

Browse files
committed
chore: init
0 parents  commit 144b895

File tree

15 files changed

+3355
-0
lines changed

15 files changed

+3355
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
validate:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- run: corepack enable
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 18
17+
cache: yarn
18+
19+
- run: yarn
20+
21+
- run: yarn prettier --check .
22+
23+
- run: yarn lint --no-fix
24+
25+
- run: yarn build
26+
27+
- run: yarn test

.gitignore

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
*.tgz
2+
3+
# Build output
4+
dist
5+
6+
# Yarn
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions
14+
15+
# Logs
16+
logs
17+
*.log
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
# Runtime data
23+
pids
24+
*.pid
25+
*.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
lib-cov
30+
31+
# Coverage directory used by tools like istanbul
32+
coverage
33+
34+
# nyc test coverage
35+
.nyc_output
36+
37+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
38+
.grunt
39+
40+
# Bower dependency directory (https://bower.io/)
41+
bower_components
42+
43+
# node-waf configuration
44+
.lock-wscript
45+
46+
# Compiled binary addons (https://nodejs.org/api/addons.html)
47+
build/Release
48+
49+
# Dependency directories
50+
node_modules/
51+
jspm_packages/
52+
53+
# TypeScript v1 declaration files
54+
typings/
55+
56+
# Optional npm cache directory
57+
.npm
58+
59+
# Optional eslint cache
60+
.eslintcache
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variables file
69+
.env
70+
71+
# npm lockfile
72+
package-lock.json
73+
74+
# Generated by Cargo
75+
# will have compiled files and executables
76+
debug/
77+
target/
78+
79+
# These are backup files generated by rustfmt
80+
**/*.rs.bk
81+
82+
# MSVC Windows builds of rustc generate these, which store debugging information
83+
*.pdb

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
coverage
3+
4+
# Yarn
5+
yarn.lock
6+
.yarn
7+
.pnp.*

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"useTabs": true
3+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
3+
}

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"typescript.enablePromptUseWorkspaceTsdk": true,
4+
"search.exclude": {
5+
"**/.yarn": true
6+
},
7+
"editor.formatOnSave": true,
8+
"editor.defaultFormatter": "esbenp.prettier-vscode",
9+
"editor.codeActionsOnSave": {
10+
"source.fixAll.eslint": "explicit"
11+
},
12+
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
13+
"eslint.useFlatConfig": true
14+
}

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

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) 2024 Kristoffer K.
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.

eslint.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// @ts-check
2+
3+
import fs from "node:fs";
4+
import eslint from "@eslint/js";
5+
import tseslint from "typescript-eslint";
6+
import prettier from "eslint-config-prettier";
7+
8+
export default tseslint.config(
9+
eslint.configs.recommended,
10+
...tseslint.configs.strictTypeChecked,
11+
...tseslint.configs.stylisticTypeChecked,
12+
prettier,
13+
{
14+
languageOptions: {
15+
parserOptions: {
16+
projectService: true,
17+
},
18+
},
19+
linterOptions: {
20+
reportUnusedDisableDirectives: "error",
21+
},
22+
rules: {
23+
"no-undef": "off",
24+
},
25+
},
26+
{
27+
ignores: (
28+
await fs.promises.readFile(
29+
new URL("./.prettierignore", import.meta.url),
30+
"utf8",
31+
)
32+
)
33+
.split("\n")
34+
.filter((line) => line.trim() && !line.startsWith("#")),
35+
},
36+
);

0 commit comments

Comments
 (0)