From 032a11c5a58cd7609fb0ef85e23d2790d801666c Mon Sep 17 00:00:00 2001 From: Dotan Simha Date: Wed, 10 Jun 2020 15:04:09 +0300 Subject: [PATCH 1/2] added specific eslint rules for typescript tests --- .eslintrc.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.eslintrc.yml b/.eslintrc.yml index 66567952f8..00244f2680 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -632,6 +632,18 @@ overrides: '@typescript-eslint/type-annotation-spacing': off - files: '**/__*__/**' rules: + '@typescript-eslint/consistent-type-assertions': + [error, { assertionStyle: as, objectLiteralTypeAssertions: allow }] + '@typescript-eslint/no-non-null-assertion': off + '@typescript-eslint/restrict-plus-operands': off + '@typescript-eslint/no-floating-promises': off + '@typescript-eslint/no-invalid-this': off + '@typescript-eslint/no-throw-literal': off + '@typescript-eslint/require-await': off + '@typescript-eslint/await-thenable': off + 'prefer-promise-reject-errors': 0 + 'no-new-wrappers': 0 + 'no-throw-literal': 0 node/no-unpublished-import: off node/no-unpublished-require: off import/no-restricted-paths: off From d37de637ae726f6d7d1db5cf8c48dc26be5ee8b9 Mon Sep 17 00:00:00 2001 From: Dotan Simha Date: Mon, 15 Jun 2020 13:01:43 +0300 Subject: [PATCH 2/2] fixes --- .eslintrc.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 00244f2680..dbae3ae00b 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -632,6 +632,14 @@ overrides: '@typescript-eslint/type-annotation-spacing': off - files: '**/__*__/**' rules: + node/no-unpublished-import: off + node/no-unpublished-require: off + import/no-restricted-paths: off + import/no-extraneous-dependencies: [error, { devDependencies: true }] + import/no-nodejs-modules: off + no-restricted-syntax: 0 + # Below rules are disabled only for the migration period from Flow to TypeScript + # and they effect only tests files, to allow more flexible testing scenarios. '@typescript-eslint/consistent-type-assertions': [error, { assertionStyle: as, objectLiteralTypeAssertions: allow }] '@typescript-eslint/no-non-null-assertion': off @@ -644,12 +652,6 @@ overrides: 'prefer-promise-reject-errors': 0 'no-new-wrappers': 0 'no-throw-literal': 0 - node/no-unpublished-import: off - node/no-unpublished-require: off - import/no-restricted-paths: off - import/no-extraneous-dependencies: [error, { devDependencies: true }] - import/no-nodejs-modules: off - no-restricted-syntax: off - files: 'resources/**' parserOptions: sourceType: script