Skip to content

Commit

Permalink
feat(config): Fixed linter problems (renovatebot#13035)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmorch committed Dec 13, 2021
1 parent 6591821 commit b8c4c19
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is functionally equivalent to fileFunctionPromise.js but syntactically different
// This is functionally equivalent to file-function-promise.js but syntactically different

// @ts-ignore
module.exports = async function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is functionally equivalent to fileAsyncFunction.js but syntactically different
// This is functionally equivalent to file-async-function.js but syntactically different

// @ts-ignore
module.exports = function () {
Expand Down
8 changes: 4 additions & 4 deletions lib/workers/global/config/parse/file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ describe('workers/global/config/parse/file', () => {
describe('.getConfig()', () => {
it.each([
['custom js config file', 'file.js'],
['custom js config file exporting a Promise', 'filePromise.js'],
['custom js config file exporting a function', 'fileFunction.js'],
['custom js config file exporting a Promise', 'file-promise.js'],
['custom js config file exporting a function', 'file-function.js'],
// The next two are different syntactic ways of expressing the same thing
[
'custom js config file exporting a function returning a Promise',
'fileFunctionPromise.js',
'file-function-promise.js',
],
[
'custom js config file exporting an async function',
'fileAsyncFunction.js',
'file-async-function.js',
],
['JSON5 config file', 'config.json5'],
['YAML config file', 'config.yaml'],
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/global/config/parse/file.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import is from 'is';
import { load } from 'js-yaml';
import JSON5 from 'json5';
import upath from 'upath';
import { migrateConfig } from '../../../../config/migration';
import type { AllConfig, RenovateConfig } from '../../../../config/types';
import { logger } from '../../../../logger';
import { readFile } from '../../../../util/fs';
import is from 'is';

export async function getParsedContent(file: string): Promise<RenovateConfig> {
switch (upath.extname(file)) {
Expand Down

0 comments on commit b8c4c19

Please sign in to comment.