-
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.
Merge pull request #3 from Callenowy/init-setup
feat: initial setup
- Loading branch information
Showing
34 changed files
with
16,096 additions
and
3 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,5 @@ | ||
{ | ||
"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,10 @@ | ||
.next/* | ||
.github/* | ||
.husky/* | ||
.vscode/* | ||
dist/* | ||
public/* | ||
out/* | ||
node_modules/* | ||
.eslintrc.cjs | ||
postcss.* |
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,38 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
|
||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'next/core-web-vitals', | ||
], | ||
|
||
plugins: ['prettier'], | ||
|
||
parserOptions: { | ||
project: true, | ||
}, | ||
|
||
rules: { | ||
'prettier/prettier': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}, | ||
], | ||
'@typescript-eslint/consistent-type-exports': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: [ | ||
'**/__test__/**/*.[jt]s?(x)', | ||
'**/?(*.)+test.[jt]s?(x)', | ||
'!**/tests/playwright/**/*.ts', | ||
], | ||
plugins: ['testing-library'], | ||
extends: ['plugin:testing-library/react', 'plugin:jest-dom/recommended'], | ||
}, | ||
], | ||
}; |
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,45 @@ | ||
name: Commitlint | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
commitlint: | ||
name: Commitlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Print versions | ||
run: | | ||
git --version | ||
node --version | ||
npm --version | ||
npx commitlint --version | ||
- name: Setup commitlint | ||
run: | | ||
npm install conventional-changelog-conventionalcommits | ||
npm install commitlint@latest | ||
- name: Validate current commit (last commit) with commitlint | ||
if: github.event_name == 'push' | ||
run: npx commitlint --from HEAD~1 --to HEAD --verbose | ||
|
||
- name: Validate PR commits with commitlint | ||
if: github.event_name == 'pull_request' | ||
run: | ||
npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ | ||
github.event.pull_request.commits }} --to ${{ | ||
github.event.pull_request.head.sha }} --verbose |
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,37 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main-branch | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: | ||
Verify the integrity of provenance attestations and registry | ||
signatures for installed dependencies | ||
run: npm audit signatures | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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 @@ | ||
npx --no -- commitlint --edit \ |
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 @@ | ||
npx lint-staged |
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,10 @@ | ||
import path from 'node:path'; | ||
|
||
const buildEslintCommand = filenames => | ||
`next lint --fix --file ${filenames | ||
.map(f => path.relative(process.cwd(), f)) | ||
.join(' --file ')}`; | ||
|
||
export default { | ||
'*.{js,jsx,ts,tsx}': [buildEslintCommand], | ||
}; |
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 @@ | ||
v21.6.0 |
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,7 @@ | ||
dist | ||
public | ||
node_modules | ||
.github | ||
.husky | ||
.vscode | ||
.next |
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,20 @@ | ||
/** @type {import('prettier').Config} */ | ||
|
||
const config = { | ||
arrowParens: 'avoid', | ||
bracketSpacing: true, | ||
endOfLine: 'lf', | ||
bracketSameLine: false, | ||
jsxSingleQuote: false, | ||
printWidth: 80, | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
useTabs: false, | ||
|
||
plugins: ['prettier-plugin-tailwindcss'], | ||
}; | ||
|
||
export default 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,12 @@ | ||
{ | ||
branches: ["main-branch"], | ||
"plugins": | ||
[ | ||
["@semantic-release/npm", { "npmPublish": false }], | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/git", | ||
"@semantic-release/changelog", | ||
], | ||
} |
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,14 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"github.vscode-github-actions", | ||
"esbenp.prettier-vscode", | ||
"snyk-security.snyk-vulnerability-scanner", | ||
"bradlc.vscode-tailwindcss", | ||
"hbenl.vscode-test-explorer", | ||
"ms-vscode.test-adapter-converter", | ||
"ms-playwright.playwright", | ||
"zixuanchen.vitest-explorer", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} |
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,9 @@ | ||
{ | ||
"editor.wordWrap": "on", | ||
"tailwindCSS.experimental.classRegex": [ | ||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], | ||
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] | ||
], | ||
"vitest.commandLine": "npx vitest", | ||
"vitest.enable": true, | ||
} |
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 +1,44 @@ | ||
# atmosphere | ||
<!-- Improved compatibility of back-to-top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --> | ||
|
||
<a name="readme-top"></a> | ||
|
||
# Next.js + Tailwind - template | ||
|
||
## Table of Contents | ||
|
||
- [Overview](#overview) | ||
- [Stack](#stack) | ||
- [Version Control and Maintenance](#version-control) | ||
- [License](#license) | ||
|
||
## <a name="overview">Overview</a> | ||
|
||
This clean Next.js template provides a well-organized structure for setting up a project quickly, including essential configurations and commonly used libraries. | ||
|
||
> WIP | ||
## <a name="stack">Stack</a> | ||
|
||
- Next.js | ||
- TypeScript | ||
- Tailwind | ||
- CVA - Class Variance Authority | ||
- Vitest | ||
- Testing Library | ||
- ESLint | ||
- Prettier | ||
- Commitlint | ||
- Conventional Commits | ||
- Lint Staged | ||
- Husky | ||
- Semantic Release | ||
- TS Reset | ||
- Renovate | ||
|
||
## <a name="version-control">Version Control and Maintenance</a> | ||
|
||
This project uses `semantic-release` for version management, ensuring automated versioning and changelog generation. Before committing, we provide code quality by using `lint-staged` and following the `Conventional Commits` standard for commit messages. Renovate helps in keeping dependencies up-to-date. | ||
|
||
## <a name="license">License</a> | ||
|
||
The Stack App is software licensed under the [MIT license](LICENSE). |
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,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
|
||
const nextConfig = { | ||
reactStrictMode: true, | ||
poweredByHeader: false, | ||
output: 'standalone', | ||
}; | ||
|
||
export default nextConfig; |
Oops, something went wrong.