Skip to content

Commit b8c41b5

Browse files
committed
fix: lint
1 parent 30bf711 commit b8c41b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+121
-123
lines changed

packages/docs/scripts/build.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $, buildScript, rm } from "complete-node";
1+
import { $, buildScript, deleteFileOrDirectory } from "complete-node";
22
import path from "node:path";
33

44
const DOCS_BUILD_ENABLED = false as boolean;
@@ -21,7 +21,7 @@ await buildScript(async (packageRoot) => {
2121
const generatedDocPaths = GENERATED_DOC_DIRECTORY_NAMES.map((directoryName) =>
2222
path.join(packageRoot, "docs", directoryName),
2323
);
24-
rm(...generatedDocPaths);
24+
await deleteFileOrDirectory(...generatedDocPaths);
2525

2626
const repoRoot = path.resolve(packageRoot, "..", "..");
2727

packages/docs/scripts/deploy.mts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import {
22
$,
33
appendFile,
4-
cp,
4+
copyFileOrDirectory,
5+
deleteFileOrDirectory,
56
echo,
67
exit,
78
fatalError,
89
getArgs,
910
isGitRepositoryClean,
1011
isGitRepositoryLatestCommit,
11-
mv,
12-
rm,
12+
moveFileOrDirectory,
1313
sleep,
1414
} from "complete-node";
1515
import path from "node:path";
@@ -41,10 +41,10 @@ if (commitSHA1 === undefined || commitSHA1 === "") {
4141

4242
// The website repository will be already cloned at this point by the previous GitHub action,
4343
// including switching to the "gh-pages" branch. See "ci.yml" for more information.
44-
mv(DOCS_REPO_GIT, DOCS_REPO_GIT_BACKUP);
45-
rm(DOCS_REPO);
46-
cp(BUILD_DIRECTORY_PATH, DOCS_REPO);
47-
mv(DOCS_REPO_GIT_BACKUP, DOCS_REPO_GIT);
44+
await moveFileOrDirectory(DOCS_REPO_GIT, DOCS_REPO_GIT_BACKUP);
45+
await deleteFileOrDirectory(DOCS_REPO);
46+
await copyFileOrDirectory(BUILD_DIRECTORY_PATH, DOCS_REPO);
47+
await moveFileOrDirectory(DOCS_REPO_GIT_BACKUP, DOCS_REPO_GIT);
4848

4949
const isClean = await isGitRepositoryClean(DOCS_REPO);
5050
if (isClean) {
@@ -103,4 +103,4 @@ while (true) {
103103
await sleep(SECONDS_TO_SLEEP); // eslint-disable-line no-await-in-loop
104104
}
105105

106-
appendFile(GITHUB_OUTPUT_FILE, "SHOULD_SCRAPE=1\n");
106+
await appendFile(GITHUB_OUTPUT_FILE, "SHOULD_SCRAPE=1\n");

packages/eslint-plugin-isaacscript/scripts/generateConfigs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function writeConfig(
6161

6262
const fileName = `${name}.ts`;
6363
const filePath = path.join(CONFIGS_DIRECTORY_PATH, fileName);
64-
writeFile(filePath, content);
64+
await writeFile(filePath, content);
6565
}
6666

6767
/** Reduces records to key/value pairs. */

packages/eslint-plugin-isaacscript/scripts/generateRules.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ const RULES_DIRECTORY_PATH = path.join(SRC_DIRECTORY_PATH, "rules");
1414
export const RULES_TS_PATH = path.join(SRC_DIRECTORY_PATH, "rules.ts");
1515

1616
export async function generateRules(): Promise<void> {
17-
const ruleNames = getRuleNames();
17+
const ruleNames = await getRuleNames();
1818
const comment = getAutoGeneratedComment();
1919
const code = getRulesCode(ruleNames);
2020
const combined = comment + code;
2121
const content = await formatWithPrettier(combined, "typescript");
2222

23-
writeFile(RULES_TS_PATH, content);
23+
await writeFile(RULES_TS_PATH, content);
2424
}
2525

26-
function getRuleNames(): readonly string[] {
27-
const fileNames = getFileNamesInDirectory(RULES_DIRECTORY_PATH);
26+
async function getRuleNames(): Promise<readonly string[]> {
27+
const fileNames = await getFileNamesInDirectory(RULES_DIRECTORY_PATH);
2828
const ruleNames = fileNames.map((fileName) => fileName.replace(/\.ts$/, ""));
2929
ruleNames.sort();
3030

packages/eslint-plugin-isaacscript/tests/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export const ruleTester = new RuleTester({
1616
*
1717
* SyntaxError: Cannot use 'import.meta' outside a module
1818
*/
19-
// eslint-disable-next-line unicorn/prefer-module
2019
tsconfigRootDir: path.join(__dirname, "fixtures"),
2120
},
2221
},

packages/isaac-typescript-definitions-repentogon/scripts/build.mts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { $, buildScript, cp, prependFile } from "complete-node";
1+
import {
2+
$,
3+
buildScript,
4+
copyFileOrDirectory,
5+
prependFile,
6+
} from "complete-node";
27
import path from "node:path";
38

49
await buildScript(async (packageRoot) => {
@@ -18,8 +23,11 @@ await buildScript(async (packageRoot) => {
1823
// the types into the "dist" directory so that they resolve properly.
1924
const outDir = "dist";
2025
const indexDTSPath = path.join(outDir, "index.d.ts");
21-
prependFile(indexDTSPath, '/// <reference path="./types/index.d.ts" />\n\n');
26+
await prependFile(
27+
indexDTSPath,
28+
'/// <reference path="./types/index.d.ts" />\n\n',
29+
);
2230
const srcPath = path.join(packageRoot, "src", "types");
2331
const dstPath = path.join(outDir, "types");
24-
cp(srcPath, dstPath);
32+
await copyFileOrDirectory(srcPath, dstPath);
2533
});

packages/isaac-typescript-definitions-repentogon/src/enums/flags/AddHealthTypeFlag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*
55
* This enum is for REPENTOGON, an exe-hack which expands the modding API.
66
*
7-
* @see https://repentogon.com/
87
* @enum
98
* @notExported
109
* @rename AddHealthTypeFlag
10+
* @see https://repentogon.com/
1111
*/
1212
const AddHealthTypeFlagInternal = {
1313
NONE: 0,

packages/isaac-typescript-definitions-repentogon/src/enums/flags/AnimationRenderFlag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*
55
* This enum is for REPENTOGON, an exe-hack which expands the modding API.
66
*
7-
* @see https://repentogon.com/
87
* @enum
98
* @notExported
109
* @rename AnimationRenderFlag
10+
* @see https://repentogon.com/
1111
*/
1212
const AnimationRenderFlagInternal = {
1313
/** Rapidly distorts the spritesheet position. */

packages/isaac-typescript-definitions-repentogon/src/enums/flags/ButtonActionFlag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*
55
* This enum is for REPENTOGON, an exe-hack which expands the modding API.
66
*
7-
* @see https://repentogon.com/
87
* @enum
98
* @notExported
109
* @rename ButtonActionFlag
10+
* @see https://repentogon.com/
1111
*/
1212
const ButtonActionFlagInternal = {
1313
ACTION_LEFT: 1 << 0,

packages/isaac-typescript-definitions-repentogon/src/enums/flags/ConceptionFamiliarFlag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*
55
* This enum is for REPENTOGON, an exe-hack which expands the modding API.
66
*
7-
* @see https://repentogon.com/
87
* @enum
98
* @notExported
109
* @rename ConceptionFamiliarFlag
10+
* @see https://repentogon.com/
1111
*/
1212
const ConceptionFamiliarFlagInternal = {
1313
LEECH: 1 << 0,

0 commit comments

Comments
 (0)