aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tslint-config
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tslint-config')
-rw-r--r--packages/tslint-config/package.json7
-rw-r--r--packages/tslint-config/rules/walkers/async_suffix.ts1
-rw-r--r--packages/tslint-config/tslint.json5
3 files changed, 9 insertions, 4 deletions
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
index 3b320e774..888ff675a 100644
--- a/packages/tslint-config/package.json
+++ b/packages/tslint-config/package.json
@@ -4,9 +4,9 @@
"description": "Lint rules related to 0xProject for TSLint",
"main": "tslint.json",
"scripts": {
- "build": "tsc",
- "clean": "shx rm -rf lib",
- "lint": "tslint --project . 'rules/**/*.ts'"
+ "build": "tsc",
+ "clean": "shx rm -rf lib",
+ "lint": "tslint --project . 'rules/**/*.ts'"
},
"files": [
"tslint.js",
@@ -37,6 +37,7 @@
"@types/lodash": "^4.14.86",
"shx": "^0.2.2",
"tslint": "5.8.0",
+ "tslint-eslint-rules": "^4.1.1",
"typescript": "~2.6.1"
},
"dependencies": {
diff --git a/packages/tslint-config/rules/walkers/async_suffix.ts b/packages/tslint-config/rules/walkers/async_suffix.ts
index 0c89bd99f..7fa7a78b8 100644
--- a/packages/tslint-config/rules/walkers/async_suffix.ts
+++ b/packages/tslint-config/rules/walkers/async_suffix.ts
@@ -9,6 +9,7 @@ export class AsyncSuffixWalker extends Lint.RuleWalker {
const methodName = methodNameNode.getText();
if (!_.isUndefined(node.type)) {
if (node.type.kind === ts.SyntaxKind.TypeReference) {
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const returnTypeName = (node.type as ts.TypeReferenceNode).typeName.getText();
if (returnTypeName === 'Promise' && !methodName.endsWith('Async')) {
const failure = this.createFailure(
diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json
index d3ee51a63..acb6876c3 100644
--- a/packages/tslint-config/tslint.json
+++ b/packages/tslint-config/tslint.json
@@ -1,7 +1,8 @@
{
"extends": [
"tslint:latest",
- "tslint-react"
+ "tslint-react",
+ "tslint-eslint-rules"
],
"rules": {
"adjacent-overload-signatures": true,
@@ -51,8 +52,10 @@
"no-string-throw": true,
"no-submodule-imports": false,
"no-unnecessary-type-assertion": true,
+ "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}],
"no-implicit-dependencies": [true, "dev"],
"number-literal-format": true,
+ "object-curly-spacing": [true, "never"],
"object-literal-sort-keys": false,
"ordered-imports": [
true,