git.delta.rocks / unique-network / refs/commits / f9470659c53f

difftreelog

feat types regeneration script

Yaroslav Bolyukin2021-11-16parent: #94e2090.patch.diff
in: master

2 files changed

modifiedtests/.eslintrc.jsondiffbeforeafterboth
before · tests/.eslintrc.json
1{2    "env": {3        "browser": true,4        "es2020": true5    },6    "extends": [7        "eslint:recommended",8        "plugin:@typescript-eslint/recommended"9    ],10    "parser": "@typescript-eslint/parser",11    "parserOptions": {12        "ecmaVersion": 11,13        "sourceType": "module"14    },15    "plugins": [16        "@typescript-eslint"17    ],18    "rules": {19        "indent": [20            "error",21            2,22            {23                "SwitchCase": 124            }25        ],26        "function-call-argument-newline": [27            "error",28            "consistent"29        ],30        "function-paren-newline": [31            "error",32            "multiline"33        ],34        "linebreak-style": [35            "error",36            "unix"37        ],38        "quotes": [39            "error",40            "single",41            {42                "avoidEscape": true43            }44        ],45        "semi": [46            "error",47            "always"48        ],49        "@typescript-eslint/explicit-module-boundary-types": "off",50        "comma-dangle": [51            "error",52            "always-multiline"53        ],54        "no-unused-vars": "off",55        "@typescript-eslint/no-empty-function": "off",56        "@typescript-eslint/no-non-null-assertion": "off",57        "@typescript-eslint/no-explicit-any": "off",58        "@typescript-eslint/no-unused-vars": "warn",59        "no-async-promise-executor": "warn",60        "@typescript-eslint/no-empty-interface": "off",61        "prefer-const": [62            "error",63            {64                "destructuring": "all"65            }66        ]67    }68}
addedtests/update_types.shdiffbeforeafterboth
--- /dev/null
+++ b/tests/update_types.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+
+if [[ ! -f unique-types-js ]]; then
+	git clone git@github.com:UniqueNetwork/unique-types-js.git
+fi
+
+yarn polkadot-types
+
+rsync -ar --delete src/interfaces/ unique-types-js/src/interfaces
+for file in unique-types-js/src/interfaces/augment-*; do
+	sed -i '1s;^;//@ts-nocheck\n;' $file
+done
+
+pushd unique-types-js
+git add src/interfaces/
+git commit -m "chore: regenerate types"
+popd