Unverified Commit eb8a193c authored by eric sciple's avatar eric sciple Committed by GitHub
Browse files

update dev dependencies and react to new linting rules (#611)

parent c49af7ca
Loading
Loading
Loading
Loading
+1 −7
Changes for .eslintrc.json: 1 added line, 7 removed lines.
Original line number Diff line number Diff line
{
  "plugins": ["jest", "@typescript-eslint"],
  "extends": ["plugin:github/es6"],
  "extends": ["plugin:github/recommended"],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": 9,
@@ -16,13 +16,9 @@
    "@typescript-eslint/no-require-imports": "error",
    "@typescript-eslint/array-type": "error",
    "@typescript-eslint/await-thenable": "error",
    "@typescript-eslint/ban-ts-ignore": "error",
    "camelcase": "off",
    "@typescript-eslint/camelcase": "error",
    "@typescript-eslint/class-name-casing": "error",
    "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
    "@typescript-eslint/func-call-spacing": ["error", "never"],
    "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
    "@typescript-eslint/no-array-constructor": "error",
    "@typescript-eslint/no-empty-interface": "error",
    "@typescript-eslint/no-explicit-any": "error",
@@ -33,7 +29,6 @@
    "@typescript-eslint/no-misused-new": "error",
    "@typescript-eslint/no-namespace": "error",
    "@typescript-eslint/no-non-null-assertion": "warn",
    "@typescript-eslint/no-object-literal-type-assertion": "error",
    "@typescript-eslint/no-unnecessary-qualifier": "error",
    "@typescript-eslint/no-unnecessary-type-assertion": "error",
    "@typescript-eslint/no-useless-constructor": "error",
@@ -41,7 +36,6 @@
    "@typescript-eslint/prefer-for-of": "warn",
    "@typescript-eslint/prefer-function-type": "warn",
    "@typescript-eslint/prefer-includes": "error",
    "@typescript-eslint/prefer-interface": "error",
    "@typescript-eslint/prefer-string-starts-ends-with": "error",
    "@typescript-eslint/promise-function-async": "error",
    "@typescript-eslint/require-array-sort-compare": "error",
+4 −4
Changes for __test__/git-auth-helper.test.ts: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ describe('git-auth-helper tests', () => {
          `Did not expect file to exist: '${globalGitConfigPath}'`
        )
      } catch (err) {
        if (err.code !== 'ENOENT') {
        if ((err as any)?.code !== 'ENOENT') {
          throw err
        }
      }
@@ -601,7 +601,7 @@ describe('git-auth-helper tests', () => {
      await fs.promises.stat(actualKeyPath)
      throw new Error('SSH key should have been deleted')
    } catch (err) {
      if (err.code !== 'ENOENT') {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
@@ -611,7 +611,7 @@ describe('git-auth-helper tests', () => {
      await fs.promises.stat(actualKnownHostsPath)
      throw new Error('SSH known hosts should have been deleted')
    } catch (err) {
      if (err.code !== 'ENOENT') {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
@@ -658,7 +658,7 @@ describe('git-auth-helper tests', () => {
      await fs.promises.stat(homeOverride)
      throw new Error(`Should have been deleted '${homeOverride}'`)
    } catch (err) {
      if (err.code !== 'ENOENT') {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
+5 −3
Changes for __test__/ref-helper.test.ts: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ describe('ref-helper tests', () => {
      await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit)
      throw new Error('Should not reach here')
    } catch (err) {
      expect(err.message).toBe('Arg git cannot be empty')
      expect((err as any)?.message).toBe('Arg git cannot be empty')
    }
  })

@@ -25,7 +25,9 @@ describe('ref-helper tests', () => {
      await refHelper.getCheckoutInfo(git, '', '')
      throw new Error('Should not reach here')
    } catch (err) {
      expect(err.message).toBe('Args ref and commit cannot both be empty')
      expect((err as any)?.message).toBe(
        'Args ref and commit cannot both be empty'
      )
    }
  })

@@ -102,7 +104,7 @@ describe('ref-helper tests', () => {
      await refHelper.getCheckoutInfo(git, 'my-ref', '')
      throw new Error('Should not reach here')
    } catch (err) {
      expect(err.message).toBe(
      expect((err as any)?.message).toBe(
        "A branch or tag with the name 'my-ref' could not be found"
      )
    }
+1 −1
Changes for __test__/retry-helper.test.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ describe('retry-helper tests', () => {
        throw new Error(`some error ${++attempts}`)
      })
    } catch (err) {
      error = err
      error = err as Error
    }
    expect(error.message).toBe('some error 3')
    expect(attempts).toBe(3)
+253 −83

File changed.

Preview size limit exceeded, changes collapsed.

Loading