Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit ec536f8

Browse files
authored
[HOUSEKEEPING] remove eslint-disable for ring commands (#469)
1 parent 11016d8 commit ec536f8

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

src/commands/ring/delete.ts

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-use-before-define */
21
import commander from "commander";
32
import * as bedrock from "../../lib/bedrockYaml";
43
import { build as buildCmd, exit as exitCmd } from "../../lib/commandBuilder";
@@ -9,6 +8,17 @@ import { logger } from "../../logger";
98
import { BedrockFileInfo } from "../../types";
109
import decorator from "./delete.decorator.json";
1110

11+
/**
12+
* Check the bedrock.yaml and the target ring exists
13+
* @param projectPath
14+
*/
15+
export const checkDependencies = (projectPath: string): void => {
16+
const fileInfo: BedrockFileInfo = bedrock.fileInfo(projectPath);
17+
if (fileInfo.exist === false) {
18+
throw Error(PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE);
19+
}
20+
};
21+
1222
/**
1323
* Executes the command.
1424
*
@@ -63,14 +73,3 @@ export const commandDecorator = (command: commander.Command): void => {
6373
});
6474
});
6575
};
66-
67-
/**
68-
* Check the bedrock.yaml and the target ring exists
69-
* @param projectPath
70-
*/
71-
export const checkDependencies = (projectPath: string): void => {
72-
const fileInfo: BedrockFileInfo = bedrock.fileInfo(projectPath);
73-
if (fileInfo.exist === false) {
74-
throw Error(PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE);
75-
}
76-
};

src/commands/ring/set-default.ts

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-use-before-define */
21
import commander from "commander";
32
import {
43
fileInfo as bedrockFileInfo,
@@ -12,6 +11,17 @@ import { logger } from "../../logger";
1211
import { BedrockFileInfo } from "../../types";
1312
import decorator from "./set-default.decorator.json";
1413

14+
/**
15+
* Check for bedrock.yaml
16+
* @param projectPath
17+
*/
18+
export const checkDependencies = (projectPath: string): void => {
19+
const fileInfo: BedrockFileInfo = bedrockFileInfo(projectPath);
20+
if (fileInfo.exist === false) {
21+
throw new Error(PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE);
22+
}
23+
};
24+
1525
/**
1626
* Executes the command.
1727
*
@@ -53,14 +63,3 @@ export const commandDecorator = (command: commander.Command): void => {
5363
});
5464
});
5565
};
56-
57-
/**
58-
* Check for bedrock.yaml
59-
* @param projectPath
60-
*/
61-
export const checkDependencies = (projectPath: string): void => {
62-
const fileInfo: BedrockFileInfo = bedrockFileInfo(projectPath);
63-
if (fileInfo.exist === false) {
64-
throw new Error(PROJECT_INIT_DEPENDENCY_ERROR_MESSAGE);
65-
}
66-
};

0 commit comments

Comments
 (0)