Skip to content

Commit 2b5c520

Browse files
committed
chore: syncing files
1 parent a365a5f commit 2b5c520

File tree

8 files changed

+133
-39
lines changed

8 files changed

+133
-39
lines changed

.eslintrc.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
parserOptions: {
44
sourceType: 'module',
55
ecmaVersion: 2018,
6+
project: './tsconfig.test.json',
67
},
78
env: {
89
jest: true,
@@ -11,11 +12,10 @@ module.exports = {
1112
browser: true,
1213
page: true,
1314
},
14-
plugins: ['jest'],
15+
plugins: ['jest', 'unused-imports'],
1516
rules: {
1617
'array-bracket-newline': ['error', 'consistent'],
1718
strict: ['error', 'safe'],
18-
curly: 'error',
1919
'block-scoped-var': 'error',
2020
complexity: 'warn',
2121
'default-case': 'error',
@@ -27,6 +27,7 @@ module.exports = {
2727
'no-case-declarations': 'error',
2828
'no-console': 'error',
2929
'no-constant-condition': 'error',
30+
'no-continue': 'warn',
3031
'no-div-regex': 'error',
3132
'no-empty': 'warn',
3233
'no-empty-pattern': 'error',
@@ -41,7 +42,6 @@ module.exports = {
4142
'require-yield': 'error',
4243
'max-nested-callbacks': ['error', 4],
4344
'max-depth': ['error', 4],
44-
'require-await': 'error',
4545
'space-before-function-paren': [
4646
'error',
4747
{
@@ -72,17 +72,36 @@ module.exports = {
7272
requireLast: true,
7373
},
7474
singleline: {
75-
delimiter: 'comma',
75+
delimiter: 'semi',
7676
requireLast: false,
7777
},
7878
},
7979
],
80+
'@typescript-eslint/ban-ts-comment': [
81+
'error',
82+
{
83+
'ts-expect-error': 'allow-with-description',
84+
'ts-ignore': 'allow-with-description',
85+
'ts-nocheck': 'allow-with-description',
86+
'ts-check': 'allow-with-description',
87+
minimumDescriptionLength: 6,
88+
},
89+
],
90+
'require-await': 'off',
91+
'@typescript-eslint/promise-function-async': 'error',
92+
'@typescript-eslint/require-await': 'off',
93+
'@typescript-eslint/no-non-null-assertion': 'off',
94+
'@typescript-eslint/no-unused-vars': 'off',
95+
'unused-imports/no-unused-imports': 'error',
96+
'unused-imports/no-unused-vars': [
97+
'warn',
98+
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
99+
],
80100
},
81101
overrides: [
82102
{
83103
files: ['*.spec.ts'],
84104
rules: {
85-
// '@typescript-eslint/ban-ts-ignore': 'off',
86105
'max-nested-callbacks': ['error', 10], // allow describe/it nesting
87106
},
88107
},

.gitattributes

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

.gitignore

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
lib
2-
31
# Logs
42
logs
53
*.log
64

5+
# OS files
6+
.DS_Store
7+
78
# Runtime data
89
pids
910
*.pid
@@ -19,17 +20,11 @@ coverage
1920
# node-waf configuration
2021
.lock-wscript
2122

22-
#babel RC
23-
.babelrc.js
24-
2523
build
2624
dist
2725

2826
# Dependency directory
2927
node_modules
3028

31-
# Test data
32-
test/data/*
33-
!test/data/.gitkeep
34-
!test/data/manifest
35-
!test/data/TestIdentity.*
29+
# Generated files
30+
docs

.huskyrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"hooks": {
33
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
44
}
5-
}
5+
}

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"bracketSpacing": true,
6+
"semi": false,
7+
"singleQuote": true,
8+
"quoteProps": "as-needed",
9+
"trailingComma": "all",
10+
"endOfLine": "lf",
11+
"arrowParens": "avoid",
12+
"proseWrap": "always"
13+
}

CODE_OF_CONDUCT.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
8+
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
9+
10+
## Our Standards
11+
12+
Examples of behavior that contributes to creating a positive environment include:
13+
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
19+
20+
Examples of unacceptable behavior by participants include:
21+
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Our Responsibilities
29+
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
32+
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the
40+
project or its community in public spaces. Examples of representing a project or community include using an official
41+
project e-mail address, posting via an official social media account, or acting as an appointed representative at an
42+
online or offline event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
[email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed
48+
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
49+
the reporter of an incident. Further details of specific enforcement policies may be posted separately.
50+
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
58+
59+
[homepage]: https://www.contributor-covenant.org
60+
61+
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

LICENSE

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
Copyright (c) 2020 The Swarm Authors. All rights reserved.
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, The Swarm Authors
4+
All rights reserved.
25

36
Redistribution and use in source and binary forms, with or without
4-
modification, are permitted provided that the following conditions are
5-
met:
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
615

7-
* Redistributions of source code must retain the above copyright
8-
notice, this list of conditions and the following disclaimer.
9-
* Redistributions in binary form must reproduce the above
10-
copyright notice, this list of conditions and the following disclaimer
11-
in the documentation and/or other materials provided with the
12-
distribution.
13-
* Neither the name of Swarm nor the names of its
14-
contributors may be used to endorse or promote products derived from
15-
this software without specific prior written permission.
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
1619

17-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2729
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

commitlint.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
22
extends: ['@commitlint/config-conventional'],
3-
};
3+
rules: {
4+
'body-max-line-length': [0, 'always', Infinity], // disable commit body length restriction
5+
},
6+
}

0 commit comments

Comments
 (0)