Skip to content

Commit

Permalink
Install shadcn, playwright, eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Jul 9, 2024
1 parent a2eb417 commit e46b89a
Show file tree
Hide file tree
Showing 17 changed files with 4,395 additions and 293 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.next
/node_modules
/public
109 changes: 108 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
{
"extends": "next/core-web-vitals"
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"next/core-web-vitals"
],
"rules": {
"no-console": [1, { "allow": ["info", "error", "debug"] }],
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal", "parent", "sibling"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
},
{
"pattern": "react**",
"group": "builtin"
},
{
"pattern": "@react**",
"group": "builtin"
},
{
"pattern": "next",
"group": "builtin",
"position": "after"
},
{
"pattern": "next/**",
"group": "builtin",
"position": "after"
},
{
"pattern": "node_modules/**",
"group": "builtin"
},
{
"pattern": "@/env.mjs",
"group": "internal",
"position": "before"
},
{
"pattern": "@/lib/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/store",
"group": "internal",
"position": "before"
},
{
"pattern": "@/store/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/services/**",
"group": "internal",
"position": "after"
},
{
"pattern": "@/types/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/app/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/constants/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/hooks/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/containers/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/components/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@/styles/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": ["react"]
}
]
}
}
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

# other
.anima
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const config = {
semi: true,
tabWidth: 2,
printWidth: 100,
singleQuote: false,
plugins: ['prettier-plugin-tailwindcss'],
};

module.exports = config;
17 changes: 17 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
Loading

0 comments on commit e46b89a

Please sign in to comment.