From 7d8f6991828375caba2098319b96050906cb1f46 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 1 Nov 2017 20:02:59 +0700 Subject: [PATCH] Use `tslint-xo` (#19) --- package.json | 9 ++-- tslint.json | 113 +-------------------------------------------------- 2 files changed, 6 insertions(+), 116 deletions(-) diff --git a/package.json b/package.json index b6ebb18..4dfcb90 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "prerelease": "npm run build", "pretest": "npm run build -- --sourceMap", "test": "npm run lint && nyc ava dist/test", - "lint": "tslint --type-check -p tsconfig.json \"source/**/*.ts\"", - "build": "del dist && tsc -p tsconfig.json --declaration" + "lint": "tslint --project .", + "build": "del dist && tsc --declaration" }, "files": [ "dist" @@ -54,7 +54,8 @@ "codecov": "^2.3.0", "del-cli": "^1.1.0", "nyc": "^11.2.1", - "tslint": "^5.7.0", - "typescript": "^2.5.3" + "tslint": "^5.8.0", + "tslint-xo": "^0.1.0", + "typescript": "^2.6.1" } } diff --git a/tslint.json b/tslint.json index 587fa41..55e9f36 100644 --- a/tslint.json +++ b/tslint.json @@ -1,114 +1,3 @@ { - "rules": { - "adjacent-overload-signatures": true, - "no-empty-interface": true, - "no-import-side-effect": true, - "no-internal-module": true, - "no-namespace": true, - "no-non-null-assertion": true, - "no-parameter-reassignment": true, - "no-reference": true, - "no-unnecessary-type-assertion": true, - "no-var-requires": true, - "only-arrow-functions": true, - "prefer-for-of": true, - "promise-function-async": true, - "await-promise": true, - "curly": true, - "no-arg": true, - "no-conditional-assignment": true, - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-floating-promises": true, - "no-for-in-array": true, - "no-invalid-template-strings": true, - "no-invalid-this": false, - "no-misused-new": true, - "no-shadowed-variable": true, - "no-sparse-arrays": true, - "no-string-literal": true, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-this-assignment": true, - "no-unsafe-finally": true, - "no-unused-expression": true, - "no-unused-variable": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "prefer-object-spread": true, - "radix": true, - "restrict-plus-operands": true, - "strict-type-predicates": true, - "switch-default": true, - "triple-equals": true, - "typeof-compare": true, - "use-default-type-parameter": true, - "use-isnan": true, - "deprecation": true, - "eofline": true, - "indent": [true, "tabs"], - "no-default-export": true, - "no-duplicate-imports": true, - "no-require-imports": true, - "prefer-const": true, - "trailing-comma": false, - "array-type": [true, "array"], - "arrow-parens": [true, "ban-single-arg-parens"], - "arrow-return-shorthand": true, - "binary-expression-operand-order": true, - "callable-types": true, - "class-name": true, - "comment-format": [true, "check-space", "check-uppercase"], - "completed-docs": [true, "methods"], - "encoding": true, - "import-spacing": true, - "interface-over-type-literal": true, - "newline-before-return": true, - "new-parens": true, - "no-angle-bracket-type-assertion": true, - "no-boolean-literal-compare": false, - "no-consecutive-blank-lines": true, - "no-irregular-whitespace": true, - "no-reference-import": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unnecessary-qualifier": true, - "number-literal-format": true, - "object-literal-key-quotes": [true, "as-needed"], - "object-literal-shorthand": true, - "one-variable-per-declaration": true, - "prefer-method-signature": true, - "prefer-template": [true, "allow-single-concat"], - "quotemark": [true, "single", "avoid-template"], - "semicolon": true, - "space-before-function-paren": [ - true, - { - "anonymous": "never", - "named": "never", - "asyncArrow": "always" - } - ], - "space-within-parens": [true, 0], - "switch-final-break": true, - "type-literal-delimiter": true, - "variable-name": [true, "check-format", "ban-keywords"], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-module", - "check-separator", - "check-rest-spread", - "check-type", - "check-typecast", - "check-type-operator", - "check-preblock" - ] - } + "extends": "tslint-xo" }