Skip to content

Commit 4d79ea3

Browse files
authored
Merge pull request #39 from increments/remove-unused-variables
Remove unused variables
2 parents 81b64c1 + 82ddcd5 commit 4d79ea3

File tree

12 files changed

+6
-49
lines changed

12 files changed

+6
-49
lines changed

.eslintrc.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,6 @@ module.exports = {
2525

2626
// TODO
2727
overrides: [
28-
{
29-
rules: {
30-
"@typescript-eslint/no-unused-vars": "off",
31-
},
32-
files: [
33-
"src/client/components/Article.tsx",
34-
"src/client/components/SidebarContents.tsx",
35-
"src/client/templates/Sidebar.tsx",
36-
"src/commands/login.ts",
37-
"src/commands/preview.ts",
38-
"src/commands/publish.ts",
39-
"src/commands/pull.ts",
40-
"src/lib/file-system-repo.test.ts",
41-
"src/lib/file-system-repo.ts",
42-
"src/server/api/readme.ts",
43-
"src/server/app.ts",
44-
"src/server/lib/get-current-user.ts",
45-
],
46-
},
4728
{
4829
rules: {
4930
"react-hooks/exhaustive-deps": "off",

src/client/components/SidebarContents.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,6 @@ const mobileSidebarStyle = (isStateOpen: boolean) =>
558558
zIndex: 10,
559559
});
560560

561-
const articlesMobileListStyle = css({
562-
overflow: "hidden",
563-
padding: `0 ${getSpace(5 / 2)}px 0 ${getSpace(2)}px`,
564-
boxSizing: "border-box",
565-
});
566-
567561
const headerStyle = css({
568562
alignItems: "center",
569563
fontSize: Typography.subhead1,

src/client/templates/Sidebar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { css } from "@emotion/react";
22
import type { ReactNode } from "react";
33
import { Colors } from "../lib/variables";
4-
import { viewport } from "../lib/mixins";
54

65
interface Props {
76
children?: ReactNode;

src/commands/login.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import arg from "arg";
21
import process from "node:process";
32
import readline from "node:readline/promises";
43
import { config } from "../lib/config";
54
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance";
6-
import { QiitaApi } from "../qiita-api";
7-
8-
export const login = async (argv: string[]) => {
9-
const args = arg({}, { argv });
105

6+
export const login = async () => {
117
const rl = readline.createInterface({
128
input: process.stdin,
139
output: process.stdout,

src/commands/preview.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
import arg from "arg";
21
import { config } from "../lib/config";
32
import { getFileSystemRepo } from "../lib/get-file-system-repo";
43
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance";
54
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita";
6-
import { QiitaApi } from "../qiita-api";
75
import { startLocalChangeWatcher, startServer } from "../server/app";
86

9-
export const preview = async (argv: string[]) => {
10-
const args = arg({}, { argv });
11-
7+
export const preview = async () => {
128
const qiitaApi = await getQiitaApiInstance();
139
const fileSystemRepo = await getFileSystemRepo();
1410

src/commands/publish.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import arg from "arg";
22
import process from "node:process";
33
import { checkFrontmatterType } from "../lib/check-frontmatter-type";
4-
import { config } from "../lib/config";
54
import { QiitaItem } from "../lib/entities/qiita-item";
65
import { getFileSystemRepo } from "../lib/get-file-system-repo";
76
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance";
87
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita";
98
import { validateItem } from "../lib/validators/item-validator";
10-
import { Item, QiitaApi } from "../qiita-api";
9+
import { Item } from "../qiita-api";
1110

1211
export const publish = async (argv: string[]) => {
1312
const args = arg(

src/commands/pull.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import arg from "arg";
2-
import { config } from "../lib/config";
32
import { getFileSystemRepo } from "../lib/get-file-system-repo";
43
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance";
54
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita";
6-
import { QiitaApi } from "../qiita-api";
7-
import { startLocalChangeWatcher, startServer } from "../server/app";
85

96
export const pull = async (argv: string[]) => {
107
const args = arg(

src/lib/file-system-repo.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import matter from "gray-matter";
2-
import { Dirent } from "node:fs";
32
import fs from "node:fs/promises";
43
import { Item } from "../qiita-api";
54
import { FileSystemRepo } from "./file-system-repo";

src/lib/file-system-repo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class FileSystemRepo {
201201
);
202202
}
203203

204-
private defaultBasename(fileContent: FileContent, _remote: boolean) {
204+
private defaultBasename(fileContent: FileContent) {
205205
// TODO: Add article title to basename
206206
return fileContent.id as string;
207207
}
@@ -239,7 +239,7 @@ export class FileSystemRepo {
239239
return;
240240
}
241241
const filepath = this.getFilePath(
242-
basename || this.defaultBasename(fileContent, remote),
242+
basename || this.defaultBasename(fileContent),
243243
remote
244244
);
245245
const data = fileContent.toSaveFormat();

src/server/api/readme.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import type Express from "express";
22
import { Router } from "express";
33
import fs from "node:fs/promises";
44
import path from "node:path";
5-
import { config } from "../../lib/config";
65
import { getQiitaApiInstance } from "../../lib/get-qiita-api-instance";
7-
import { QiitaApi } from "../../qiita-api";
86

97
const readmeIndex = async (req: Express.Request, res: Express.Response) => {
108
try {

src/server/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export async function startServer() {
3535
: 8888;
3636
const host = "localhost";
3737

38-
return new Promise<Server>((resolve, reject) => {
38+
return new Promise<Server>((resolve) => {
3939
server
4040
.listen(port, host)
4141
.once("listening", () => {

src/server/lib/get-current-user.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { config } from "../../lib/config";
21
import { getQiitaApiInstance } from "../../lib/get-qiita-api-instance";
3-
import { QiitaApi } from "../../qiita-api";
42

53
let currentUser: { id: string } | undefined;
64

0 commit comments

Comments
 (0)