Skip to content

Commit

Permalink
[#1] chore: prettier tab간 간격 2칸 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
SingTheCode committed Mar 2, 2024
1 parent 284424c commit 0db394a
Show file tree
Hide file tree
Showing 12 changed files with 11,344 additions and 11,355 deletions.
7 changes: 2 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": ["next/core-web-vitals", "next", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
"extends": ["next/core-web-vitals", "next", "prettier"],
"plugins": ["prettier"]
}
10 changes: 5 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"singleQuote": false,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 4,
"semi": true
"singleQuote": false,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2,
"semi": true
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-opti

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

Expand Down
57 changes: 27 additions & 30 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
["feat", "fix", "refactor", "chore", "docs", "style"],
],
"scope-empty": [2, "always"],
"subject-empty": [2, "always"],
"type-empty": [2, "always"],
"header-custom": [2, "always"],
// 커스텀 규칙을 직접 정의하는 대신 기본 규칙을 활용
},
plugins: [
{
rules: {
"header-custom": (parsed) => {
if (!parsed.header) {
return [false, "header is empty"];
}
const pattern =
/^\[\#\d+\]\s(feat|fix|refactor|chore|docs|style):\s.+/;
const match = pattern.test(parsed.header);
return [
match,
`header does not match pattern ${pattern.toString()}`,
];
},
},
},
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
["feat", "fix", "refactor", "chore", "docs", "style"],
],
"scope-empty": [2, "always"],
"subject-empty": [2, "always"],
"type-empty": [2, "always"],
"header-custom": [2, "always"],
// 커스텀 규칙을 직접 정의하는 대신 기본 규칙을 활용
},
plugins: [
{
rules: {
"header-custom": (parsed) => {
if (!parsed.header) {
return [false, "header is empty"];
}
const pattern =
/^\[\#\d+\]\s(feat|fix|refactor|chore|docs|style):\s.+/;
const match = pattern.test(parsed.header);
return [match, `header does not match pattern ${pattern.toString()}`];
},
},
},
],
};
Loading

0 comments on commit 0db394a

Please sign in to comment.