Skip to content

Commit 11d2de5

Browse files
authored
chore(web): reduce lint duration by 90% (#1766)
Replace the eslint prettier plugin (which profiling revealed to be the bottleneck) with separate `prettier` invocations. This yielded a 73 second reduction (89%) in the environment described below. Before: ``` pnpm --filter web lint:fix 81.79s user 1.85s system 110% cpu 1:15.81 total ``` After: ``` pnpm --filter web lint:fix 8.83s user 0.93s system 170% cpu 5.737 total ``` System specs (Nov 5 2025): ``` OS: macOS Sequoia 15.6.1 (24G90) arm64 Host: MacBook Air (15-inch, M2, 2023) Kernel: Darwin 24.6.0 Uptime: 44 days, 5 hours, 22 mins Packages: 52 (nix-default), 195 (brew), 4 (brew-cask) Shell: zsh 5.9 CPU: Apple M2 (8) @ 3.50 GHz GPU: Apple M2 (10) @ 1.40 GHz [Integrated] Memory: 19.51 GiB / 24.00 GiB (81%) Swap: 4.83 GiB / 6.00 GiB (80%) ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Separated code formatting and linting tools into independent workflows for improved developer efficiency * Updated development tool configuration to streamline the linting and formatting process <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 031c1ab commit 11d2de5

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

pnpm-lock.yaml

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
auto-imports.d.ts
2+
components.d.ts
3+
composables/gql/
4+
src/composables/gql/

web/eslint.config.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import eslint from '@eslint/js';
22
import importPlugin from 'eslint-plugin-import';
33
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
4-
import prettier from 'eslint-plugin-prettier';
54
import vuePlugin from 'eslint-plugin-vue';
65
import globals from 'globals';
76
import tseslint from 'typescript-eslint';
@@ -23,7 +22,6 @@ const commonRules = {
2322
'error',
2423
{ allowSameFolder: false, rootDir: 'src', prefix: '@' },
2524
],
26-
'prettier/prettier': 'warn',
2725
'no-restricted-globals': [
2826
'error',
2927
{
@@ -115,7 +113,6 @@ export default [
115113
},
116114
plugins: {
117115
'no-relative-import-paths': noRelativeImportPaths,
118-
prettier: prettier,
119116
import: importPlugin,
120117
},
121118
rules: {
@@ -141,7 +138,6 @@ export default [
141138
},
142139
plugins: {
143140
'no-relative-import-paths': noRelativeImportPaths,
144-
prettier: prettier,
145141
import: importPlugin,
146142
vue: vuePlugin,
147143
},
@@ -174,7 +170,6 @@ export default [
174170
},
175171
plugins: {
176172
'no-relative-import-paths': noRelativeImportPaths,
177-
prettier: prettier,
178173
},
179174
rules: {
180175
...commonRules,

web/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
"clean-unraid": "./scripts/clean-unraid.sh",
2424
"copy-to-webgui-repo": "./scripts/copy-to-webgui-repo.sh",
2525
"// Code Quality": "",
26-
"lint": "eslint .",
27-
"lint:fix": "eslint . --fix",
26+
"lint": "pnpm lint:eslint && pnpm lint:prettier",
27+
"lint:eslint": "eslint --cache",
28+
"lint:prettier": "prettier --check \"**/*.{js,ts,tsx,vue}\"",
29+
"lint:fix": "pnpm exec eslint --cache --fix . && pnpm prettier:write",
30+
"prettier:write": "prettier --write \"**/*.{js,ts,tsx,vue}\"",
2831
"type-check": "vue-tsc --noEmit",
2932
"clean": "rm -rf dist dist-wc",
3033
"// GraphQL Codegen": "",
@@ -68,7 +71,6 @@
6871
"eslint-import-resolver-typescript": "4.4.4",
6972
"eslint-plugin-import": "2.32.0",
7073
"eslint-plugin-no-relative-import-paths": "1.6.1",
71-
"eslint-plugin-prettier": "5.5.4",
7274
"eslint-plugin-storybook": "9.1.3",
7375
"eslint-plugin-vue": "10.4.0",
7476
"glob": "11.0.3",

0 commit comments

Comments
 (0)