Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/#801 패키지의 버전을 업데이트한다 #802

Merged
merged 25 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
31d1410
chore: 패키지 업데이트, nvm 및 volta 설정, script 수정
cruelladevil Oct 29, 2023
fcedf5f
chore: yarn.lock 제거
cruelladevil Oct 29, 2023
222950a
chore: eslint 및 tsconifg 설정 수정
cruelladevil Oct 7, 2023
3519ef9
chore: gatsby-config 설정 수정
cruelladevil Oct 7, 2023
12fa1af
fix: ending slash 제거
cruelladevil Oct 15, 2023
20f7f50
chore: gatsby-plugin-emotion을 통한 emotion 사용 설정
cruelladevil Oct 7, 2023
13db17a
feat: gatsby-image를 gatsby-plugin-image로 마이그레이션
cruelladevil Oct 7, 2023
437d203
refactor: AuthorYaml의 id 대신 name으로 변경
cruelladevil Oct 8, 2023
227fcff
refactor: frontmatter___date를 frontmatter: date로 변경
cruelladevil Oct 8, 2023
bbf4de3
fix: 404 페이지에서 홈으로 가는 링크 수정
cruelladevil Oct 15, 2023
98ae9fc
fix: Pagination 이슈 해결
cruelladevil Oct 15, 2023
d3bc0a8
fix: gatsby-transformer-yaml v4로 업데이트 하면서 id를 사용하지 못하는 이슈 해결
cruelladevil Oct 15, 2023
16926db
fix: 포스트에서 meta og가 정상적으로 되지 않는 오류 수정
cruelladevil Oct 29, 2023
22a5045
fix: ico 모듈에 타입을 지정하여 모듈을 찾을 수 없는 타입스크립트 에러 해결
cruelladevil Oct 15, 2023
ca42fbe
style: eslint fix
cruelladevil Oct 29, 2023
c556b8d
style: prettier 적용
cruelladevil Oct 29, 2023
7b6fd9a
style: 변수명 변경
cruelladevil Oct 29, 2023
6f55628
fix: eslint 에러 수정
cruelladevil Oct 29, 2023
cbfcab0
style: 코드 스타일 수정
cruelladevil Oct 29, 2023
0d2ecd5
fix: html lang 속성을 ko로 변경
cruelladevil Nov 1, 2023
4b8cfdf
feat: about 페이지 삭제
cruelladevil Nov 22, 2023
17302e9
chore: node 버전을 18.0.0 이상으로 강제(gatsby v5 minimal node version)
cruelladevil Nov 22, 2023
317d171
chore: gh-pages 패키지 삭제
cruelladevil Nov 22, 2023
5404444
feat: mailchimp를 사용하는 subscribe 기능 제거 및 컴포넌트 삭제
cruelladevil Nov 22, 2023
f7277f5
Merge branch 'main' into chore/update-version
cruelladevil Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .babelrc

This file was deleted.

