From bd5e47360097df92189692fa92d160b9e2c6524c Mon Sep 17 00:00:00 2001 From: "Shahar Or (mightyiam)" Date: Tue, 4 Feb 2020 21:19:41 +0700 Subject: [PATCH] feat: upgrade parser & plugin to v2.17.0 BREAKING CHANGE: new rule @typescript-eslint/no-non-null-asserted-optional-chain https://github.com/typescript-eslint/typescript-eslint/pull/1469 BREAKING CHANGE: [no-extra-non-null-assertion] flag optional chain after a non-null assertion https://github.com/typescript-eslint/typescript-eslint/pull/1460 Closes #218. --- package.json | 6 +++--- src/index.test.ts | 2 ++ src/index.ts | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4965e154b..100083036 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "TypeScript" ], "dependencies": { - "@typescript-eslint/parser": "^2.16.0", + "@typescript-eslint/parser": "^2.17.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.16.0" + "@typescript-eslint/eslint-plugin": ">=2.17.0" }, "devDependencies": { "@commitlint/cli": "^8.2.0", "@commitlint/config-conventional": "^8.2.0", "@commitlint/travis-cli": "^8.2.0", "@types/node": "^13.1.0", - "@typescript-eslint/eslint-plugin": "^2.16.0", + "@typescript-eslint/eslint-plugin": "^2.17.0", "ava": "^3.1.0", "editorconfig-checker": "^3.0.3", "eslint": "^6.7.2", diff --git a/src/index.test.ts b/src/index.test.ts index f88899046..8b52cae2f 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -33,6 +33,7 @@ test('export', (t): void => { rules: { 'brace-style': 'off', camelcase: 'off', + 'default-param-last': 'off', indent: 'off', 'no-array-constructor': 'off', 'no-duplicate-class-members': 'off', @@ -102,6 +103,7 @@ test('export', (t): void => { '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'error', '@typescript-eslint/no-this-alias': ['error', { allowDestructuring: true }], '@typescript-eslint/no-throw-literal': 'error', diff --git a/src/index.ts b/src/index.ts index 954e6acc6..e28dea3a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,6 +36,7 @@ export = { // Rules replaced by @typescript-eslint versions: ...fromEntries(equivalents.map((name) => [name, 'off'])), camelcase: 'off', + 'default-param-last': 'off', 'no-use-before-define': 'off', // @typescript-eslint versions of Standard.js rules: @@ -90,6 +91,7 @@ export = { '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'error', '@typescript-eslint/no-this-alias': ['error', { allowDestructuring: true }], '@typescript-eslint/no-unnecessary-type-assertion': 'error',