aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-15 01:25:44 +0800
committerGitHub <noreply@github.com>2017-11-15 01:25:44 +0800
commit05de07496fe3f9089b4c96b0594b234afc436304 (patch)
tree9baaf5ffa81aa05cdfb08dd888899b931a716896 /packages
parent247b4686fad239a461ade557e511a41091364e44 (diff)
parentab9dc66b8fd072aa4b8555126d0727af47dda059 (diff)
downloaddexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar.gz
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar.bz2
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar.lz
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar.xz
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.tar.zst
dexon-sol-tools-05de07496fe3f9089b4c96b0594b234afc436304.zip
Merge pull request #220 from 0xProject/feature/addTsLintPackage
Add TSLint Config package
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/package.json9
-rw-r--r--packages/0x.js/src/utils/abi_decoder.ts2
-rw-r--r--packages/0x.js/tslint.json2
-rw-r--r--packages/assert/package.json4
-rw-r--r--packages/tslint-config/README.md4
-rw-r--r--packages/tslint-config/package.json38
-rw-r--r--packages/tslint-config/tslint.json53
7 files changed, 104 insertions, 8 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 15dc05ed1..112164fe7 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -76,20 +76,20 @@
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
"truffle-hdwallet-provider": "^0.0.3",
- "tslint": "~5.5.0",
- "tslint-config-0xproject": "^0.0.2",
"typedoc": "~0.8.0",
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "~2.6.1",
"web3-provider-engine": "^13.0.1",
"web3-typescript-typings": "^0.7.1",
- "webpack": "^3.1.0"
+ "webpack": "^3.1.0",
+ "@0xproject/tslint-config": "0.0.2"
},
"dependencies": {
- "@0xproject/assert": "0.0.3",
"0x-json-schemas": "^0.6.1",
+ "@0xproject/assert": "0.0.3",
"bignumber.js": "~4.1.0",
+ "bn.js": "4.11.8",
"compare-versions": "^3.0.1",
"es6-promisify": "^5.0.0",
"ethereumjs-abi": "^0.6.4",
@@ -99,6 +99,7 @@
"js-sha3": "^0.6.1",
"lodash": "^4.17.4",
"publish-release": "^1.3.3",
+ "tslint": "5.8.0",
"uuid": "^3.1.0",
"web3": "^0.20.0"
}
diff --git a/packages/0x.js/src/utils/abi_decoder.ts b/packages/0x.js/src/utils/abi_decoder.ts
index 840ad9be0..df0fb2d6f 100644
--- a/packages/0x.js/src/utils/abi_decoder.ts
+++ b/packages/0x.js/src/utils/abi_decoder.ts
@@ -34,7 +34,7 @@ export class AbiDecoder {
value = this.padZeros(new BigNumber(value).toString(16));
} else if (param.type === SolidityTypes.Uint256 ||
param.type === SolidityTypes.Uint8 ||
- param.type === SolidityTypes.Uint ) {
+ param.type === SolidityTypes.Uint) {
value = new BigNumber(value);
}
decodedParams[param.name] = value;
diff --git a/packages/0x.js/tslint.json b/packages/0x.js/tslint.json
index 5842a872a..a07795151 100644
--- a/packages/0x.js/tslint.json
+++ b/packages/0x.js/tslint.json
@@ -1,5 +1,5 @@
{
"extends": [
- "tslint-config-0xproject"
+ "@0xproject/tslint-config"
]
}
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 3ce67c97b..18ad3d646 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -24,6 +24,7 @@
},
"homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md",
"devDependencies": {
+ "@0xproject/tslint-config": "0.0.2",
"@types/lodash": "^4.14.78",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
@@ -33,8 +34,7 @@
"mocha": "^4.0.1",
"npm-run-all": "^4.1.1",
"shx": "^0.2.2",
- "tslint": "~5.5.0",
- "tslint-config-0xproject": "^0.0.2",
+ "tslint": "5.8.0",
"typescript": "^2.4.2"
},
"dependencies": {
diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md
new file mode 100644
index 000000000..d8bb0a51e
--- /dev/null
+++ b/packages/tslint-config/README.md
@@ -0,0 +1,4 @@
+tslint-config
+-----------------------
+
+Lint rules related to 0xProject for TSLint.
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
new file mode 100644
index 000000000..a0a925e91
--- /dev/null
+++ b/packages/tslint-config/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "@0xproject/tslint-config",
+ "version": "0.0.2",
+ "description": "Lint rules related to 0xProject for TSLint",
+ "main": "tslint.json",
+ "files": [
+ "tslint.js",
+ "README.md",
+ "LICENSE"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/0xProject/0x.js.git"
+ },
+ "keywords": [
+ "tslint",
+ "config",
+ "0xProject",
+ "typescript",
+ "ts"
+ ],
+ "author": {
+ "name": "Fabio Berger",
+ "email": "fabio@0xproject.com"
+ },
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/0xProject/0x.js/issues"
+ },
+ "homepage": "https://github.com/0xProject/0x.js/packages/tslint-config/README.md",
+ "devDependencies": {
+ "tslint": "5.8.0",
+ "typescript": "2.6.1"
+ },
+ "dependencies": {
+ "tslint-react": "^3.2.0"
+ }
+}
diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json
new file mode 100644
index 000000000..8b839f25a
--- /dev/null
+++ b/packages/tslint-config/tslint.json
@@ -0,0 +1,53 @@
+{
+ "extends": [
+ "tslint:latest",
+ "tslint-react"
+ ],
+ "rules": {
+ "arrow-parens": [true, "ban-single-arg-parens"],
+ "ordered-imports": false,
+ "quotemark": [true, "single", "avoid-escape", "jsx-double"],
+ "callable-types": true,
+ "interface-name": false,
+ "interface-over-type-literal": true,
+ "object-literal-sort-keys": false,
+ "max-classes-per-file": false,
+ "max-line-length": [true, 120],
+ "member-ordering": [true,
+ "public-before-private",
+ "static-before-instance",
+ "variables-before-functions"
+ ],
+ "no-angle-bracket-type-assertion": true,
+ "no-default-export": true,
+ "no-empty-interface": false,
+ "no-string-throw": true,
+ "no-submodule-imports": false,
+ "no-implicit-dependencies": [true, "dev"],
+ "prefer-const": true,
+ "variable-name": [true,
+ "ban-keywords",
+ "allow-pascal-case"
+ ],
+ "whitespace": [
+ true,
+ "check-branch",
+ "check-decl",
+ "check-operator",
+ "check-separator",
+ "check-rest-spread",
+ "check-type",
+ "check-typecast",
+ "check-preblock"
+ ],
+ "jsx-alignment": true,
+ "jsx-boolean-value": true,
+ "jsx-curly-spacing": [true, "never"],
+ "jsx-no-lambda": true,
+ "jsx-no-multiline-js": false,
+ "jsx-no-string-ref": true,
+ "jsx-self-close": true,
+ "jsx-wrap-multiline": false,
+ "jsx-no-bind": false
+ }
+}