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 -->
This commit is contained in:
Pujit Mehrotra
2025-11-06 09:22:45 -05:00
committed by GitHub
parent 031c1ab5dc
commit 11d2de5d08
4 changed files with 13 additions and 15 deletions

11
pnpm-lock.yaml generated
View File

@@ -1260,9 +1260,6 @@ importers:
eslint-plugin-no-relative-import-paths:
specifier: 1.6.1
version: 1.6.1
eslint-plugin-prettier:
specifier: 5.5.4
version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1))(prettier@3.6.2)
eslint-plugin-storybook:
specifier: 9.1.3
version: 9.1.3(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.3(@testing-library/dom@10.4.0)(prettier@3.6.2)(vite@7.1.3(@types/node@22.18.0)(jiti@2.5.1)(lightningcss@1.30.1)(stylus@0.57.0)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)))(typescript@5.9.2)
@@ -12388,8 +12385,8 @@ packages:
vue-component-type-helpers@3.0.6:
resolution: {integrity: sha512-6CRM8X7EJqWCJOiKPvSLQG+hJPb/Oy2gyJx3pLjUEhY7PuaCthQu3e0zAGI1lqUBobrrk9IT0K8sG2GsCluxoQ==}
vue-component-type-helpers@3.1.0:
resolution: {integrity: sha512-cC1pYNRZkSS1iCvdlaMbbg2sjDwxX098FucEjtz9Yig73zYjWzQsnMe5M9H8dRNv55hAIDGUI29hF2BEUA4FMQ==}
vue-component-type-helpers@3.1.3:
resolution: {integrity: sha512-V1dOD8XYfstOKCnXbWyEJIrhTBMwSyNjv271L1Jlx9ExpNlCSuqOs3OdWrGJ0V544zXufKbcYabi/o+gK8lyfQ==}
vue-demi@0.14.10:
resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==}
@@ -16454,7 +16451,7 @@ snapshots:
storybook: 9.1.3(@testing-library/dom@10.4.0)(prettier@3.6.2)(vite@7.1.3(@types/node@22.18.0)(jiti@2.5.1)(lightningcss@1.30.1)(stylus@0.57.0)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))
type-fest: 2.19.0
vue: 3.5.20(typescript@5.9.2)
vue-component-type-helpers: 3.1.0
vue-component-type-helpers: 3.1.3
'@swc/core-darwin-arm64@1.13.5':
optional: true
@@ -25270,7 +25267,7 @@ snapshots:
vue-component-type-helpers@3.0.6: {}
vue-component-type-helpers@3.1.0: {}
vue-component-type-helpers@3.1.3: {}
vue-demi@0.14.10(vue@3.5.20(typescript@5.9.2)):
dependencies:

4
web/.prettierignore Normal file
View File

@@ -0,0 +1,4 @@
auto-imports.d.ts
components.d.ts
composables/gql/
src/composables/gql/

View File

@@ -1,7 +1,6 @@
import eslint from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
import prettier from 'eslint-plugin-prettier';
import vuePlugin from 'eslint-plugin-vue';
import globals from 'globals';
import tseslint from 'typescript-eslint';
@@ -23,7 +22,6 @@ const commonRules = {
'error',
{ allowSameFolder: false, rootDir: 'src', prefix: '@' },
],
'prettier/prettier': 'warn',
'no-restricted-globals': [
'error',
{
@@ -115,7 +113,6 @@ export default [
},
plugins: {
'no-relative-import-paths': noRelativeImportPaths,
prettier: prettier,
import: importPlugin,
},
rules: {
@@ -141,7 +138,6 @@ export default [
},
plugins: {
'no-relative-import-paths': noRelativeImportPaths,
prettier: prettier,
import: importPlugin,
vue: vuePlugin,
},
@@ -174,7 +170,6 @@ export default [
},
plugins: {
'no-relative-import-paths': noRelativeImportPaths,
prettier: prettier,
},
rules: {
...commonRules,

View File

@@ -23,8 +23,11 @@
"clean-unraid": "./scripts/clean-unraid.sh",
"copy-to-webgui-repo": "./scripts/copy-to-webgui-repo.sh",
"// Code Quality": "",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "pnpm lint:eslint && pnpm lint:prettier",
"lint:eslint": "eslint --cache",
"lint:prettier": "prettier --check \"**/*.{js,ts,tsx,vue}\"",
"lint:fix": "pnpm exec eslint --cache --fix . && pnpm prettier:write",
"prettier:write": "prettier --write \"**/*.{js,ts,tsx,vue}\"",
"type-check": "vue-tsc --noEmit",
"clean": "rm -rf dist dist-wc",
"// GraphQL Codegen": "",
@@ -68,7 +71,6 @@
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-no-relative-import-paths": "1.6.1",
"eslint-plugin-prettier": "5.5.4",
"eslint-plugin-storybook": "9.1.3",
"eslint-plugin-vue": "10.4.0",
"glob": "11.0.3",