File tree Expand file tree Collapse file tree 12 files changed +6
-49
lines changed Expand file tree Collapse file tree 12 files changed +6
-49
lines changed Original file line number Diff line number Diff line change @@ -25,25 +25,6 @@ module.exports = {
25
25
26
26
// TODO
27
27
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
- } ,
47
28
{
48
29
rules : {
49
30
"react-hooks/exhaustive-deps" : "off" ,
Original file line number Diff line number Diff line change @@ -558,12 +558,6 @@ const mobileSidebarStyle = (isStateOpen: boolean) =>
558
558
zIndex : 10 ,
559
559
} ) ;
560
560
561
- const articlesMobileListStyle = css ( {
562
- overflow : "hidden" ,
563
- padding : `0 ${ getSpace ( 5 / 2 ) } px 0 ${ getSpace ( 2 ) } px` ,
564
- boxSizing : "border-box" ,
565
- } ) ;
566
-
567
561
const headerStyle = css ( {
568
562
alignItems : "center" ,
569
563
fontSize : Typography . subhead1 ,
Original file line number Diff line number Diff line change 1
1
import { css } from "@emotion/react" ;
2
2
import type { ReactNode } from "react" ;
3
3
import { Colors } from "../lib/variables" ;
4
- import { viewport } from "../lib/mixins" ;
5
4
6
5
interface Props {
7
6
children ?: ReactNode ;
Original file line number Diff line number Diff line change 1
- import arg from "arg" ;
2
1
import process from "node:process" ;
3
2
import readline from "node:readline/promises" ;
4
3
import { config } from "../lib/config" ;
5
4
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 } ) ;
10
5
6
+ export const login = async ( ) => {
11
7
const rl = readline . createInterface ( {
12
8
input : process . stdin ,
13
9
output : process . stdout ,
Original file line number Diff line number Diff line change 1
- import arg from "arg" ;
2
1
import { config } from "../lib/config" ;
3
2
import { getFileSystemRepo } from "../lib/get-file-system-repo" ;
4
3
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance" ;
5
4
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita" ;
6
- import { QiitaApi } from "../qiita-api" ;
7
5
import { startLocalChangeWatcher , startServer } from "../server/app" ;
8
6
9
- export const preview = async ( argv : string [ ] ) => {
10
- const args = arg ( { } , { argv } ) ;
11
-
7
+ export const preview = async ( ) => {
12
8
const qiitaApi = await getQiitaApiInstance ( ) ;
13
9
const fileSystemRepo = await getFileSystemRepo ( ) ;
14
10
Original file line number Diff line number Diff line change 1
1
import arg from "arg" ;
2
2
import process from "node:process" ;
3
3
import { checkFrontmatterType } from "../lib/check-frontmatter-type" ;
4
- import { config } from "../lib/config" ;
5
4
import { QiitaItem } from "../lib/entities/qiita-item" ;
6
5
import { getFileSystemRepo } from "../lib/get-file-system-repo" ;
7
6
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance" ;
8
7
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita" ;
9
8
import { validateItem } from "../lib/validators/item-validator" ;
10
- import { Item , QiitaApi } from "../qiita-api" ;
9
+ import { Item } from "../qiita-api" ;
11
10
12
11
export const publish = async ( argv : string [ ] ) => {
13
12
const args = arg (
Original file line number Diff line number Diff line change 1
1
import arg from "arg" ;
2
- import { config } from "../lib/config" ;
3
2
import { getFileSystemRepo } from "../lib/get-file-system-repo" ;
4
3
import { getQiitaApiInstance } from "../lib/get-qiita-api-instance" ;
5
4
import { syncArticlesFromQiita } from "../lib/sync-articles-from-qiita" ;
6
- import { QiitaApi } from "../qiita-api" ;
7
- import { startLocalChangeWatcher , startServer } from "../server/app" ;
8
5
9
6
export const pull = async ( argv : string [ ] ) => {
10
7
const args = arg (
Original file line number Diff line number Diff line change 1
1
import matter from "gray-matter" ;
2
- import { Dirent } from "node:fs" ;
3
2
import fs from "node:fs/promises" ;
4
3
import { Item } from "../qiita-api" ;
5
4
import { FileSystemRepo } from "./file-system-repo" ;
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export class FileSystemRepo {
201
201
) ;
202
202
}
203
203
204
- private defaultBasename ( fileContent : FileContent , _remote : boolean ) {
204
+ private defaultBasename ( fileContent : FileContent ) {
205
205
// TODO: Add article title to basename
206
206
return fileContent . id as string ;
207
207
}
@@ -239,7 +239,7 @@ export class FileSystemRepo {
239
239
return ;
240
240
}
241
241
const filepath = this . getFilePath (
242
- basename || this . defaultBasename ( fileContent , remote ) ,
242
+ basename || this . defaultBasename ( fileContent ) ,
243
243
remote
244
244
) ;
245
245
const data = fileContent . toSaveFormat ( ) ;
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import type Express from "express";
2
2
import { Router } from "express" ;
3
3
import fs from "node:fs/promises" ;
4
4
import path from "node:path" ;
5
- import { config } from "../../lib/config" ;
6
5
import { getQiitaApiInstance } from "../../lib/get-qiita-api-instance" ;
7
- import { QiitaApi } from "../../qiita-api" ;
8
6
9
7
const readmeIndex = async ( req : Express . Request , res : Express . Response ) => {
10
8
try {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function startServer() {
35
35
: 8888 ;
36
36
const host = "localhost" ;
37
37
38
- return new Promise < Server > ( ( resolve , reject ) => {
38
+ return new Promise < Server > ( ( resolve ) => {
39
39
server
40
40
. listen ( port , host )
41
41
. once ( "listening" , ( ) => {
Original file line number Diff line number Diff line change 1
- import { config } from "../../lib/config" ;
2
1
import { getQiitaApiInstance } from "../../lib/get-qiita-api-instance" ;
3
- import { QiitaApi } from "../../qiita-api" ;
4
2
5
3
let currentUser : { id : string } | undefined ;
6
4
You can’t perform that action at this time.
0 commit comments