Refactor linting and formatting commands in package.json and GitHub workflows to streamline processes and add quiet mode for linting

This commit is contained in:
Matiss Janis Aboltins
2026-03-01 21:13:28 +00:00
parent 6074b05665
commit ef90f548c1
4 changed files with 5 additions and 11 deletions

View File

@@ -20,8 +20,6 @@ jobs:
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
download-translations: 'false' download-translations: 'false'
- name: Lint code
run: yarn lint:fix
- name: Format code - name: Format code
run: yarn format:fix run: yarn lint:fix
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

View File

@@ -22,8 +22,6 @@ jobs:
download-translations: 'false' download-translations: 'false'
- name: Lint - name: Lint
run: yarn lint run: yarn lint
- name: Format
run: yarn format
typecheck: typecheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@@ -54,10 +54,8 @@
"vrt:docker": "./bin/run-vrt", "vrt:docker": "./bin/run-vrt",
"rebuild-electron": "./node_modules/.bin/electron-rebuild -m ./packages/loot-core", "rebuild-electron": "./node_modules/.bin/electron-rebuild -m ./packages/loot-core",
"rebuild-node": "yarn workspace loot-core rebuild", "rebuild-node": "yarn workspace loot-core rebuild",
"lint": "oxlint --type-aware --quiet", "lint": "oxfmt --check . && oxlint --type-aware --quiet",
"lint:fix": "yarn lint --fix", "lint:fix": "oxfmt . && oxlint --fix --type-aware --quiet",
"format": "oxfmt --check .",
"format:fix": "oxfmt .",
"install:server": "yarn workspaces focus @actual-app/sync-server --production", "install:server": "yarn workspaces focus @actual-app/sync-server --production",
"typecheck": "tsc -p tsconfig.root.json --noEmit && lage typecheck", "typecheck": "tsc -p tsconfig.root.json --noEmit && lage typecheck",
"jq": "./node_modules/node-jq/bin/jq", "jq": "./node_modules/node-jq/bin/jq",
@@ -97,7 +95,7 @@
"oxfmt --no-error-on-unmatched-pattern" "oxfmt --no-error-on-unmatched-pattern"
], ],
"*.{js,mjs,jsx,ts,tsx}": [ "*.{js,mjs,jsx,ts,tsx}": [
"yarn lint:fix" "oxlint --fix --type-aware --quiet"
] ]
}, },
"browserslist": [ "browserslist": [

View File

@@ -3,4 +3,4 @@ category: Maintenance
authors: [MatissJanis] authors: [MatissJanis]
--- ---
Separate lint & format into two separate commands Lint: add "--quiet" flag to stop reporting warnings