Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Partial dev env refinement and critical Vault vulnerability fix
Browse files Browse the repository at this point in the history
* Improve development environment structure (#21)

* remove custody, custody-factory and nitro-protocol

* move vault

* remove unused vault import, fix some comments

* fix comments

* structurize tests and src

* clearing extracted

* move and rename accounts

* fix constructor argument type

* fix tests imports

* apply comment suggestions

Co-authored-by: nksazonov <nsazonov@openware.com>

* Improve dev env plugins usage (#22)

* remove .vscode from gitignore

* add vscode workspace settings

* add recommended extensions

* fix indentation

* chore eslintrc

* update eslintignore

* remove prettier from eslint settings

* remove npmignore

* update prettier settings

* remove solhint, change hardhat extension settings

* update hardhat config

* update tsconfig rules

* fix ts errors

* fix spell errors in files

* rename vault upgradability to upgradeability

* change module in tsconfig to commonjs

* remove unused scripts

* linter fixes almost done

* ref vault upgradability to comply with eslint rules

* remove unnecessary Contract type

* ref vesting tests to comply with updated elint

* ref implement all eslint rules

* remove unnecessary Contract type

* tsconfig inherit from base config

* add eslint plugins & rules

* remove `bracketSpacing` rule from prettier

* add / to gitignore and prettierignore

* remove user-dependent rules

* ref ts files to comply to new eslint rules

* run lint:fix

* tweak some eslint rules

Co-authored-by: nksazonov <nsazonov@openware.com>

* fix: vault impl setup deployer roles (#25)

* remove public grant deployer roles function

* add upgrade call test

* apply code style changes

Co-authored-by: nksazonov <nsazonov@openware.com>

Co-authored-by: Sazonov Nikita <35502225+nksazonov@users.noreply.github.com>
Co-authored-by: nksazonov <nsazonov@openware.com>
  • Loading branch information
3 people authored and lckmidnight committed Oct 21, 2022
1 parent 5313d22 commit bdbc1bb
Show file tree
Hide file tree
Showing 128 changed files with 4,996 additions and 11,698 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules
.openzeppelin
abi
artifacts
cache
coverage
node_modules
typechain
50 changes: 0 additions & 50 deletions .eslintrc.js

This file was deleted.

141 changes: 141 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"$schema": "https://json.schemastore.org/eslintrc",

"env": {
"node": true,
"es2021": true
},

"extends": [
"eslint:recommended",

"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",

"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",

"plugin:import/recommended",

"plugin:array-func/recommended",
"plugin:eslint-comments/recommended",
"plugin:optimize-regex/recommended",
"plugin:promise/recommended"
],

"parser": "@typescript-eslint/parser",

"parserOptions": {
"ecmaVersion": 2022,
"project": ["./tsconfig.json"]
},

"plugins": ["unused-imports", "no-constructor-bind"],

"rules": {
"no-useless-rename": "error",
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"no-self-compare": "error",

"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],

"array-func/prefer-array-from": "off",

"import/named": "off",
"import/no-self-import": "error",
"import/no-useless-path-segments": "error",
"import/no-relative-packages": "error",
"import/no-extraneous-dependencies": ["error"],
"import/no-mutable-exports": ["error"],
"import/first": ["error"],
"import/no-duplicates": ["error"],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"newlines-between": "always"
}
],
"import/newline-after-import": ["error"],

"no-constructor-bind/no-constructor-bind": "error",
"no-constructor-bind/no-constructor-state": "error",

"sonarjs/no-duplicate-string": 0,

"unicorn/filename-case": 0,
"unicorn/prefer-module": 0,
"unicorn/prefer-ternary": 0,
"unicorn/prefer-top-level-await": 0,
"unicorn/prevent-abbreviations": 0,

"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^__",
"args": "after-used",
"argsIgnorePattern": "^__"
}
]
},

"overrides": [
{
"files": ["*"],

"extends": ["prettier"],

"env": {
"es2022": true
},

"parserOptions": {
"ecmaVersion": "latest"
}
},

// tweaking for more convenient tests
{
"files": ["./test/**/*.ts"],

"rules": {
"unicorn/consistent-function-scoping": 0
}
},

{
"files": ["./test/**/src/*.ts", "./src/**/*.ts"],

"rules": {
"unicorn/no-await-expression-member": 0
}
}
],

"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
}
}
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
node_modules
node_modules/
.env
coverage
coverage/
coverage.json
typechain
typechain/

# Misc
.DS_Store
/.vscode

# Hardhat files
/abi
cache
/artifacts
/abi/
cache/
/artifacts/
/.openzeppelin/unknown-*.json
/hardhat-deployments
/hardhat-deployments/

# Output of kaidump command
kaigara-data.yaml
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

Loading

0 comments on commit bdbc1bb

Please sign in to comment.