Skip to content

Commit

Permalink
init project
Browse files Browse the repository at this point in the history
  • Loading branch information
pryter committed Dec 19, 2022
0 parents commit 06aee81
Show file tree
Hide file tree
Showing 30 changed files with 9,972 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
85 changes: 85 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
// Configuration for JavaScript files
"extends": [
"airbnb-base",
"next/core-web-vitals", // Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration'
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": [
"warn",
{
"endOfLine": "auto",
"singleQuote": false,
"trailingComma": "none"
}
]
},
"overrides": [
// Configuration for TypeScript files
{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": [
"@typescript-eslint",
"unused-imports",
"tailwindcss",
"simple-import-sort"
],
"extends": [
"plugin:tailwindcss/recommended",
"airbnb-typescript",
"next/core-web-vitals",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"prettier/prettier": [
"warn",
{
"singleQuote": false,
"endOfLine": "auto",
"trailingComma": "none"
}
],
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
"react/require-default-props": "off", // Allow non-defined react props as undefined
"react/jsx-props-no-spreading": "off", // _app.tsx uses spread operator and also, react-hook-form
"react-hooks/exhaustive-deps": "off", // Incorrectly report needed dependency with Next.js router
"@next/next/no-img-element": "off", // We currently not using next/image because it isn't supported with SSG mode
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier
"@typescript-eslint/consistent-type-imports": "error", // Ensure `import type` is used when it's necessary
"import/prefer-default-export": "off", // Named export is easier to refactor automatically
"simple-import-sort/imports": "warn", // Import configuration for `eslint-plugin-simple-import-sort`
"simple-import-sort/exports": "warn", // Export configuration for `eslint-plugin-simple-import-sort`
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"unused-imports/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
]
}
},
// Configuration for testing
{
"files": ["**/*.test.ts", "**/*.test.tsx"],
"plugins": ["jest", "jest-formatting", "testing-library", "jest-dom"],
"extends": [
"plugin:jest/recommended",
"plugin:jest-formatting/recommended",
"plugin:testing-library/react",
"plugin:jest-dom/recommended"
]
},
// Configuration for e2e testing (Cypress)
{
"files": ["**/*.cy.ts"],
"plugins": ["cypress"],
"extends": ["plugin:cypress/recommended"],
"parserOptions": {
"project": "./cypress/tsconfig.json"
}
}
]
}
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# 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*

# dotenv local files
.env*.local

# local folder
local

# vercel
.vercel
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
5 changes: 5 additions & 0 deletions .husky/pre-commit
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
npx lint-staged --concurrent false
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/tumso-website.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.12.1
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"tabWidth": 2,
"singleQuote": false,
"trailingComma": "none"
}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] }
5 changes: 5 additions & 0 deletions lint-staged.config.js
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": ["prettier --write"]
}
4 changes: 4 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// <reference types="next" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
5 changes: 5 additions & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://example.com",
generateRobotsTxt: true
}
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-disable import/no-extraneous-dependencies */
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true"
})

module.exports = withBundleAnalyzer({
eslint: {
dirs: ["."]
},
poweredByHeader: false,
trailingSlash: true,
basePath: "",
// The starter code load resources from `public` folder with `router.basePath` in React components.
// So, the source code is "basePath-ready".
// You can remove `basePath` if you don't need it.
reactStrictMode: true
})
111 changes: 111 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"name": "tumso-website",
"version": "0.0.1",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"build-stats": "cross-env ANALYZE=true npm run build",
"export": "next export",
"build-prod": "run-s clean build export",
"clean": "rimraf .next out",
"lint": "next lint",
"check-types": "tsc --noEmit --pretty && tsc --project cypress --noEmit --pretty",
"test": "jest",
"commit": "cz",
"cypress": "cypress open",
"cypress:headless": "cypress run",
"e2e": "start-server-and-test dev http://localhost:3000 cypress",
"e2e:headless": "start-server-and-test dev http://localhost:3000 cypress:headless",
"prepare": "husky install",
"postbuild": "next-sitemap"
},
"dependencies": {
"@heroicons/react": "^2.0.13",
"@iconify/react": "^4.0.0",
"@next/font": "^13.0.5",
"@tailwindcss/line-clamp": "^0.4.2",
"classnames": "^2.3.2",
"framer-motion": "^7.6.7",
"next": "^13.0.4",
"next-seo": "^5.14.1",
"next-sitemap": "^3.1.32",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@commitlint/cz-commitlint": "^17.2.0",
"@next/bundle-analyzer": "^13.0.4",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@testing-library/cypress": "^8.0.7",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/jest": "^29.2.3",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"autoprefixer": "^10.4.13",
"commitizen": "^4.2.5",
"cross-env": "^7.0.3",
"cssnano": "^5.1.14",
"cypress": "^10.11.0",
"eslint": "^8.28.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-next": "^13.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-tailwindcss": "^3.7.0",
"eslint-plugin-testing-library": "^5.9.1",
"eslint-plugin-unused-imports": "^2.0.0",
"husky": "^8.0.2",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"lint-staged": "^13.0.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.19",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"semantic-release": "^19.0.5",
"start-server-and-test": "^1.14.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.3"
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
"release": {
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/git",
"@semantic-release/github"
]
},
"author": "Ixartz (https://github.com/ixartz)"
}
10 changes: 10 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Please do not use the array form (like ['tailwindcss', 'postcss-preset-env'])
// it will create an unexpected error: Invalid PostCSS Plugin found: [0]

module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
}
}
Loading

1 comment on commit 06aee81

@vercel
Copy link

@vercel vercel bot commented on 06aee81 Dec 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tumso-website – ./

tumso-website.vercel.app
tumso-website-git-main-pryter.vercel.app
tumso-website-pryter.vercel.app

Please sign in to comment.