Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge 98af1a9 into e2ec3f1
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLefrere committed Sep 11, 2019
2 parents e2ec3f1 + 98af1a9 commit 2de4f59
Show file tree
Hide file tree
Showing 120 changed files with 1,530 additions and 1,873 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules/**
**/lib/**
**/example/**
packages/light.js/example-react
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/camelcase': ['error', { allow: ['keccak_256'] }],
'@typescript-eslint/no-unused-vars': [1, { argsIgnorePattern: '^_' }],

// TODO: Remove all of these disabled rules.
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
printWidth: 120,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
};
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ node_js:
- '10'
script:
- yarn lint
- yarn typecheck
- yarn test:api
- yarn test --silent --coverage --coverageReporters=text-lcov | coveralls ; test ${PIPESTATUS[0]} -eq 0
before_deploy:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ yarn outdated
git checkout -b <INSERT_YOUR_BRANCH_NAME>
```

5. Run tests, linting, and build
5. Run tests, type checking, linting, and build

```bash
yarn test; yarn lint; yarn build
yarn test; yarn typecheck; yarn lint; yarn build
```

6. Push the branch to your fork of the repo
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,28 @@
},
"scripts": {
"build": "lerna exec yarn build --stream",
"lint": "tslint 'packages/**/*.ts'",
"typecheck": "lerna exec yarn typecheck --stream",
"lint": "eslint --fix 'packages/*/**/*.{ts,tsx}'",
"postinstall": "yarn build",
"test": "jest",
"test:api": "cd packages/api && yarn test",
"update-docs": "scripts/update-docs.sh"
},
"devDependencies": {
"@types/jest": "^24.0.13",
"@typescript-eslint/eslint-plugin": "^2.2.0",
"@typescript-eslint/parser": "^2.2.0",
"eslint": "^6.3.0",
"eslint-config-prettier": "^6.3.0",
"eslint-import-resolver-typescript": "^1.1.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-json": "^1.4.0",
"eslint-plugin-prettier": "^3.1.0",
"jest": "^24.8.0",
"lerna": "^3.4.3",
"prettier": "^1.18.2",
"rimraf": "^2.6.2",
"ts-jest": "^24.0.0",
"tslint": "^5.10.0",
"tslint-config-semistandard": "^7.0.0",
"typedoc": "^0.14.2",
"typedoc-plugin-markdown": "^1.1.13",
"typescript": "^3.1.6"
Expand Down
1 change: 1 addition & 0 deletions packages/abi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"scripts": {
"docs": "typedoc",
"prebuild": "rimraf lib",
"typecheck": "tsc --noEmit",
"build": "tsc",
"test": "jest"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/abi/src/decoder/bytesTaken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ class BytesTaken {
private _bytes: number[];
private _newOffset: number;

constructor (bytes: number[], newOffset: number) {
constructor(bytes: number[], newOffset: number) {
this._bytes = bytes;
this._newOffset = newOffset;
}

get bytes () {
get bytes() {
return this._bytes;
}

get newOffset () {
get newOffset() {
return this._newOffset;
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/abi/src/decoder/decodeResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ class DecodeResult {
_token: Token;
_newOffset: number;

constructor (token: Token, newOffset: number) {
constructor(token: Token, newOffset: number) {
this._token = token;
this._newOffset = newOffset;
}

get token () {
get token() {
return this._token;
}

get newOffset () {
get newOffset() {
return this._newOffset;
}
}
Expand Down

0 comments on commit 2de4f59

Please sign in to comment.