Skip to content

Commit 3790aee

Browse files
committed
Initialize project
0 parents  commit 3790aee

File tree

12 files changed

+248
-0
lines changed

12 files changed

+248
-0
lines changed

.gitattributes

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

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [hyperjump-io]

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: actions/setup-node@v5
15+
with:
16+
node-version: lts/*
17+
- run: npm install
18+
- run: npm run docs
19+
- uses: actions/configure-pages@v5
20+
- uses: actions/upload-pages-artifact@v4
21+
with:
22+
path: './docs'
23+
deploy:
24+
needs: build
25+
permissions:
26+
pages: write
27+
id-token: write
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/deploy-pages@v4
34+
id: deployment

.github/workflows/nodejs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Node.js Automation
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v5
12+
- uses: actions/setup-node@v5
13+
with:
14+
node-version: lts/*
15+
- run: npm install
16+
- run: npm test
17+
- run: npm run lint
18+
- run: npm run type-check
19+
- run: npm run docs

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
package-lock.json
3+
docs/
4+
scratch/
5+
TODO*
6+
.DS_Store

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.github/
2+
eslint.config.js
3+
**/*.test.js
4+
tsconfig.json
5+
scratch/
6+
TODO*

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) 2025 Hyperjump Software, LLC
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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Hyperjump - JSON Schema Formats
2+
3+
TODO: Write a description
4+
5+
## Install
6+
7+
This module is designed for Node.js (ES Modules, TypeScript) and browsers. It
8+
should work in Bun and Deno as well, but the test runner doesn't work in these
9+
environments, so this module may be less stable in those environments.
10+
11+
### Node.js
12+
13+
```bash
14+
npm install @hyperjump/json-schema-formats
15+
```
16+
17+
### TypeScript
18+
19+
This package uses the package.json "exports" field. [TypeScript understands
20+
"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing),
21+
but you need to change a couple settings in your `tsconfig.json` for it to work.
22+
23+
```jsonc
24+
"module": "Node16", // or "NodeNext"
25+
"moduleResolution": "Node16", // or "NodeNext"
26+
```
27+
28+
## Usage
29+
30+
TODO: Basic usage examples
31+
32+
## API
33+
34+
<https://json-schema-formats.hyperjump.io/modules.html>
35+
36+
## Contributing
37+
38+
Contributions are welcome! Please create an issue to propose and discuss any
39+
changes you'd like to make before implementing it. If it's an obvious bug with
40+
an obvious solution or something simple like a fixing a typo, creating an issue
41+
isn't required. You can just send a PR without creating an issue. Before
42+
submitting any code, please remember to first run the following tests.
43+
44+
- `npm test` (Tests can also be run continuously using `npm test -- --watch`)
45+
- `npm run lint`
46+
- `npm run type-check`

eslint.config.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import tseslint from "typescript-eslint";
2+
import stylistic from "@stylistic/eslint-plugin";
3+
import importPlugin from "eslint-plugin-import";
4+
5+
export default tseslint.config(
6+
...tseslint.configs.recommendedTypeChecked,
7+
...tseslint.configs.stylisticTypeChecked,
8+
importPlugin.flatConfigs.recommended,
9+
importPlugin.flatConfigs.typescript,
10+
stylistic.configs.customize({
11+
arrowParens: true,
12+
braceStyle: "1tbs",
13+
commaDangle: "never",
14+
jsx: false,
15+
quotes: "double",
16+
semi: true
17+
}),
18+
{
19+
languageOptions: {
20+
parserOptions: {
21+
projectService: true,
22+
tsconfigRootDir: import.meta.dirname
23+
}
24+
},
25+
settings: {
26+
"import/resolver": {
27+
typescript: {}
28+
}
29+
},
30+
rules: {
31+
// TypeScript
32+
"@typescript-eslint/no-unused-vars": ["error", {
33+
argsIgnorePattern: "^_",
34+
varsIgnorePattern: "^_",
35+
caughtErrorsIgnorePattern: "^_"
36+
}],
37+
"@typescript-eslint/no-empty-function": "off",
38+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
39+
"@typescript-eslint/consistent-indexed-object-style": "off",
40+
"no-console": "error",
41+
42+
// Imports
43+
"import/extensions": ["error", "ignorePackages"],
44+
"import/no-named-as-default-member": "off",
45+
46+
// Stylistic
47+
"@stylistic/yield-star-spacing": ["error", "after"],
48+
"@stylistic/multiline-ternary": "off",
49+
"@stylistic/no-mixed-operators": "off",
50+
"@stylistic/quote-props": ["error", "as-needed"]
51+
}
52+
}
53+
);

0 commit comments

Comments
 (0)