Skip to content

Commit ee88b99

Browse files
authored
Maintenance (#156)
1 parent 49c2815 commit ee88b99

File tree

156 files changed

+5181
-8372
lines changed

Some content is hidden

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

156 files changed

+5181
-8372
lines changed

.babelrc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
{
2-
"presets": ["next/babel"],
3-
"plugins": ["emotion"]
2+
"presets": [
3+
[
4+
"next/babel",
5+
{
6+
"preset-react": {
7+
"runtime": "automatic",
8+
"importSource": "@emotion/react"
9+
}
10+
}
11+
]
12+
],
13+
"plugins": ["@emotion"]
414
}

.eslintrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"extends": [
44
"plugin:@typescript-eslint/recommended",
55
"react-app",
6-
"prettier/@typescript-eslint",
76
"plugin:prettier/recommended"
87
],
9-
"plugins": ["@typescript-eslint", "react", "react-hooks"],
8+
"plugins": ["@typescript-eslint", "react", "react-hooks", "@emotion"],
109
"rules": {
1110
"@typescript-eslint/explicit-function-return-type": "off",
1211
"@typescript-eslint/no-explicit-any": "off",
@@ -19,7 +18,12 @@
1918
"jsx-a11y/accessible-emoji": "off",
2019
"jsx-a11y/iframe-has-title": "off",
2120
"react-hooks/rules-of-hooks": "error",
22-
"react-hooks/exhaustive-deps": "warn"
21+
"react-hooks/exhaustive-deps": "warn",
22+
"@typescript-eslint/prefer-as-const": "off",
23+
"@typescript-eslint/ban-ts-comment": "off",
24+
"import/no-anonymous-default-export": "off",
25+
"@typescript-eslint/no-empty-function": "off",
26+
"@emotion/pkg-renaming": "error"
2327
},
2428
"overrides": [
2529
{

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode/settings.json
12
outDir
23
jpOut
34
enOut

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public-hoist-pattern[]=*eslint*
2+
public-hoist-pattern[]=*prettier*
3+
# https://github.com/pnpm/pnpm/issues/4920#issuecomment-1226724790
4+
public-hoist-pattern[]=@react-spring/core

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v13
1+
v18

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

.prettierrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"semi": false,
3-
"singleQuote": true
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"arrowParens": "avoid",
6+
"endOfLine": "auto"
47
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ I wrote about this repo on [this blog post](https://ycombinator.chibicode.com/fu
1919
## Running it locally (English version)
2020

2121
```
22-
yarn install
23-
yarn dev:en
22+
pnpm install
23+
pnpm dev:en
2424
# Go to http://localhost:9990
2525
```
2626

next-env.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config = {
1515
productionLocale: process.env.PRODUCTION_LOCALE,
1616
isDevelopment: process.env.IS_DEVELOPMENT
1717
},
18-
exportTrailingSlash: true
18+
trailingSlash: true
1919
}
2020

2121
// For locale, if running 2 servers (JP and EN) locally, if you use build-time config

package.json

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
22
"private": true,
33
"engines": {
4-
"node": "14.x"
4+
"node": ">=18",
5+
"pnpm": ">=7"
56
},
67
"dependencies": {
7-
"@emotion/core": "^10.0.22",
8-
"@emotion/styled": "^10.0.23",
9-
"@material-ui/core": "^4.6.0",
10-
"color": "^3.1.2",
11-
"luxon": "^1.21.1",
12-
"next": "9.1.7",
8+
"@emotion/react": "^11.10.5",
9+
"@emotion/styled": "^11.10.5",
10+
"@mui/material": "^5.11.0",
11+
"@react-spring/web": "^9.6.1",
12+
"color": "^4.2.3",
13+
"luxon": "^3.1.1",
14+
"next": "^12.3.4",
1315
"prism-react-renderer": "^1.0.2",
14-
"react": "^16.11.0",
15-
"react-dom": "^16.11.0",
16-
"react-spring": "^8.0.27",
16+
"react": "^17.0.2",
17+
"react-dom": "^17.0.2",
1718
"smoothscroll-polyfill": "^0.4.4",
18-
"twemoji": "^12.1.3"
19+
"twemoji": "^14.0.2"
1920
},
2021
"_moduleAliases": {
2122
"src": "outDir/tsconfig.scripts.json/src",
@@ -28,8 +29,8 @@
2829
"jp:production": "PRODUCTION=jp next -p 9993",
2930
"en:production": "PRODUCTION=en next -p 9992",
3031
"dev:prepare": "cp tsconfig.dev.json tsconfig.json && rm -f report.*.json && rm -f *.log && rm -rf .next",
31-
"dev": "yarn dev:prepare && concurrently \"yarn jp\" \"yarn en\"",
32-
"dev:en": "yarn dev:prepare && yarn en",
32+
"dev": "pnpm dev:prepare && concurrently \"pnpm jp\" \"pnpm en\"",
33+
"dev:en": "pnpm dev:prepare && pnpm en",
3334
"ts-node": "tsc --project tsconfig.scripts.json && node -r module-alias/register",
3435
"precompute": "tsc --project tsconfig.scripts.json && node -r module-alias/register outDir/tsconfig.scripts.json/scripts/precomputeExpressionContainers.js",
3536
"tsc": "tsc",
@@ -38,40 +39,43 @@
3839
"build": "cp tsconfig.prod.json tsconfig.json && next build",
3940
"build:jp": "cp tsconfig.prod.json tsconfig.json && PRODUCTION_LOCALE=jp next build && PRODUCTION_LOCALE=jp next export --outdir jpOut",
4041
"build:en": "cp tsconfig.prod.json tsconfig.json && PRODUCTION_LOCALE=en next build && PRODUCTION_LOCALE=en next export --outdir enOut",
41-
"twemoji": "mkdir -p .twemoji && rm -f src/components/Twemoji/* && rm -f .twemoji/* && cp `yarn --silent ts-node outDir/tsconfig.scripts.json/scripts/copyUsedEmojis.js` .twemoji && svgr --ext tsx --no-svgo --filename-case kebab --no-dimensions -d src/components/Twemoji .twemoji && eslint --ext .tsx --fix src/components/Twemoji && yarn twemoji:bundle",
42-
"twemoji:bundle": "yarn ts-node outDir/tsconfig.scripts.json/scripts/generateEmojisBundle.js"
42+
"twemoji": "mkdir -p .twemoji && rm -f src/components/Twemoji/* && rm -f .twemoji/* && cp `pnpm --silent ts-node outDir/tsconfig.scripts.json/scripts/copyUsedEmojis.js` .twemoji && svgr --ext tsx --no-svgo --filename-case kebab --no-dimensions -d src/components/Twemoji .twemoji && eslint --ext .tsx --fix src/components/Twemoji && pnpm twemoji:bundle",
43+
"twemoji:bundle": "pnpm ts-node outDir/tsconfig.scripts.json/scripts/generateEmojisBundle.js"
4344
},
4445
"devDependencies": {
45-
"@svgr/cli": "^5.0.1",
46+
"@babel/core": "^7.20.5",
47+
"@babel/eslint-parser": "^7.19.1",
48+
"@babel/plugin-syntax-flow": "^7.18.6",
49+
"@babel/plugin-transform-react-jsx": "^7.19.0",
50+
"@emotion/babel-plugin": "^11.10.5",
51+
"@emotion/eslint-plugin": "^11.10.0",
52+
"@svgr/cli": "^6.5.1",
4653
"@types/color": "^3.0.0",
47-
"@types/fs-extra": "^8.0.0",
48-
"@types/glob": "^7.1.1",
49-
"@types/luxon": "^1.15.2",
54+
"@types/fs-extra": "^9.0.13",
55+
"@types/glob": "^8.0.0",
56+
"@types/luxon": "^3.1.0",
5057
"@types/material-ui": "^0.21.7",
51-
"@types/node": "^13.1.6",
52-
"@types/prettier": "^1.18.3",
53-
"@types/react": "^16.9.5",
54-
"@types/react-dom": "^16.9.4",
58+
"@types/node": "^18.11.17",
59+
"@types/prettier": "^2.7.1",
60+
"@types/react": "^17.0.39",
61+
"@types/react-dom": "^17.0.11",
5562
"@types/smoothscroll-polyfill": "^0.3.1",
56-
"@typescript-eslint/eslint-plugin": "^2.6.1",
57-
"@typescript-eslint/parser": "^2.6.1",
58-
"babel-eslint": "^10.0.3",
59-
"babel-plugin-emotion": "^10.0.23",
60-
"concurrently": "^5.0.0",
61-
"eslint": "^6.5.1",
62-
"eslint-config-prettier": "^6.4.0",
63-
"eslint-config-react-app": "^5.0.2",
64-
"eslint-plugin-flowtype": "4.5.3",
63+
"@typescript-eslint/eslint-plugin": "^5.46.1",
64+
"@typescript-eslint/parser": "^5.46.1",
65+
"concurrently": "^7.6.0",
66+
"eslint": "^8.30.0",
67+
"eslint-config-prettier": "^8.5.0",
68+
"eslint-config-react-app": "^7.0.1",
69+
"eslint-plugin-flowtype": "8.0.3",
6570
"eslint-plugin-import": "^2.18.2",
6671
"eslint-plugin-jsx-a11y": "^6.2.3",
67-
"eslint-plugin-prettier": "^3.1.1",
72+
"eslint-plugin-prettier": "^4.2.1",
6873
"eslint-plugin-react": "^7.16.0",
69-
"eslint-plugin-react-hooks": "2.3.0",
70-
"fs-extra": "^8.1.0",
71-
"glob": "^7.1.6",
74+
"eslint-plugin-react-hooks": "4.6.0",
75+
"fs-extra": "^11.1.0",
76+
"glob": "^8.0.3",
7277
"module-alias": "^2.2.2",
73-
"now": "^16.6.0",
74-
"prettier": "^1.19.1",
75-
"typescript": "^3.7.2"
78+
"prettier": "^2.8.1",
79+
"typescript": "^4.9.4"
7680
}
7781
}

pages/1.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={1} />

pages/10.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={10} />

pages/11.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={11} />

pages/12.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={12} />

pages/13.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={13} />

pages/14.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={14} />

pages/15.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={15} />

pages/16.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={16} />

pages/2.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={2} />

pages/3.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={3} />

pages/4.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={4} />

pages/5.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={5} />

pages/6.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={6} />

pages/7.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={7} />

pages/8.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={8} />

pages/9.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import EpisodePageWrapper from 'src/components/EpisodePageWrapper'
32

43
export default () => <EpisodePageWrapper episodeNumber={9} />

pages/_app.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1-
import React from 'react'
21
import App from 'next/app'
3-
import Router from 'next/router'
4-
import { pageview } from 'src/lib/gtag'
52
import GlobalState from 'src/components/GlobalState'
6-
import reloadTwitterScript from 'src/lib/reloadTwitterScript'
7-
import locale from 'src/lib/locale'
8-
9-
Router.events.on('routeChangeStart', () => {
10-
reloadTwitterScript()
11-
})
12-
13-
if (locale === 'jp') {
14-
Router.events.on('routeChangeComplete', (path: string) => {
15-
pageview(path)
16-
})
17-
}
183

194
export default class MyApp extends App {
205
public render() {

pages/_document.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import Document, { Html, Head, Main, NextScript } from 'next/document'
32
import { lang } from 'src/lib/locale'
43

pages/_error.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/** @jsx jsx */
2-
import { css, jsx } from '@emotion/core'
1+
import { css } from '@emotion/react'
32
import Page from 'src/components/Page'
43
import Head from 'next/head'
54
import H from 'src/components/H'

0 commit comments

Comments
 (0)