63 changes: 60 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ module.exports = {
jest: true,
browser: true,
},
extends: ['xo-space/esnext', 'xo-react/space', 'xo-typescript'],
extends: ['xo-space', 'xo-react/space', 'xo-typescript'],
rules: {
'object-curly-spacing': ['error', 'always'],
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/explicit-function-return-type': 'off',
'capitalized-comments': 'off',
'comma-dangle': ['error', 'always-multiline'],
'react/jsx-tag-spacing': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'no-warning-comments': 'off',
'complexity': 'off',
complexity: 'off',
'jsx-quotes': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
Expand All @@ -24,5 +26,60 @@ module.exports = {
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/indent': 'off',
'operator-linebreak': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'react/prefer-read-only-props': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: false,
types: {
String: {
message: 'Use `string` instead.',
fixWith: 'string',
},
Number: {
message: 'Use `number` instead.',
fixWith: 'number',
},
Boolean: {
message: 'Use `boolean` instead.',
fixWith: 'boolean',
},
Symbol: {
message: 'Use `symbol` instead.',
fixWith: 'symbol',
},
Object: {
message:
'The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848',
fixWith: 'Record<string, unknown>',
},
'{}': {
message:
'The `{}` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead.',
fixWith: 'Record<string, unknown>',
},
object: {
message:
'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848',
fixWith: 'Record<string, unknown>',
},
Function: 'Use a specific function type instead, like `() => void`.',
'[]': "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.",
'[[]]':
"Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.",
'[[[]]]': "Don't use `[[[]]]`. Use `SomeType[][][]` instead.",
},
},
],
cruelladevil marked this conversation as resolved.
Show resolved Hide resolved
},
};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
cruelladevil marked this conversation as resolved.
Show resolved Hide resolved
69 changes: 59 additions & 10 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ module.exports = {
siteMetadata: {
title: 'Tecoble',
description: 'woowacourse code review & devlog',
siteUrl: 'https://tecoble.techcourse.co.kr/', // full path to blog - no ending slash
siteUrl: 'https://tecoble.techcourse.co.kr',
},
mapping: {
'MarkdownRemark.frontmatter.author': 'AuthorYaml',
'MarkdownRemark.frontmatter.author': 'AuthorYaml.name',
},
plugins: [
{
resolve: 'gatsby-plugin-google-gtag',
options: {
trackingIds: [
'G-7YLT36LV0M',
],
trackingIds: ['G-7YLT36LV0M'],
},
},

'gatsby-plugin-sitemap',
'gatsby-plugin-image',
{
resolve: 'gatsby-plugin-sharp',
options: {
Expand All @@ -38,7 +36,6 @@ module.exports = {
{
resolve: 'gatsby-transformer-remark',
options: {
"excerpt_separator": `<!-- end -->`,
plugins: [
{
resolve: 'gatsby-remark-responsive-iframe',
Expand All @@ -49,7 +46,6 @@ module.exports = {
'gatsby-remark-prismjs',
'gatsby-remark-copy-linked-files',
'gatsby-remark-smartypants',
'gatsby-remark-abbr',
{
resolve: 'gatsby-remark-images',
options: {
Expand All @@ -64,14 +60,67 @@ module.exports = {
{
resolve: 'gatsby-plugin-canonical-urls',
options: {
siteUrl: 'https://tecoble.techcourse.co.kr/',
siteUrl: 'https://tecoble.techcourse.co.kr',
},
},
'gatsby-plugin-typescript',
'gatsby-plugin-emotion',
'gatsby-transformer-sharp',
'gatsby-plugin-react-helmet',
'gatsby-transformer-yaml',
'gatsby-plugin-feed',
{
resolve: 'gatsby-plugin-feed',
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allMarkdownRemark } }) =>
allMarkdownRemark.edges.map(edge => ({
...edge.node.frontmatter,
description: edge.node.excerpt,
date: edge.node.frontmatter.date,
url: `${site.siteMetadata.siteUrl}${edge.node.fields.slug}`,
guid: `${site.siteMetadata.siteUrl}${edge.node.fields.slug}`,
custom_elements: [{ 'content:encoded': edge.node.html }],
})),
query: `
{
allMarkdownRemark(
filter: { frontmatter: { draft: { ne: true } } }
sort: { frontmatter: { date: DESC } }
) {
edges {
node {
excerpt
html
fields { slug }
frontmatter {
title
date
}
}
}
}
}
`,
output: '/rss.xml',
title: 'Tecoble',
match: '^/blog/',
},
],
},
},
{
resolve: 'gatsby-plugin-postcss',
options: {
Expand Down
35 changes: 11 additions & 24 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports.createPages = async ({ graphql, actions }) => {
{
allMarkdownRemark(
limit: 2000
sort: { fields: [frontmatter___date], order: ASC }
sort: { frontmatter: { date: ASC } }
filter: { frontmatter: { draft: { ne: true } } }
) {
edges {
Expand All @@ -66,29 +66,15 @@ exports.createPages = async ({ graphql, actions }) => {
excerpt
image {
childImageSharp {
fluid(maxWidth: 3720) {
aspectRatio
base64
sizes
src
srcSet
}
gatsbyImageData(placeholder: BLURRED, layout: FULL_WIDTH)
}
}
author {
id
name
bio
avatar {
children {
... on ImageSharp {
fluid(quality: 100) {
aspectRatio
base64
sizes
src
srcSet
}
}
childImageSharp {
gatsbyImageData(placeholder: BLURRED, layout: FULL_WIDTH)
}
}
}
Expand All @@ -104,6 +90,7 @@ exports.createPages = async ({ graphql, actions }) => {
edges {
node {
id
name
}
}
}
Expand Down Expand Up @@ -167,9 +154,9 @@ exports.createPages = async ({ graphql, actions }) => {
const tagTemplate = path.resolve('./src/templates/tags.tsx');
const tags = _.uniq(
_.flatten(
result.data.allMarkdownRemark.edges.map(edge => {
return _.castArray(_.get(edge, 'node.frontmatter.tags', []));
}),
result.data.allMarkdownRemark.edges.map(edge =>
_.castArray(_.get(edge, 'node.frontmatter.tags', [])),
),
),
);
tags.forEach(tag => {
Expand All @@ -186,10 +173,10 @@ exports.createPages = async ({ graphql, actions }) => {
const authorTemplate = path.resolve('./src/templates/author.tsx');
result.data.allAuthorYaml.edges.forEach(edge => {
createPage({
path: `/author/${_.kebabCase(edge.node.id)}/`,
path: `/author/${_.kebabCase(edge.node.name)}/`,
component: authorTemplate,
context: {
author: edge.node.id,
author: edge.node.name,
},
});
});
Expand Down
Loading