-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb60f6e
commit 45fc628
Showing
16 changed files
with
15,226 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"root": true, | ||
"extends": ["eslint:recommended", "prettier"], | ||
"plugins": ["import", "jest", "sort-keys", "unused-imports"], | ||
"parser": "babel-eslint", | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"rules": { | ||
"jest/no-focused-tests": "error", | ||
"arrow-body-style": 0, | ||
"default-case": 0, | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": ["builtin", "external", "parent"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */, | ||
"caseInsensitive": true /* ignore case. Options: [true, false] */ | ||
} | ||
} | ||
], | ||
"no-unused-vars": ["error", { "ignoreRestSiblings": true }] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
jobs: | ||
dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- name: Cache NPM dependencies | ||
# From: https://dev.to/drakulavich/aggressive-dependency-caching-in-github-actions-3c64 | ||
uses: actions/cache@v3 | ||
id: cache-primes | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | ||
- name: Install dependencies | ||
if: steps.cache-primes.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: [dependencies] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Get cached NPM dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} # (1) | ||
|
||
- name: Tests | ||
run: npm run test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [dependencies] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Get cached NPM dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} # (1) | ||
|
||
- name: Lint | ||
run: npm run lint | ||
- run: npm run prettier:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Dependency directories | ||
node_modules | ||
|
||
# Optional npm cache directory | ||
.npm | ||
.npmrc | ||
|
||
# Optional REPL history | ||
.DS_Store | ||
|
||
# Tests | ||
coverage | ||
|
||
# env files | ||
.env | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/cspell.json | ||
!.vscode/*.code-snippets | ||
|
||
# Build Files | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
<!-- Type of changes: | ||
- Added | ||
- Changed | ||
- Deprecated | ||
- Removed | ||
- Fixed | ||
- Security | ||
--> | ||
|
||
<!-- eg: | ||
### Added | ||
- Short description about it. ([#pr-id](https://github.com/remoteoss/jsf/pull/<pr-id>)) | ||
### Deprecated | ||
- Deprecated `xxx` in favor of `yyy`. ([#pr-id](https://github.com/remoteoss/jsf/pull/<pr-id>)) | ||
--> | ||
|
||
## [1.0.0-beta.1] - 2023-XX-XX | ||
|
||
### Added | ||
|
||
- Initial public release. ([#1](https://github.com/remoteoss/jsf/pull/1)) | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Contributing | ||
|
||
## Questions / Bugs / Feedback | ||
|
||
If you have questions about the library, found a bug or want to suggest a feature, please create an issue. | ||
|
||
## Development | ||
|
||
- Install dependencies: | ||
|
||
```bash | ||
npm ci | ||
``` | ||
|
||
- Run tests: | ||
|
||
``` | ||
npm test | ||
``` | ||
|
||
### Documentation | ||
|
||
You can visit the [docs website](https://json-schema-form.vercel.app/), however its source is not in the repo yet, only the build (`/docs_build`). Our docs are still coupled to Remote's internal Design System and integration tests. The effort to decouple it at the moment is too high. | ||
|
||
So our strategy is to at each new PR, to update the docs internally and manually copy its build to this repo. | ||
|
||
## Pull requests (PR) | ||
|
||
Maintainers merge PRs by squashing the commits and editing the merge commit message using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
## Releases | ||
|
||
For each new PR merged, a GitHub action is triggered to create a new release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
# json-schema-form | ||
<p align="center"> | ||
<img src=".github/media/jsf_logo_dark.png" width="600" alt="json-schema-form"> | ||
</p> | ||
|
||
<p align="center"> | ||
<code>json-schema-form</code> is a headless UI form library powered by <a href="https://json-schema.org/">JSON Schemas</a>. | ||
<br/> | ||
It transforms JSON schemas into Javascript to be consumed by your UI libraries. | ||
</p> | ||
|
||
--- | ||
|
||
### Why JSON Schemas for forms? | ||
|
||
JSON Schemas are the SSoT (Single Source of Truth) that allows you to share form's _structure_ and _validations_ between frontend and backend, regardless of the language used. | ||
|
||
## Documentation | ||
|
||
Check the 📚 **[JSF website](https://json-schema-form.vercel.app/)** for documentation and demos. | ||
|
||
## Contributing | ||
|
||
Read [CONTRIBUTING](CONTRIBUTING.md) to get started. | ||
|
||
_Backed by [Remote.com](https://remote.com/)_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [['@babel/preset-env', { targets: { node: 'current' } }]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = async () => { | ||
return { | ||
verbose: true, | ||
testEnvironment: 'jsdom', | ||
}; | ||
}; |
Oops, something went wrong.