Skip to content

Commit

Permalink
Merge pull request #2 from Collusic/feature/#1_boilerplating
Browse files Browse the repository at this point in the history
Feature/#1 boilerplating
  • Loading branch information
SingTheCode authored Mar 6, 2024
2 parents 73aad18 + 0db394a commit e516709
Show file tree
Hide file tree
Showing 14 changed files with 11,262 additions and 8,266 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,jsx,ts,tsx}]
charset = utf-8
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
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"]
}
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lint-staged
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
30 changes: 30 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +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()}`];
},
},
},
],
};
Loading

0 comments on commit e516709

Please sign in to comment.