Skip to content

Commit

Permalink
chore: format to eslint v9 update
Browse files Browse the repository at this point in the history
  • Loading branch information
nameless-mc committed Oct 8, 2024
1 parent 5a833a6 commit 707beda
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 19 deletions.
12 changes: 6 additions & 6 deletions scripts/compress-to-zip-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ const thirdPartyNoticeFile = path.join(projectRoot, "NOTICE");

try {
await $`test -e ${executableDir}`;
} catch (e) {
} catch (_e) {
console.error(
"Error: The executables of cli-kintone are not found at",
executableDir,
);
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}

try {
await $`test -e ${thirdPartyNoticeFile}`;
} catch (e) {
} catch (_e) {
console.error("The NOTICE file should exist at", thirdPartyNoticeFile);
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}

try {
await $`test -e ${licenseFile}`;
} catch (e) {
} catch (_e) {
console.error("Error: The LICENSE file should exist at", licenseFile);
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-e2e-in-parallel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ runAll(patterns, {
console.error(error);
}

// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
});
1 change: 0 additions & 1 deletion scripts/update-contributors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line node/no-unpublished-import
import { Octokit } from "@octokit/rest";
import * as fs from "fs/promises";

Expand Down
2 changes: 1 addition & 1 deletion src/cli/record/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const execute = (args: Args) => {
const handler = async (args: Args) => {
if (!hasApiToken(args["api-token"]) && (args.username || args.password)) {
logger.error("The delete command only supports API token authentication.");
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/record/delete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const run: (
await deleteAllRecords(apiClient, app);
} catch (e) {
logger.error(new RunError(e));
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/record/export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const run: (
});
} catch (e) {
logger.error(new RunError(e));
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
};
1 change: 0 additions & 1 deletion src/record/export/types/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export type OneOf =
| KintoneRecordField.Modifier
| KintoneRecordField.UpdatedTime
| KintoneRecordField.SingleLineText
// eslint-disable-next-line @typescript-eslint/ban-types
| KintoneRecordField.Number // Although ESLint recognizes it as primitive type, this type is defined above in this file.
| KintoneRecordField.Calc
| KintoneRecordField.MultiLineText
Expand Down
2 changes: 1 addition & 1 deletion src/record/import/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const run: (
}
} catch (e) {
logger.error(new RunError(e));
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
};
Expand Down
2 changes: 0 additions & 2 deletions src/record/import/types/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export type Subtable = FieldWith<

export type InSubtable =
| SingleLineText
// eslint-disable-next-line @typescript-eslint/ban-types
| Number // Although ESLint recognizes it as primitive type, this type is defined above in this file.
| Calc
| MultiLineText
Expand All @@ -65,7 +64,6 @@ export type OneOf =
| Modifier
| UpdatedTime
| SingleLineText
// eslint-disable-next-line @typescript-eslint/ban-types
| Number
| Calc
| MultiLineText
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { themes as prismThemes } from "prism-react-renderer";
// eslint-disable-next-line node/no-missing-import,node/no-unpublished-import
// eslint-disable-next-line n/no-missing-import
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";

Expand Down
1 change: 0 additions & 1 deletion website/scripts/update-credits.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line node/no-unpublished-import
import { Octokit } from "@octokit/rest";
import * as fs from "fs/promises";

Expand Down
1 change: 0 additions & 1 deletion website/sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line node/no-unpublished-import
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

/**
Expand Down
1 change: 0 additions & 1 deletion website/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type FeatureItem = {
const FeatureList: FeatureItem[] = [
{
title: "Easy to Use",
// eslint-disable-next-line node/no-missing-require
Svg: require("@site/static/img/undraw_well_done_re_3hpo.svg").default,
description: (
<>
Expand Down

0 comments on commit 707beda

Please sign in to comment.