From 0ecc16baf0a941d6dcfed0533f0f1d08d1d8cbeb Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Tue, 21 May 2019 11:15:50 +0200 Subject: [PATCH] chore(build): fix linting (#3769) --- lib/platform/utils/read-only-issue-body.ts | 2 ++ lib/util/host-rules.ts | 7 ++----- package.json | 4 ++-- test/platform/bitbucket/utils.spec.ts | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/platform/utils/read-only-issue-body.ts b/lib/platform/utils/read-only-issue-body.ts index b71cd764bd..4f9959b628 100644 --- a/lib/platform/utils/read-only-issue-body.ts +++ b/lib/platform/utils/read-only-issue-body.ts @@ -6,3 +6,5 @@ export function readOnlyIssueBody(body: string) { .replace(/ Click (?:on |)a checkbox.*\./g, '') .replace(/\[ ] <!-- \w*-branch.*-->/g, ''); } + +export default readOnlyIssueBody; diff --git a/lib/util/host-rules.ts b/lib/util/host-rules.ts index 9b8d6abbee..44b3624f42 100644 --- a/lib/util/host-rules.ts +++ b/lib/util/host-rules.ts @@ -71,11 +71,8 @@ export function find( }: { platform: string; host?: string; endpoint?: string }, overrides?: IPlatformConfig ) { - const massagedHost = host - ? host - : endpoint - ? URL.parse(endpoint).host - : undefined; + const massagedHost = + host || (endpoint ? URL.parse(endpoint).host : undefined); if (!platforms[platform]) { if (massagedHost && hostsOnly[massagedHost]) { return merge(hostsOnly[massagedHost], overrides); diff --git a/package.json b/package.json index 9acc384f1e..cf21c9e648 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "copy-static-files": "copyfiles -u 1 lib/**/*.json lib/**/*.py dist/", "create-json-schema": "node bin/create-json-schema.js && prettier --write \"renovate-schema.json\"", "debug": "node -r ts-node/register/transpile-only --inspect-brk lib/renovate.ts", - "eslint": "eslint lib test", - "eslint-fix": "eslint --fix lib test", + "eslint": "eslint lib test --ext \".js,.ts\"", + "eslint-fix": "eslint --fix lib test --ext \".js,.ts\"", "jest": "yarn clean-cache && cross-env NODE_ENV=test LOG_LEVEL=fatal jest", "jest-debug": "cross-env NODE_ENV=test LOG_LEVEL=fatal node --inspect-brk node_modules/jest/bin/jest.js", "jest-silent": "yarn jest --reporters jest-silent-reporter", diff --git a/test/platform/bitbucket/utils.spec.ts b/test/platform/bitbucket/utils.spec.ts index e9ffcb8f3b..2afd2c3db9 100644 --- a/test/platform/bitbucket/utils.spec.ts +++ b/test/platform/bitbucket/utils.spec.ts @@ -1,8 +1,8 @@ -jest.mock('../../../lib/platform/bitbucket/bb-got-wrapper'); - import * as utils from '../../../lib/platform/bitbucket/utils'; import { IGotApi } from '../../../lib/platform/common'; +jest.mock('../../../lib/platform/bitbucket/bb-got-wrapper'); + const api: jest.Mocked< IGotApi > = require('../../../lib/platform/bitbucket/bb-got-wrapper').api; -- GitLab