Skip to content

Commit 532fea3

Browse files
init
0 parents  commit 532fea3

File tree

18 files changed

+538
-0
lines changed

18 files changed

+538
-0
lines changed

.editorconfig

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

.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/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://github.com/orgs/community/discussions/26276#discussioncomment-3251141
2+
name: CI Lint
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
- run: npm install
16+
- run: npm run lint

.github/workflows/test-pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://github.com/orgs/community/discussions/26276#discussioncomment-3251141
2+
name: CI Test
3+
on:
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Node.js ${{ matrix.node-version }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
node-version: [18, 20, 21]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- run: npm install
19+
- run: npm test

.github/workflows/test-push.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://github.com/orgs/community/discussions/26276#discussioncomment-3251141
2+
name: CI Test
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
test:
9+
name: Node.js ${{ matrix.node-version }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
node-version: [18, 20, 21]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: npm install
21+
- run: npm test

.gitignore

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

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.xo-config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export default {
2+
extends: ["plugin:@phaphoso/dprint/disable-conflict-rules"],
3+
rules: {
4+
"object-shorthand": "off",
5+
"unicorn/prefer-regexp-test": "off",
6+
"no-warning-comments": ["warn", { decoration: ["/", "*"] }],
7+
"capitalized-comments": ["error", "always", {
8+
ignorePattern: "dprint-ignore|pragma|ignore|prettier-ignore|webpack\\w+:|c8|type-coverage:",
9+
ignoreInlineComments: true,
10+
ignoreConsecutiveComments: true,
11+
}],
12+
"import/order": ["error", {
13+
"groups": [
14+
"builtin",
15+
"external",
16+
"parent",
17+
"sibling",
18+
"index",
19+
],
20+
"newlines-between": "never",
21+
"warnOnUnassignedImports": true,
22+
"distinctGroup": true,
23+
}],
24+
},
25+
overrides: [
26+
{
27+
files: "**/*.{ts,cts,mts,tsx}",
28+
rules: {
29+
"@typescript-eslint/object-curly-spacing": "off",
30+
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
31+
"n/file-extension-in-import": ["error", "always", { ".ts": "always", ".tsx": "always" }],
32+
"@typescript-eslint/prefer-regexp-exec": "off",
33+
},
34+
},
35+
],
36+
};

dprint.jsonc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"includes": ["**/*.{ts,js,md,json,jsonc}"],
3+
"excludes": [
4+
"**/node_modules",
5+
"yarn.lock",
6+
],
7+
"plugins": [
8+
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
9+
"https://plugins.dprint.dev/json-0.19.1.wasm",
10+
"https://plugins.dprint.dev/markdown-0.16.3.wasm",
11+
],
12+
"lineWidth": 120,
13+
"useTabs": true,
14+
"typescript": {
15+
"semiColons": "always",
16+
"quoteProps": "consistent",
17+
"useBraces": "always",
18+
"bracePosition": "sameLine",
19+
"singleBodyPosition": "nextLine",
20+
"nextControlFlowPosition": "maintain",
21+
"trailingCommas": "onlyMultiLine",
22+
"arrowFunction.useParentheses": "maintain",
23+
"typeAssertion.spaceBeforeExpression": false,
24+
"unionAndIntersectionType.preferSingleLine": true,
25+
"module.sortImportDeclarations": "maintain",
26+
},
27+
}

license.md

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

0 commit comments

Comments
 (0)