-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58876b9
commit e8c8abb
Showing
32 changed files
with
3,716 additions
and
851 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 |
---|---|---|
@@ -1,35 +1,22 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: ["plugin:react/recommended", "prettier"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
plugins: ["@typescript-eslint", "tailwindcss"], | ||
extends: [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"prettier", | ||
"plugin:tailwindcss/recommended", | ||
], | ||
rules: { | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ | ||
prefer: "type-imports", | ||
fixStyle: "inline-type-imports", | ||
}, | ||
], | ||
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
}, | ||
plugins: ["react", "@typescript-eslint"], | ||
rules: {}, | ||
settings: { | ||
tailwindcss: { | ||
callees: ["cn"], | ||
config: "./tailwind.config.ts", | ||
}, | ||
next: { | ||
rootDir: ["./"], | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
} | ||
|
||
module.exports = config | ||
}; |
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,42 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
echo '🏗️👷 Styling, testing and building your project before committing' | ||
|
||
# Check Prettier standards | ||
npm run check-format || | ||
( | ||
echo '🤢🤮🤢🤮 Its FOKING RAW - Your styling looks disgusting. 🤢🤮🤢🤮 | ||
Prettier Check Failed. Run npm run format, add changes and try commit again.'; | ||
false; | ||
) | ||
|
||
# Check ESLint Standards | ||
# npm run check-lint || | ||
# ( | ||
# echo '😤🏀👋😤 Get that weak shit out of here! 😤🏀👋😤 | ||
# ESLint Check Failed. Make the required changes listed above, add changes and try to commit again.' | ||
# false; | ||
# ) | ||
|
||
# Check tsconfig standards | ||
# npm run check-types || | ||
# ( | ||
# echo '🤡😂❌🤡 Failed Type check. 🤡😂❌🤡 | ||
# Are you seriously trying to write that? Make the changes required above.' | ||
# false; | ||
# ) | ||
|
||
# If everything passes... Now we can commit | ||
echo '🤔🤔🤔🤔... Alright.... Code looks good to me... Trying to build now. 🤔🤔🤔🤔' | ||
|
||
npm run build || | ||
( | ||
echo '❌👷🔨❌ Better call Bob... Because your build failed ❌👷🔨❌ | ||
Next build failed: View the errors above to see why. | ||
' | ||
false; | ||
) | ||
|
||
# If everything passes... Now we can commit | ||
echo '✅✅✅✅ You win this time... I am committing this now. ✅✅✅✅' |
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,6 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
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,6 +1,9 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.formatOnSave": true | ||
} | ||
{ | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true, | ||
"source.fixAll.format": true | ||
} | ||
} |
Oops, something went wrong.