-
Notifications
You must be signed in to change notification settings - Fork 4
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
shuo wang
committed
Nov 18, 2022
1 parent
12f6e47
commit 76c2dba
Showing
112 changed files
with
9,346 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,20 @@ | ||
**/.git | ||
**/.svn | ||
**/.hg | ||
**/node_modules | ||
**/dist | ||
**/.idea | ||
**/.vscode | ||
**/models | ||
**/public | ||
|
||
**/*.css | ||
**/*.scss | ||
**/*.less | ||
**/*.json | ||
|
||
.gitignore | ||
|
||
auto-imports.d.ts | ||
components.d.ts | ||
README.md |
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,106 @@ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"next/core-web-vitals", | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:prettier/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: ["react", "@typescript-eslint", "prettier"], | ||
rules: { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
endOfLine: "auto", | ||
indent: 2, | ||
}, | ||
], | ||
"linebreak-style": ["off", "unix"], | ||
quotes: ["error", "double"], | ||
semi: ["error", "always"], | ||
"@typescript-eslint/no-explicit-any": [ | ||
"off", // "error", | ||
{ | ||
fixToUnknown: true, | ||
ignoreRestArgs: true, | ||
}, | ||
], | ||
"react/jsx-no-target-blank": "off", | ||
}, | ||
settings: { | ||
react: { | ||
createClass: "createReactClass", | ||
// Regex for Component Factory to use, | ||
// default to "createReactClass" | ||
pragma: "React", | ||
// Pragma to use, default to "React" | ||
fragment: "Fragment", | ||
// Fragment to use (may be a property of <pragma>), default to "Fragment" | ||
version: "detect", | ||
// React version. "detect" automatically picks the version you have installed. | ||
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value. | ||
// It will default to "latest" and warn if missing, and to "detect" in the future | ||
flowVersion: "0.53", // Flow version | ||
}, | ||
propWrapperFunctions: [ | ||
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped. | ||
"forbidExtraProps", | ||
{ | ||
property: "freeze", | ||
object: "Object", | ||
}, | ||
{ | ||
property: "myFavoriteWrapper", | ||
}, // for rules that check exact prop wrappers | ||
{ | ||
property: "forbidExtraProps", | ||
exact: true, | ||
}, | ||
], | ||
componentWrapperFunctions: [ | ||
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped. | ||
"observer", // `property` | ||
{ | ||
property: "styled", | ||
}, // `object` is optional | ||
{ | ||
property: "observer", | ||
object: "Mobx", | ||
}, | ||
{ | ||
property: "observer", | ||
object: "<pragma>", | ||
}, // sets `object` to whatever value `settings.react.pragma` is set to | ||
], | ||
formComponents: [ | ||
// Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } /> | ||
"CustomForm", | ||
{ | ||
name: "Form", | ||
formAttribute: "endpoint", | ||
}, | ||
], | ||
linkComponents: [ | ||
// Components used as alternatives to <a> for linking, eg. <Link to={ url } /> | ||
"Hyperlink", | ||
{ | ||
name: "Link", | ||
linkAttribute: "to", | ||
}, | ||
], | ||
}, | ||
}; |
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,40 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
/dist/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
.vscode/settings.json | ||
|
||
standalone |
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,11 @@ | ||
#!/bin/sh | ||
commit_msg=`cat $1` | ||
echo $commit_msg | ||
msg_re="^(merge|feat|fix|docs|style|refactor|perf|test|chore|revert|build)(\(.+\))?: .{1,100}" | ||
|
||
if [[ ! $commit_msg =~ $msg_re ]] | ||
then | ||
echo "erro" | ||
exit 1 | ||
fi | ||
exit 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,21 @@ | ||
**/.git | ||
**/.svn | ||
**/.hg | ||
**/node_modules | ||
**/dist | ||
**/.idea | ||
**/.vscode | ||
**/models | ||
**/public | ||
|
||
**/*.css | ||
**/*.scss | ||
**/*.less | ||
**/*.json | ||
|
||
.gitignore | ||
|
||
src/views/sparta-website/components/CustomHeader.vue | ||
auto-imports.d.ts | ||
components.d.ts | ||
README.md |
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,10 @@ | ||
{ | ||
"extends": ["prettier"], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"arrow-body-style": "off", | ||
"prefer-arrow-callback": "off", | ||
"endOfLine": "auto" | ||
} | ||
} |
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,180 @@ | ||
Spartan License | ||
Version 1.0, September 2022 | ||
https://www.bsn.foundation | ||
|
||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
|
||
1. DEFINITIONS. | ||
|
||
“BSN Spartan Network” means a decentralized cloud service network established by Red Date. | ||
|
||
“Contribution” shall mean any work of authorship, including the original version of the Work and any | ||
modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to | ||
Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to | ||
submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of | ||
electronic, verbal, or written communication sent to the Licensor or its representatives, including but not | ||
limited to communication on electronic mailing lists, source code control systems, and issue tracking | ||
systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the | ||
Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the | ||
copyright owner as “Not a Contribution”. | ||
|
||
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution | ||
has been received by Licensor and subsequently incorporated within the Work. | ||
|
||
“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived | ||
from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications | ||
represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works | ||
shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the | ||
Work and Derivative Works thereof. | ||
|
||
“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, | ||
or are under common control with that entity. For the purposes of this definition, “control” means (i) the | ||
power, direct or indirect, to cause the direction or management of such entity, whether by contract or | ||
otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial | ||
ownership of such entity. | ||
|
||
“License” shall mean the terms and conditions for use, reproduction, and distribution as defined by clause 1 | ||
to 10 of this document. | ||
|
||
“Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the | ||
License. | ||
|
||
“Non-Commercial Use” in this License means: (i) personal use for research, personal study, private | ||
entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial | ||
application; or (ii) use by any charitable organization, educational institution, public research organization, | ||
public safety or health organization, environmental protection organization or government institution, in each | ||
case as reasonably determined by Red Date in its sole discretion. | ||
|
||
“Object” form shall mean any form resulting from mechanical transformation or translation of a Source | ||
form, including but not limited to compiled object code, generated documentation, and conversions to other | ||
media types. | ||
|
||
“Red Date” shall mean Red Date (Hong Kong) Technology Limited, a company incorporated in Hong Kong. | ||
|
||
“Source” form shall mean the preferred form for making modifications, including but not limited to software | ||
source code, documentation source, and configuration files. | ||
|
||
“Work” shall mean the work of authorship, whether in Source or Object form, made available under the | ||
License, including the software, application, source code, documentation and any other documents in this | ||
repository, as indicated by a copyright notice that is included in or attached to the work, an example of which | ||
is set out in the Appendix below. | ||
|
||
“You” or “Your” shall mean an individual or Legal Entity exercising permissions granted by this License. | ||
|
||
2. THE LICENSOR. You acknowledge and agree that Red Date (or Red Date’s licensors) is the Licensor who | ||
owns all legal right, title and interest in and to the Work, including any intellectual property rights which | ||
subsist in the Work (whether those rights happen to be registered or not, and wherever in the world those | ||
rights may exist), whether in Source or Object form. | ||
|
||
3. GRANT OF COPYRIGHT LICENSE FOR SPECIFIED PURPOSES. Subject to the terms and conditions of this License, | ||
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, | ||
non-transferable, non-sublicensable copyright license to use, reproduce, modify, distribute, publish, | ||
copy the Work solely for (i) the BSN Spartan Network project or (ii) Non-Commercial Use. | ||
|
||
4. GRANT OF PATENT LICENSE. Subject to the terms and conditions of this License, each Contributor hereby | ||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, non-transferable, non-sublicensable | ||
patent license to make, have made, use, and otherwise transfer the Work solely for the BSN Spartan Network project | ||
or Non-Commercial Use, where such license applies only to those patent claims licensable by such Contributor that | ||
are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work | ||
to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a | ||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work | ||
constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License | ||
for that Work shall terminate as of the date such litigation is filed. | ||
|
||
5. REDISTRIBUTION. You may reproduce and distribute copies of the Work or Derivative Works thereof in any | ||
medium, with or without modifications, and in Source or Object form, provided that You meet the following | ||
conditions: | ||
|
||
(i) You must conspicuously and appropriately publish on each copy an appropriate copyright notice in the | ||
form set out in the Appendix below. | ||
|
||
(ii) The Work or Derivative Works must carry prominent notices stating that you modified it, and giving a | ||
relevant date. | ||
|
||
(iii) The Work or Derivative Works must carry prominent notices stating that it is released under this License. | ||
|
||
(iv) You must license the entire Work or Derivative Works, as a whole, under this License to anyone who comes | ||
into possession of a copy. This License will therefore apply to the whole of the Work or Derivative Works, and | ||
all its parts, regardless of how they are packaged. This License gives no permission to license the Work or | ||
Derivative Works in any other way, but it does not invalidate such permission if you have separately received it. | ||
|
||
(v) If the Work or Derivative Works has interactive user interfaces, each must display Appropriate Legal Notices. | ||
|
||
(vi) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, | ||
trademark, and attribution notices from the Source form of the Work, excluding those notices that do not | ||
pertain to any part of the Derivative Works; and | ||
|
||
(vii) If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that | ||
You distribute must include a readable copy of the attribution notices contained within such NOTICE file, | ||
excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following | ||
places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, | ||
if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever | ||
such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do | ||
not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside | ||
or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot | ||
be construed as modifying the License. | ||
|
||
For the purpose of this Section, an interactive user interface displays “Appropriate Legal Notices” to the extent | ||
that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice in | ||
the form set out in the Appendix below, and (2) tells the user that there is no warranty for the Work (except to the | ||
extent that warranties are provided), that licensees may convey the Work under this License, and how to view a copy | ||
of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in | ||
the list meets this criterion. | ||
|
||
A compilation of a covered Work with other separate and independent works, which are not by their nature extensions | ||
of the Work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or | ||
distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit | ||
the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered | ||
Work in an aggregate does not cause this License to apply to the other parts of the aggregate. | ||
|
||
6. SUBMISSION OF CONTRIBUTIONS. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion | ||
in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or | ||
conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you | ||
may have executed with the Licensor regarding such Contributions. | ||
|
||
7. TRADEMARKS. This License does not grant permission to use the trade names, trademarks, service marks, or product names | ||
of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing | ||
the content of the “NOTICE” file. | ||
|
||
8. DISCLAIMER OF WARRANTY. Unless required by applicable law or agreed to in writing, Licensor provides the Work on an “AS IS” BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions | ||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the | ||
appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. | ||
|
||
9. LIMITATION OF LIABILITY. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, | ||
unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be | ||
liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as | ||
a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, | ||
work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been | ||
advised of the possibility of such damages. | ||
|
||
10.ACCEPTING WARRANTY OR ADDITIONAL LIABILITY. While redistributing the Work or Derivative Works thereof, You may choose to offer, | ||
and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this | ||
License provided that, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, | ||
and that You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, | ||
such Contributor by reason of your accepting any such warranty or additional liability. | ||
|
||
If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at enquiry@reddatetech.com. | ||
|
||
Appendix | ||
|
||
HOW TO APPLY THE SPARTAN LICENSE TO YOUR WORK | ||
|
||
Include a copy of the Spartan License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file that | ||
references the License. | ||
|
||
To apply the Spartan License to specific files in your work, attach the following boilerplate declaration, replacing the fields | ||
enclosed by square brackets “[ ]” with your own identifying information. (Don't include the brackets!) Enclose the text in the | ||
appropriate comment syntax for the file format. We also recommend that you include a file or class name and description of purpose | ||
on the same “printed page” as the copyright notice for easier identification within third-party archives. | ||
|
||
Copyright [yyyy] [name of copyright owner] | ||
|
||
Licensed under the Spartan License, Version 1.0 (the “License”); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
https://spartan.bsn.foundation/licenses/license | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions | ||
and limitations under the License. |
Oops, something went wrong.