improve: remove prettier workflow, instead error on formatting problems (#457)

This commit is contained in:
Sainan 2024-07-03 12:47:26 +02:00 committed by GitHub
parent 12f3e1e9d1
commit e52a625714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 28 deletions

View File

@ -4,14 +4,13 @@
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "prettier"],
"env": {
"browser": true,
"es6": true,
"node": true
},
"rules": {
"@typescript-eslint/semi": "warn",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
@ -25,7 +24,9 @@
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-loss-of-precision": "warn",
"no-case-declarations": "warn",
"no-mixed-spaces-and-tabs": "warn"
"prettier/prettier": "error",
"@typescript-eslint/semi": "error",
"no-mixed-spaces-and-tabs": "error"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {

View File

@ -5,8 +5,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4.1.2

View File

@ -1,23 +0,0 @@
name: Prettier
on: [push]
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
with:
node-version: "20.x"
- run: npm ci
- run: npm run prettier
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5.0.0
with:
commit_message: Apply prettier changes
branch: ${{ github.head_ref }}