Skip to content

Commit a583c39

Browse files
committed
chore: add Prettier and plugins for code formatting
1 parent 64e85c0 commit a583c39

14 files changed

+7018
-2494
lines changed

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": [
3+
"plugin:prettier/recommended",
4+
"stylelint-prettier/recommended"
5+
]
6+
}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run commitlint ${1}

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": [
3+
"prettier-plugin-organize-imports",
4+
"prettier-plugin-jsdoc",
5+
"prettier-plugin-tailwindcss"
6+
]
7+
}

.stylelintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": ["stylelint-prettier"],
3+
"rules": {
4+
"prettier/prettier": true
5+
}
6+
}

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
13
import { dirname } from "path";
24
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
45

56
const __filename = fileURLToPath(import.meta.url);
67
const __dirname = dirname(__filename);
@@ -11,6 +12,7 @@ const compat = new FlatCompat({
1112

1213
const eslintConfig = [
1314
...compat.extends("next/core-web-vitals", "next/typescript"),
15+
eslintPluginPrettierRecommended,
1416
];
1517

1618
export default eslintConfig;

0 commit comments

Comments
 (0)