-
-
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
0 parents
commit a8ae934
Showing
159 changed files
with
25,893 additions
and
0 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,3 @@ | ||
node_modules | ||
out | ||
!.storybook |
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,40 @@ | ||
{ | ||
// Configuration for JavaScript files | ||
"extends": [ | ||
"next/core-web-vitals" // Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration' | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": false, | ||
"endOfLine": "auto" | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
// Configuration for TypeScript files | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
"plugins": ["tailwindcss", "simple-import-sort"], | ||
"extends": [ | ||
"plugin:tailwindcss/recommended", | ||
"next/core-web-vitals", | ||
"plugin:prettier/recommended" | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": false, | ||
"endOfLine": false, | ||
"trailingComma": "none" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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,2 @@ | ||
custom: | ||
["https://donate.stripe.com/7sI5m5146ehfddm7tj", "https://nextlessjs.com"] |
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,67 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x, 20.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
name: Build with ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run build-prod | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
name: Run all tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Retrieve Git history, needed to verify commits | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm ci | ||
|
||
- if: github.event_name == 'pull_request' | ||
name: Validate all commits from PR | ||
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | ||
|
||
- name: Linter | ||
run: npm run lint | ||
|
||
- name: Type checking | ||
run: npm run check-types | ||
|
||
- name: Run unit tests | ||
run: npm run test | ||
|
||
- name: Run storybook tests | ||
run: npm run test-storybook:ci | ||
|
||
- name: Run e2e tests | ||
run: npx percy exec -- npm run e2e:headless | ||
env: | ||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} |
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,35 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
name: Create a new release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: HUSKY=0 npm ci | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release |
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,33 @@ | ||
name: Update dependencies | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
|
||
jobs: | ||
update: | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
name: Update all dependencies | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm ci | ||
|
||
- run: npx npm-check-updates -u # Update dependencies | ||
- run: rm -Rf node_modules package-lock.json | ||
- run: npm install | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
commit-message: "build: update dependencies to the latest version" | ||
title: Update dependencies to the latest version |
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,51 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# storybook | ||
storybook-static | ||
|
||
# cypress | ||
cypress/screenshots | ||
cypress/videos | ||
|
||
# next.js | ||
/.next | ||
/out | ||
|
||
# next-sitemap | ||
public/robots.txt | ||
public/sitemap.xml | ||
public/sitemap-*.xml | ||
|
||
# cache | ||
.swc/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
Thumbs.db | ||
|
||
# debug | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# local folder | ||
local | ||
|
||
# vercel | ||
.vercel |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
cd "$(dirname "$0")/.." && npx --no -- 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,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Disable concurent to run `check-types` after ESLint in lint-staged | ||
# cd "$(dirname "$0")/.." && npx lint-staged --concurrent false |
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,11 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"mikestead.dotenv", | ||
"csstools.postcss", | ||
"bradlc.vscode-tailwindcss", | ||
"Orta.vscode-jest", | ||
"yoavbls.pretty-ts-errors" | ||
] | ||
} |
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,31 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Next: Chrome", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Next: Node", | ||
"program": "${workspaceFolder}/node_modules/.bin/next", | ||
"args": ["dev"], | ||
"autoAttachChildProcesses": true, | ||
"skipFiles": ["<node_internals>/**"], | ||
"console": "integratedTerminal" | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Next: Full", | ||
"configurations": ["Next: Node", "Next: Chrome"] | ||
} | ||
] | ||
} |
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,25 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"editor.detectIndentation": false, | ||
"search.exclude": { | ||
"package-lock.json": true | ||
}, | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": [ | ||
"source.addMissingImports", | ||
"source.fixAll.eslint" | ||
], | ||
"jest.autoRun": { | ||
"watch": false // Start the jest with the watch flag | ||
// "onStartup": ["all-tests"] // Run all tests upon project launch | ||
}, | ||
"jest.showCoverageOnLoad": true, // Show code coverage when the project is launched | ||
"jest.autoRevealOutput": "on-exec-error", // Don't automatically open test explorer terminal on launch | ||
// Multiple language settings for json and jsonc files | ||
"[json][jsonc][yaml]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"prettier.ignorePath": ".gitignore" // Don't run prettier for files listed in .gitignore | ||
} |
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,21 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Project wide type checking with TypeScript", | ||
"type": "npm", | ||
"script": "check-types", | ||
"problemMatcher": ["$tsc"], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"clear": true, | ||
"reveal": "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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Remi W. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,2 @@ | ||
# Recyclium_AUD | ||
Recylium Admin User Dashboard |
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 @@ | ||
// The easiest solution to mock `next/router`: https://github.com/vercel/next.js/issues/7479 | ||
export const useRouter = () => { | ||
return { | ||
basePath: ".", | ||
}; | ||
}; |
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 @@ | ||
module.exports = { extends: ["@commitlint/config-conventional"] }; |
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,5 @@ | ||
module.exports = { | ||
"*.{js,jsx,ts,tsx}": ["eslint --fix", "eslint"], | ||
"**/*.ts?(x)": () => "npm run check-types", | ||
"*.{json,yaml}": ["prettier --write"], | ||
}; |
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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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 @@ | ||
/** @type {import('next-sitemap').IConfig} */ | ||
module.exports = { | ||
siteUrl: "https://example.com", // FIXME: Change to the production URL | ||
generateRobotsTxt: true, | ||
output: "export", | ||
}; |
Oops, something went wrong.