1313### Task 1: Install ESLint and plugins
1414
1515** Files:**
16+
1617- Modify: ` package.json `
1718
1819** Step 1: Install all ESLint-related packages**
1920
2021Run:
22+
2123``` bash
2224npm install -D eslint @eslint/js typescript-eslint eslint-plugin-solid @typescript-eslint/parser
2325```
26+
2427Expected: packages added to devDependencies in package.json
2528
2629** Step 2: Commit**
@@ -35,14 +38,17 @@ git commit -m "chore: install eslint and typescript/solid plugins"
3538### Task 2: Install Prettier and ESLint integration
3639
3740** Files:**
41+
3842- Modify: ` package.json `
3943
4044** Step 1: Install Prettier and eslint-config-prettier**
4145
4246Run:
47+
4348``` bash
4449npm install -D prettier eslint-config-prettier
4550```
51+
4652Expected: packages added to devDependencies
4753
4854** Step 2: Commit**
@@ -57,23 +63,24 @@ git commit -m "chore: install prettier and eslint-config-prettier"
5763### Task 3: Create ESLint flat config
5864
5965** Files:**
66+
6067- Create: ` eslint.config.js `
6168
6269** Step 1: Create the ESLint config file**
6370
6471Create ` eslint.config.js ` at project root:
6572
6673``` javascript
67- import js from " @eslint/js" ;
68- import tseslint from " typescript-eslint" ;
69- import solid from " eslint-plugin-solid/configs/typescript" ;
70- import * as tsParser from " @typescript-eslint/parser" ;
71- import eslintConfigPrettier from " eslint-config-prettier/flat" ;
74+ import js from ' @eslint/js' ;
75+ import tseslint from ' typescript-eslint' ;
76+ import solid from ' eslint-plugin-solid/configs/typescript' ;
77+ import * as tsParser from ' @typescript-eslint/parser' ;
78+ import eslintConfigPrettier from ' eslint-config-prettier/flat' ;
7279
7380export default [
7481 // Ignore build output
7582 {
76- ignores: [" dist/**" , " dist-electron/**" , " release/**" , " node_modules/**" ],
83+ ignores: [' dist/**' , ' dist-electron/**' , ' release/**' , ' node_modules/**' ],
7784 },
7885
7986 // Base JS recommended rules
@@ -84,58 +91,58 @@ export default [
8491
8592 // SolidJS-specific rules for TSX files
8693 {
87- files: [" src/**/*.{ts,tsx}" ],
94+ files: [' src/**/*.{ts,tsx}' ],
8895 ... solid,
8996 languageOptions: {
9097 parser: tsParser,
9198 parserOptions: {
92- project: " ./tsconfig.json" ,
99+ project: ' ./tsconfig.json' ,
93100 },
94101 },
95102 },
96103
97104 // Electron backend files use Node tsconfig
98105 {
99- files: [" electron/**/*.ts" ],
106+ files: [' electron/**/*.ts' ],
100107 languageOptions: {
101108 parser: tsParser,
102109 parserOptions: {
103- project: " ./electron/tsconfig.json" ,
110+ project: ' ./electron/tsconfig.json' ,
104111 },
105112 },
106113 },
107114
108115 // Custom strict rules
109116 {
110- files: [" **/*.{ts,tsx}" ],
117+ files: [' **/*.{ts,tsx}' ],
111118 rules: {
112119 // Prevent `any` — use `unknown` instead
113- " @typescript-eslint/no-explicit-any" : " error" ,
120+ ' @typescript-eslint/no-explicit-any' : ' error' ,
114121
115122 // Require explicit return types on exported functions
116- " @typescript-eslint/explicit-module-boundary-types" : " off" ,
123+ ' @typescript-eslint/explicit-module-boundary-types' : ' off' ,
117124
118125 // No unused variables (underscore prefix allowed for intentional skips)
119- " @typescript-eslint/no-unused-vars" : [
120- " error" ,
126+ ' @typescript-eslint/no-unused-vars' : [
127+ ' error' ,
121128 {
122- argsIgnorePattern: " ^_ " ,
123- varsIgnorePattern: " ^_ " ,
124- caughtErrorsIgnorePattern: " ^_ " ,
129+ argsIgnorePattern: ' ^_ ' ,
130+ varsIgnorePattern: ' ^_ ' ,
131+ caughtErrorsIgnorePattern: ' ^_ ' ,
125132 },
126133 ],
127134
128135 // Consistency
129- " prefer-const" : " error" ,
130- " no-var" : " error" ,
131- eqeqeq: [" error" , " always" ],
132- curly: [" error" , " multi-line" ],
136+ ' prefer-const' : ' error' ,
137+ ' no-var' : ' error' ,
138+ eqeqeq: [' error' , ' always' ],
139+ curly: [' error' , ' multi-line' ],
133140
134141 // No console.log (allow warn/error for legitimate error reporting)
135- " no-console" : [" warn" , { allow: [" warn" , " error" ] }],
142+ ' no-console' : [' warn' , { allow: [' warn' , ' error' ] }],
136143
137144 // Prevent non-null assertions (prefer explicit checks)
138- " @typescript-eslint/no-non-null-assertion" : " warn" ,
145+ ' @typescript-eslint/no-non-null-assertion' : ' warn' ,
139146 },
140147 },
141148
@@ -147,9 +154,11 @@ export default [
147154** Step 2: Verify ESLint runs without crashing**
148155
149156Run:
157+
150158``` bash
151159npx eslint --max-warnings 0 . 2>&1 | head -50
152160```
161+
153162Expected: Either clean output or lint errors (not config/parse errors). If there are errors, that's expected — we'll fix them in a later task.
154163
155164** Step 3: Commit**
@@ -164,6 +173,7 @@ git commit -m "chore: add eslint flat config with strict typescript and solid ru
164173### Task 4: Create Prettier config
165174
166175** Files:**
176+
167177- Create: ` .prettierrc `
168178- Create: ` .prettierignore `
169179
@@ -196,9 +206,11 @@ package-lock.json
196206** Step 3: Verify Prettier runs**
197207
198208Run:
209+
199210``` bash
200211npx prettier --check " src/**/*.{ts,tsx}" 2>&1 | tail -5
201212```
213+
202214Expected: list of files that would be reformatted (expected — we haven't formatted yet)
203215
204216** Step 4: Commit**
@@ -213,11 +225,13 @@ git commit -m "chore: add prettier config"
213225### Task 5: Add npm scripts for lint and format
214226
215227** Files:**
228+
216229- Modify: ` package.json ` (scripts section)
217230
218231** Step 1: Add lint and format scripts**
219232
220233Add these scripts to ` package.json ` :
234+
221235``` json
222236{
223237 "scripts" : {
@@ -244,22 +258,27 @@ git commit -m "chore: add lint, format, and check npm scripts"
244258### Task 6: Format the entire codebase with Prettier
245259
246260** Files:**
261+
247262- Modify: all ` .ts ` , ` .tsx ` , ` .css ` , ` .js ` , ` .json ` , ` .md ` files
248263
249264** Step 1: Run Prettier on the entire codebase**
250265
251266Run:
267+
252268``` bash
253269npm run format
254270```
271+
255272Expected: Prettier reformats files. This will be a large diff — that's expected and intentional.
256273
257274** Step 2: Verify no files are left unformatted**
258275
259276Run:
277+
260278``` bash
261279npm run format:check
262280```
281+
263282Expected: all files pass
264283
265284** Step 3: Commit the formatting separately**
@@ -276,25 +295,29 @@ This is a standalone commit so `git blame` can use `--ignore-rev` to skip it.
276295### Task 7: Fix all ESLint errors
277296
278297** Files:**
298+
279299- Modify: various ` .ts ` and ` .tsx ` files (depends on what ESLint reports)
280300
281301** Step 1: Run ESLint auto-fix first**
282302
283303Run:
304+
284305``` bash
285306npm run lint:fix
286307```
287308
288309** Step 2: Check remaining errors**
289310
290311Run:
312+
291313``` bash
292314npm run lint 2>&1
293315```
294316
295317** Step 3: Fix remaining errors manually**
296318
297319For each error:
320+
298321- ` no-console ` warnings on ` console.log ` — remove or change to ` console.warn ` /` console.error `
299322- ` @typescript-eslint/no-explicit-any ` — replace with ` unknown ` or proper type
300323- ` @typescript-eslint/no-non-null-assertion ` — add explicit null checks
@@ -306,17 +329,21 @@ For each error:
306329** Step 4: Verify clean lint**
307330
308331Run:
332+
309333``` bash
310334npm run lint
311335```
336+
312337Expected: 0 errors, 0 warnings
313338
314339** Step 5: Verify typecheck still passes**
315340
316341Run:
342+
317343``` bash
318344npm run typecheck
319345```
346+
320347Expected: no errors
321348
322349** Step 6: Commit**
@@ -331,6 +358,7 @@ git commit -m "fix: resolve all eslint errors across codebase"
331358### Task 8: Add CI quality gate workflow
332359
333360** Files:**
361+
334362- Create: ` .github/workflows/ci.yml `
335363
336364** Step 1: Create CI workflow**
@@ -354,7 +382,7 @@ jobs:
354382
355383 - uses : actions/setup-node@v4
356384 with :
357- node-version : " lts/*"
385+ node-version : ' lts/*'
358386 cache : npm
359387
360388 - run : npm ci
@@ -383,17 +411,21 @@ git commit -m "ci: add quality gate workflow with typecheck, lint, and format ch
383411**Step 1: Run the full quality check**
384412
385413Run:
414+
386415` ` ` bash
387416npm run check
388417```
418+
389419Expected: typecheck passes, lint passes, format check passes — all three green.
390420
391421** Step 2: Verify the app still builds**
392422
393423Run:
424+
394425``` bash
395426npm run build:frontend
396427```
428+
397429Expected: build succeeds without errors
398430
399431---
0 commit comments