-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate prettier, eslint, husky, commitlint and lint-staged (#55
- Loading branch information
Showing
30 changed files
with
2,679 additions
and
1,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"type-enum": [ | ||
2, | ||
"always", | ||
[ | ||
// Changes that affect the build system or dependency-only changes | ||
"build", | ||
// Changes to CI workflows | ||
"ci", | ||
// Documentation-only changes | ||
"docs", | ||
// A new feature | ||
"feat", | ||
//A bug fix | ||
"fix", | ||
// A code change that improves performance | ||
"perf", | ||
// A code change that neither fixes a bug nor adds a feature | ||
"refactor", | ||
// A commit that reverts a previous commit | ||
"revert", | ||
// Changes that do not affect the meaning of the code | ||
"style", | ||
// Adding missing tests or correcting existing tests | ||
"test", | ||
], | ||
], | ||
"scope-enum": [ | ||
2, | ||
"always", | ||
[ | ||
// Dependency-related changes | ||
"deps", | ||
// ESLint-related changes | ||
"eslint", | ||
// Prettier-related changes | ||
"prettier", | ||
// TypeScript-related changes | ||
"typescript", | ||
// Go-related changes | ||
"golang", | ||
], | ||
], | ||
"scope-empty": [1, "never"], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/eslintrc", | ||
"plugins": ["@typescript-eslint", "tailwindcss"], | ||
"plugins": ["tailwindcss"], | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"prettier", | ||
"plugin:tailwindcss/recommended" | ||
"plugin:tailwindcss/recommended", | ||
"plugin:@next/next/recommended" | ||
], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": "off", | ||
"react/jsx-key": "off", | ||
"tailwindcss/no-custom-classname": "off", | ||
"tailwindcss/classnames-order": "off", | ||
"tailwindcss/enforces-shorthand": "off", | ||
"tailwindcss/no-unnecessary-arbitrary-value": "off" | ||
"tailwindcss/classnames-order": "error" | ||
}, | ||
"settings": { | ||
"tailwindcss": { | ||
"callees": ["cn", "cva"], | ||
"config": "./tailwind.config.ts", | ||
"classRegex": "^(class(Name)?|tw)$" | ||
"config": "tailwind.config.cjs" | ||
}, | ||
"next": { | ||
"rootDir": "./" | ||
} | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"parser": "@typescript-eslint/parser" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.