Skip to content

Commit

Permalink
unify package.json / linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jleni committed Sep 1, 2024
1 parent 9f4c9a6 commit 8cc190d
Show file tree
Hide file tree
Showing 11 changed files with 511 additions and 1,095 deletions.
2 changes: 1 addition & 1 deletion README-npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We recommend using the npmjs package in order to receive updates/fixes.
# Available commands

| Operation | Response | Command |
| -------------------- | --------------------------- | --------------------------- |
|----------------------|-----------------------------|-----------------------------|
| getVersion | app version | --------------- |
| publicKey | pubkey | path (legacy command) |
| getAddressAndPubKey | pubkey + address | path + ( showInDevice ) |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We recommend using the npmjs package in order to receive updates/fixes.
# Available commands

| Operation | Response | Command |
| -------------------- | --------------------------- | --------------------------- |
|----------------------|-----------------------------|-----------------------------|
| getVersion | app version | --------------- |
| publicKey | pubkey | path (legacy command) |
| getAddressAndPubKey | pubkey + address | path + ( showInDevice ) |
Expand Down
Binary file removed docs/example.png
Binary file not shown.
50 changes: 25 additions & 25 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module.exports = {
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
window: "readonly",
document: "readonly",
process: "readonly",
require: "readonly",
window: 'readonly',
document: 'readonly',
process: 'readonly',
require: 'readonly',
},
parserOptions: {
project: "tsconfig.json",
project: 'tsconfig.json',
},
},
ignores: ["dist/*", "node_modules/*"],
ignores: ['dist/*', 'node_modules/*'],
plugins: {
"unused-imports": require("eslint-plugin-unused-imports"),
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
"eslint-plugin-tsdoc": require("eslint-plugin-tsdoc"),
'unused-imports': require('eslint-plugin-unused-imports'),
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
'eslint-plugin-tsdoc': require('eslint-plugin-tsdoc'),
},
rules: {
curly: "warn",
"prefer-const": "warn",
"no-else-return": "warn",
complexity: ["warn", 1000],
"no-unneeded-ternary": "warn",
"no-alert": "warn",
"no-empty": "warn",
"no-useless-catch": "error",
"require-await": "warn",
"no-continue": "warn",
"no-console": "warn",
"unused-imports/no-unused-imports": "warn",
"no-magic-numbers": "off",
curly: 'warn',
'prefer-const': 'warn',
'no-else-return': 'warn',
complexity: ['warn', 1000],
'no-unneeded-ternary': 'warn',
'no-alert': 'warn',
'no-empty': 'warn',
'no-useless-catch': 'error',
'require-await': 'warn',
'no-continue': 'warn',
'no-console': 'warn',
'unused-imports/no-unused-imports': 'warn',
'no-magic-numbers': 'off',
},
};
}
88 changes: 39 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
{
"name": "@zondax/ledger-cosmos-js",
"author": "Zondax AG",
"license": "Apache-2.0",
"version": "4.0.0",
"description": "Node API for Cosmos App (Ledger Nano S/S+/X)",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"types": "./dist/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/cosmos/ledger-cosmos-js.git"
},
"keywords": [
"Ledger",
"Typescript",
"Tendermint",
"Cosmos"
],
"homepage": "https://github.com/Zondax/ledger-cosmos-js",
"bugs": {
"url": "https://github.com/cosmos/ledger-cosmos-js/issues"
"url": "https://github.com/Zondax/ledger-cosmos-js/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cosmos/ledger-cosmos-js.git"
},
"homepage": "https://github.com/cosmos/ledger-cosmos-js",
"resolutions": {
"@ledgerhq/hw-transport": "6.27.1",
"@ledgerhq/devices": "6.27.1",
"@ledgerhq/hw-transport-node-hid": "6.27.1",
"@ledgerhq/hw-transport-node-hid-noevents": "6.27.1"
"license": "Apache-2.0",
"author": "Zondax AG",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"typings": "./dist/index.d.ts",
"files": [
"dist/**",
"LICENSE",
"package.json"
],
"scripts": {
"build": "tsc",
"format": "FORCE_COLOR=1 prettier --write . && sort-package-json",
"format:check": "FORCE_COLOR=1 prettier --check .",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "yarn build && jest .",
"upgrade": "bunx npm-check-updates -i"
},
"dependencies": {
"@ledgerhq/hw-transport": "6.31.2",
Expand All @@ -37,61 +45,43 @@
"stream-browserify": "^3.0.0"
},
"devDependencies": {
"@ledgerhq/hw-transport-node-hid": "6.29.3",
"@ledgerhq/hw-transport-webusb": "6.29.2",
"@ledgerhq/hw-transport-mocker": "^6.29.2",
"@ledgerhq/hw-transport-node-hid": "^6.29.3",
"@noble/curves": "^1",
"@swc/core": "^1.7.22",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.5.12",
"@types/ledgerhq__hw-transport": "4.21.8",
"@types/node": "^22.5.2",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"bip32": "4.0.0",
"bip39": "3.1.0",
"copyfiles": "^2.4.1",
"core-js": "^3.38.1",
"crypto-js": "4.2.0",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.8.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-unused-imports": "^4.1.3",
"eslint-plugin-tsdoc": "^0.3.0",
"eslint-plugin-unused-imports": "^4.1.3",
"jest": "^29.7.0",
"jest-runner": "^29.7.0",
"jest-serial-runner": "^1.2.1",
"prettier": "^3.3.3",
"secp256k1": "^5.0.0",
"sort-package-json": "^2.10.1",
"ts-jest": "29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"webpack": "^5.94.0"
"typescript": "^5.5.4"
},
"volta": {
"node": "20.11.1",
"bun": "1.0.20"
},
"moduleDirectories": [
"node_modules",
"dist"
],
"browserslist": [
"> 1%",
"last 2 versions"
],
"files": [
"dist/*",
"LICENSE",
"yarn.lock"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@babel/core": "^7.17.5",
"@types/node": "^17.0.21"
},
"scripts": {
"build": "tsc",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format": "prettier --write .",
"test": "yarn build && jest"
}
"moduleDirectories": [
"node_modules",
"dist"
]
}
4 changes: 2 additions & 2 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************* */
export const CLA = 0x55;
export const CLA = 0x55

export const enum P1_VALUES {
ONLY_RETRIEVE = 0x00,
Expand All @@ -25,4 +25,4 @@ export const enum P2_VALUES {
TEXTUAL = 0x1,
}

export const PKLEN = 33;
export const PKLEN = 33
Loading

0 comments on commit 8cc190d

Please sign in to comment.