From 6af3971143f0204473e42891b02498fda507684d Mon Sep 17 00:00:00 2001 From: "Shahar Or (mightyiam)" Date: Thu, 28 Nov 2019 23:37:58 +0700 Subject: [PATCH] feat: upgrade plugin to v2.7.0 - Fixes #157 - Fixes #159 --- package.json | 6 +++--- src/index.test.ts | 2 ++ src/index.ts | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c5db07f0..8168f18f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "TypeScript" ], "dependencies": { - "@typescript-eslint/parser": "^2.3.3", + "@typescript-eslint/parser": "^2.7.0", "eslint-config-standard": "^14.1.0" }, "peerDependencies": { @@ -64,14 +64,14 @@ "eslint-plugin-node": ">=9.1.0", "eslint-plugin-promise": ">=4.2.1", "eslint-plugin-standard": ">=4.0.0", - "@typescript-eslint/eslint-plugin": ">=2.3.3" + "@typescript-eslint/eslint-plugin": ">=2.7.0" }, "devDependencies": { "@commitlint/cli": "^8.2.0", "@commitlint/config-conventional": "^8.2.0", "@commitlint/travis-cli": "^8.2.0", "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "^2.3.3", + "@typescript-eslint/eslint-plugin": "^2.7.0", "ava": "^2.4.0", "editorconfig-checker": "^3.0.3", "eslint": "^6.6.0", diff --git a/src/index.test.ts b/src/index.test.ts index f5ade33c..d253be7a 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -35,6 +35,7 @@ test('export', (t): void => { 'no-undef': 'off', 'no-unused-vars': 'off', 'no-use-before-define': 'off', + 'no-unused-expressions': 'off', 'no-useless-constructor': 'off', quotes: 'off', '@typescript-eslint/adjacent-overload-signatures': 'error', @@ -91,6 +92,7 @@ test('export', (t): void => { '@typescript-eslint/no-unnecessary-type-assertion': 'error', '@typescript-eslint/no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: true }], '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: false, typedefs: false }], + '@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true }], '@typescript-eslint/no-useless-constructor': 'error', '@typescript-eslint/no-var-requires': 'error', '@typescript-eslint/prefer-function-type': 'error', diff --git a/src/index.ts b/src/index.ts index ea5ba99b..1d908ff0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ const equivalents = [ 'indent', 'no-array-constructor', 'no-unused-vars', + 'no-unused-expressions', 'no-useless-constructor', 'quotes' ] as const