-
Notifications
You must be signed in to change notification settings - Fork 209
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 #26 from t3dotgg/theo/linting
- Loading branch information
Showing
14 changed files
with
345 additions
and
121 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,41 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
], | ||
rules: { | ||
"@typescript-eslint/array-type": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ | ||
prefer: "type-imports", | ||
fixStyle: "inline-type-imports", | ||
}, | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/require-await": "off", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
checksVoidReturn: { | ||
attributes: false, | ||
}, | ||
}, | ||
], | ||
"@next/next/no-img-element": "off", | ||
}, | ||
}; | ||
module.exports = config; |
This file was deleted.
Oops, something went wrong.
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,52 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9 | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint and Format Check | ||
run: | | ||
pnpm run lint & \ | ||
pnpm run format:check & \ | ||
wait | ||
- name: Type check | ||
run: pnpm run typecheck | ||
|
||
- name: Build | ||
run: pnpm run build |
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 @@ | ||
{ | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
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
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 |
---|---|---|
|
@@ -3,10 +3,16 @@ | |
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev --turbo", | ||
"build": "next build", | ||
"check": "next lint && tsc --noEmit", | ||
"dev": "next dev --turbo", | ||
"lint": "next lint", | ||
"lint:fix": "next lint --fix", | ||
"preview": "next build && next start", | ||
"start": "next start", | ||
"lint": "next lint" | ||
"typecheck": "tsc --noEmit", | ||
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache", | ||
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache" | ||
}, | ||
"dependencies": { | ||
"babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003", | ||
|
@@ -16,11 +22,16 @@ | |
"react-dom": "19.0.0-rc-cd22717c-20241013" | ||
}, | ||
"devDependencies": { | ||
"@types/eslint": "^8.56.10", | ||
"@types/node": "^20", | ||
"@types/react": "npm:[email protected]", | ||
"@types/react-dom": "npm:[email protected]", | ||
"@typescript-eslint/eslint-plugin": "^8.13.0", | ||
"@typescript-eslint/parser": "^8.13.0", | ||
"eslint": "^8", | ||
"eslint-config-next": "15.0.0-rc.1", | ||
"prettier": "^3.3.3", | ||
"prettier-plugin-tailwindcss": "^0.6.8", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5" | ||
|
Oops, something went wrong.