Skip to content

Commit f29628b

Browse files
authored
Merge branch 'develop' into feature/89-make-ci-cancelskip-unnecessary-workfl
2 parents 41885c6 + 7164542 commit f29628b

31 files changed

+369
-522
lines changed

.eslintrc

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
// TODO: Remove oclif defaults and add own plugins.
21
{
3-
"extends": ["oclif", "oclif-typescript", "eslint-config-prettier"],
4-
"rules": {
5-
"no-eq-null": "off",
6-
"eqeqeq": "off",
7-
"no-await-in-loop": "off",
8-
"no-else-return": "off",
9-
"no-negated-condition": "off",
10-
"valid-jsdoc": "off",
11-
"dot-notation": "off",
12-
"no-process-exit": "off",
13-
"unicorn/no-process-exit": "off",
14-
"no-warning-comments": "off",
15-
"unicorn/filename-case": "off",
16-
"no-console": "off",
17-
"@typescript-eslint/no-use-before-define": "off",
18-
"@typescript-eslint/no-unused-vars": "warn"
19-
}
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"eslint-config-prettier"
9+
]
2010
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
"@types/rimraf": "^3.0.1",
2727
"@types/uuid": "^8.3.1",
2828
"@types/validate-npm-package-name": "^3.0.2",
29-
"eslint": "^5.16.0",
30-
"eslint-config-oclif": "^3.1.0",
31-
"eslint-config-oclif-typescript": "^0.2.0",
29+
"@typescript-eslint/eslint-plugin": "^4.28.5",
30+
"@typescript-eslint/parser": "^4.28.5",
31+
"eslint": "^7.31.0",
3232
"eslint-config-prettier": "^8.3.0",
3333
"husky": "^7.0.1",
3434
"lint-staged": "^11.0.0",
3535
"prettier": "^2.3.2",
3636
"ts-node": "^10.0.0",
37-
"typescript": "^4.3.4",
37+
"typescript": "^4.3.5",
3838
"uuid": "^8.3.2"
3939
},
4040
"engines": {

src/main/create-next-stack-types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { IConfig } from "@oclif/config"
12
import CreateNextStack from "."
23
import { UnknownObject } from "./helpers/is-unknown-object"
34
import { Writable } from "./helpers/writable"
@@ -9,7 +10,10 @@ import { validateProjectPathInput } from "./questionnaire/questions/validate-pro
910
* **Do NOT call this function!**
1011
*/
1112
const temporaryWrapperForTypeSafety = () => {
12-
const createNextStackInstance = new CreateNextStack([], {} as unknown as any)
13+
const createNextStackInstance = new CreateNextStack(
14+
[],
15+
{} as unknown as IConfig
16+
)
1317
return createNextStackInstance["parse"](CreateNextStack)
1418
}
1519

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const capitalizeFirstLetter = (string: string) => {
1+
export const capitalizeFirstLetter = (string: string): string => {
22
return string.charAt(0).toUpperCase() + string.slice(1)
33
}

src/main/helpers/copy-directory.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { promises as fs } from "fs"
22
import path from "path"
33

4-
export const copyDirectory = async (src: string, dest: string) => {
4+
export const copyDirectory = async (
5+
src: string,
6+
dest: string
7+
): Promise<void> => {
58
const [entries] = await Promise.all([
69
fs.readdir(src, { withFileTypes: true }),
710
fs.mkdir(dest, { recursive: true }),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const inDebugMode = () => process.env.debug === "true"
1+
export const inDebugMode = (): boolean => process.env.debug === "true"

src/main/helpers/prefix-lines.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const prefixLines = (prefix: string, lines: string) => {
1+
export const prefixLines = (prefix: string, lines: string): string => {
22
return prefix + lines.split("\n").join("\n" + prefix)
33
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { promises as fs } from "fs"
22

3-
export const writeJsonFile = async (fileName: string, object: object) => {
3+
export const writeJsonFile = async (
4+
fileName: string,
5+
object: Record<string, unknown>
6+
): Promise<void> => {
47
const objectString = JSON.stringify(object, null, 2)
58
await fs.writeFile(fileName, objectString)
69
}

src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class CreateNextStack extends Command {
7979
}),
8080
}
8181

82-
async run() {
82+
async run(): Promise<void> {
8383
commandInstance.set(this)
8484

8585
try {

src/main/logging.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ const debugPrefix = chalk.white("debug ")
77
const warningPrefix = chalk.yellow("warning ")
88
const errorPrefix = chalk.red("error ")
99

10-
export const logInfo = (str: string) => {
10+
export const logInfo = (str: string): void => {
1111
console.info(prefixLines(infoPrefix, chalk.white(str)))
1212
}
1313

14-
export const logDebug = (str: string) => {
14+
export const logDebug = (str: string): void => {
1515
if (inDebugMode()) {
1616
console.debug(prefixLines(debugPrefix, chalk.white(str)))
1717
}
1818
}
1919

20-
export const logWarning = (str: string) => {
20+
export const logWarning = (str: string): void => {
2121
console.warn(prefixLines(warningPrefix, chalk.yellow(str)))
2222
}
2323

24-
export const logError = (str: string) => {
24+
export const logError = (str: string): void => {
2525
console.error(prefixLines(errorPrefix, chalk.red(str)))
2626
}

0 commit comments

Comments
 (0)