Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
- persist_to_workspace:
root: .
paths:
- node_modules
- build-artifacts
- node_modules
- build-artifacts

all-tests-pass:
docker:
Expand Down Expand Up @@ -77,7 +77,6 @@ jobs:
name: Unit tests
command: yarn test:browser


test-10:
docker:
- image: circleci/node:10
Expand Down
33 changes: 19 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ module.exports = {
'@metamask/eslint-config/config/nodejs',
'@metamask/eslint-config/config/typescript',
],
overrides: [{
files: [
'.eslintrc.js',
],
parserOptions: {
sourceType: 'script',
plugins: ['json'],
overrides: [
{
files: ['*.js', '*.json'],
parserOptions: {
sourceType: 'script',
},
},
}],
],
rules: {
'camelcase': ['error', {
'allow': [
'nacl_decodeHex',
'recoverTypedSignature_v4',
'signTypedData_v4',
],
}],
camelcase: [
'error',
{
allow: [
'nacl_decodeHex',
'recoverTypedSignature_v4',
'signTypedData_v4',
],
},
],
'no-param-reassign': 'off',
},
ignorePatterns: ['!.eslintrc.js', './test/*.js', 'dist'],
};
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
node_modules
.DS_Store
node_modules
package-lock.json

*.tgz
*.log

# TypeScript
/build
**/*.d.ts
**/*.js
dist
test/*.js
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can find usage examples [here](https://github.com/danfinlay/js-eth-personal-

## Installation

```
```shell
npm install eth-sig-util --save
```

Expand Down Expand Up @@ -79,4 +79,3 @@ Return hex-encoded hash of typed data params according to [EIP712](https://githu
msgParams should have a `data` key that is hex-encoded data unsigned, and a `sig` key that is hex-encoded and already signed.

Returns a hex-encoded public key.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
"name": "eth-sig-util",
"version": "3.0.0",
"description": "A few useful functions for signing ethereum data",
"main": "index.js",
"main": "dist/index.js",
"files": [
"index.js",
"index.d.ts",
"utils/"
"dist"
],
"scripts": {
"build": "tsc --project .",
"lint": "eslint . --ext .ts,.js",
"build": "tsc --project ./tsconfig.prod.json && tsc --project ./tsconfig.test.json",
"lint": "eslint . --ext ts,js,json",
"lint:fix": "yarn lint --fix",
"test": "yarn build && node test/index.js",
"test:browser": "yarn build && airtap test/index.js",
"prepublishOnly": "yarn build"
Expand All @@ -36,15 +35,17 @@
"tweetnacl-util": "^0.15.0"
},
"devDependencies": {
"@metamask/eslint-config": "^2.0.0",
"@types/node": "^10.17.13",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"@metamask/eslint-config": "^5.0.0",
"@types/node": "^14.14.25",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"airtap": "4.0.1",
"airtap-system": "^0.0.2",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-json": "^2.1.2",
"eslint-plugin-node": "^11.1.0",
"tape": "^4.9.1",
"typescript": "^3.9.2"
"typescript": "^4.1.3"
}
}
Loading