aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tslint-config
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tslint-config')
-rw-r--r--packages/tslint-config/CHANGELOG.md6
-rw-r--r--packages/tslint-config/README.md10
-rw-r--r--packages/tslint-config/package.json38
-rw-r--r--packages/tslint-config/scripts/postpublish.js14
-rw-r--r--packages/tslint-config/tslint.json53
5 files changed, 121 insertions, 0 deletions
diff --git a/packages/tslint-config/CHANGELOG.md b/packages/tslint-config/CHANGELOG.md
new file mode 100644
index 000000000..7a6ba41c0
--- /dev/null
+++ b/packages/tslint-config/CHANGELOG.md
@@ -0,0 +1,6 @@
+# CHANGELOG
+
+v0.1.0 - _Nov. 14, 2017_
+------------------------
+ * Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject`
+ * Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned.
diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md
new file mode 100644
index 000000000..38a6bce45
--- /dev/null
+++ b/packages/tslint-config/README.md
@@ -0,0 +1,10 @@
+tslint-config
+-------------
+
+Lint rules related to 0xProject for TSLint.
+
+## Install:
+
+```bash
+npm install @0xproject/tslint-config --save-dev
+```
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
new file mode 100644
index 000000000..ca46d63fc
--- /dev/null
+++ b/packages/tslint-config/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "@0xproject/tslint-config",
+ "version": "0.1.0",
+ "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/scripts/postpublish.js b/packages/tslint-config/scripts/postpublish.js
new file mode 100644
index 000000000..7fa452b08
--- /dev/null
+++ b/packages/tslint-config/scripts/postpublish.js
@@ -0,0 +1,14 @@
+const postpublish_utils = require('../../../scripts/postpublish_utils');
+const packageJSON = require('../package.json');
+
+const subPackageName = packageJSON.name;
+
+postpublish_utils.getLatestTagAndVersionAsync(subPackageName)
+ .then(function(result) {
+ const releaseName = postpublish_utils.getReleaseName(subPackageName, result.version);
+ const assets = [];
+ return postpublish_utils.publishReleaseNotes(result.tag, releaseName, assets);
+ })
+ .catch (function(err) {
+ throw err;
+ });
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
+ }
+}