This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tslint + prettier, and upgrade dependencies.
- Loading branch information
Raúl Kripalani
committed
May 21, 2018
1 parent
3d1cabe
commit 19875ba
Showing
10 changed files
with
1,676 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"proseWrap": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,60 @@ | ||
{ | ||
"name": "ethql", | ||
"version": "0.0.1", | ||
"description": "A GraphQL interface to Ethereum", | ||
"author": "PegaSys – ConsenSys", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ConsenSys/ethql" | ||
}, | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"scripts": { | ||
"clean": "$(npm bin)/rimraf dist", | ||
"start": "$(npm bin)/dotenv -- node dist/index.js", | ||
"dev": "$(npm bin)/nodemon -e ts -x ts-node src/index.ts", | ||
"debug": "$(npm bin)/dotenv -- nodemon -e ts -x ts-node --inspect src/index.ts", | ||
"build": "$(npm bin)/rimraf dist && tsc" | ||
"build": "npm run clean && tsc && npm run tslint", | ||
"lint": | ||
"tslint --fix -t stylish -c tslint.json -p tsconfig.json && prettier --parser typescript --write src/**/*.ts", | ||
"precommit": "lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{ts}": [ | ||
"tslint --fix -t stylish -c tslint.json -p tsconfig.json", | ||
"prettier --parser typescript --write", | ||
"git add" | ||
], | ||
"*.{js,css,scss,html,json,graphql,md}": ["prettier --write", "git add"] | ||
}, | ||
"version": "1.0.0", | ||
"description": "A GraphQL interface to Ethereum", | ||
"main": "index.js", | ||
"author": "Raúl Kripalani <raul.kripalani@gmail.com>", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@types/lodash": "^4.14.104", | ||
"abi-decoder": "^1.1.0", | ||
"express": "^4.16.2", | ||
"express-graphql": "^0.6.11", | ||
"graphql": "^0.13.1", | ||
"lodash": "^4.17.5", | ||
"web3": "^1.0.0-beta.30" | ||
"web3": "^1.0.0-beta.34" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^4.11.1", | ||
"@types/express-graphql": "^0.0.36", | ||
"@types/graphql": "^0.12.4", | ||
"@types/express-graphql": "^0.6.1", | ||
"@types/graphql": "^0.13.1", | ||
"@types/lodash": "^4.14.104", | ||
"dotenv": "^5.0.1", | ||
"dotenv-cli": "^1.4.0", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^7.1.2", | ||
"nodemon": "^1.17.3", | ||
"npm-run-all": "^4.1.2", | ||
"prettier": "1.12.1", | ||
"rimraf": "^2.6.2", | ||
"ts-node": "^4.1.0", | ||
"ts-node": "^6.0.3", | ||
"tslint": "^5.10.0", | ||
"tslint-config-prettier": "^1.13.0", | ||
"typescript": "^2.7.2", | ||
"web3-typescript-typings": "^0.9.11" | ||
"web3-typescript-typings": "^0.10.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import * as Web3 from 'web3'; | ||
|
||
export const web3: Web3 = new Web3( | ||
new Web3.providers.HttpProvider(`https://mainnet.infura.io/${process.env.INFURA_ID}`) | ||
new Web3.providers.HttpProvider(`https://mainnet.infura.io/${process.env.INFURA_ID}`), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": ["tslint:latest", "tslint-config-prettier"], | ||
"jsRules": {}, | ||
"rules": { | ||
"class-name": true, | ||
"comment-format": [true, "check-space", "check-uppercase"], | ||
"indent": [true, "spaces"], | ||
"one-line": [true, "check-open-brace", "check-whitespace"], | ||
"no-var-keyword": true, | ||
"quotemark": [true, "single", "avoid-escape"], | ||
"semicolon": [true, "always", "ignore-bound-class-methods"], | ||
"object-literal-sort-keys": false, | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-module", | ||
"check-separator", | ||
"check-type" | ||
], | ||
"typedef-whitespace": [ | ||
true, | ||
{ | ||
"call-signature": "nospace", | ||
"index-signature": "nospace", | ||
"parameter": "nospace", | ||
"property-declaration": "nospace", | ||
"variable-declaration": "nospace" | ||
}, | ||
{ | ||
"call-signature": "onespace", | ||
"index-signature": "onespace", | ||
"parameter": "onespace", | ||
"property-declaration": "onespace", | ||
"variable-declaration": "onespace" | ||
} | ||
], | ||
"no-internal-module": true, | ||
"no-trailing-whitespace": true, | ||
"no-null-keyword": true, | ||
"prefer-const": true, | ||
"jsdoc-format": true, | ||
"no-console": false | ||
}, | ||
"rulesDirectory": [] | ||
} |
Oops, something went wrong.