Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ permissions:
contents: write

jobs:
format:
name: format
lint:
name: lint
runs-on: ubuntu-latest

steps:
Expand All @@ -23,20 +23,15 @@ jobs:
with:
node-version: latest

- name: Format
run: |
npx prettier --write .
- name: Install linting tools
run: npm install --no-save eslint @eslint/js typescript typescript-eslint

- name: Commit formatting changes
- name: Lint
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add .
git commit -m "chore: apply formatting" || exit 0
git push
lint:
name: lint
npx eslint --fix .
format:
name: format
needs: lint
runs-on: ubuntu-latest

steps:
Expand All @@ -50,15 +45,15 @@ jobs:
with:
node-version: latest

- name: lint
- name: Format
run: |
npx eslint --fix .
npx prettier --write .

- name: Commit linting changes
- name: Commit formatting changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add .
git commit -m "chore: apply linting" || exit 0
git commit -m "chore: apply formatting" || exit 0
git push
3 changes: 1 addition & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import js from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import eslintPrettier from 'eslint-config-prettier';

export default defineConfig({
files: ['src/**/*.{js,ts}'],
extends: [js.configs.recommended, tseslint.configs.recommended, eslintPrettier]
extends: [js.configs.recommended, tseslint.configs.recommended]
});
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@eslint/js": "^10.0.1",
"@types/node": "^26.1.2",
"eslint": "^10.8.1",
"eslint-config-prettier": "^10.1.8",
"prettier": "^3.9.6",
"prisma": "^7.9.1",
"tsup": "^8.5.1",
Expand Down