Step 1: Run Lint and Analyze Warnings
```bash
yarn lint:only 2>&1 | tail -100
```
Step 2: Categorize Warnings
Warnings typically fall into these categories:
| Category | Rule | Fix Strategy |
|----------|------|--------------|
| Spellcheck | @cspell/spellchecker | Add to skip list or fix typo |
| Unused vars | @typescript-eslint/no-unused-vars | Remove import or prefix with _ |
| Non-null assertion | @typescript-eslint/no-non-null-assertion | Add type guard or cast |
| Nested components | react/no-unstable-nested-components | Extract component |
| Import order | import/order | Fix import ordering |
Step 3: Fix Each Category
#### Spellcheck Warnings (@cspell/spellchecker)
- Evaluate the word: Is it a legitimate technical term or a typo?
- For legitimate technical terms, add to skip list:
```text
# File: development/spellCheckerSkipWords.txt
# Add the word on a new line at the end of the file
newTechnicalTerm
```
- For known typos that can't be fixed (e.g., in translation keys), add with a comment above:
```text
# Known typo - exsited -> existed (ETranslations.some_key)
exsited
```
- Common legitimate terms to add:
- Build tools: chunkhash, minimizer, rspack
- Blockchain: lovelace, Kusama, workchain, feebump
- UI: Virtualized, overscan, overscrolling
- Crypto: nacl, Bech32, secp256k1
#### Unused Variable Warnings (@typescript-eslint/no-unused-vars)
- Unused imports - Remove the import:
```typescript
// Before
import { Used, Unused } from 'package';
// After
import { Used } from 'package';
```
- Unused function parameters - Prefix with underscore:
```typescript
// Before
function foo(used: string, unused: number) { return used; }
// After
function foo(used: string, _unused: number) { return used; }
```
- Unused destructured variables - Prefix with underscore:
```typescript
// Before
const { used, unused } = obj;
// After
const { used, unused: _unused } = obj;
```
- Unused assigned variables - Prefix with underscore:
```typescript
// Before
const unused = getValue();
// After
const _unused = getValue();
```
#### Non-null Assertion Warnings (@typescript-eslint/no-non-null-assertion)
Add type assertions or guards:
```typescript
// Before
const value = obj.prop!.name;
// After
const value = (obj.prop as { name: string } | undefined)?.name;
```
#### Nested Component Warnings (react/no-unstable-nested-components)
Extract the component outside the parent:
```typescript
// Before
function Parent() {
const NestedComponent = () => ;
return ;
}
// After
const ExtractedComponent = () => ;
function Parent() {
return ;
}
```
Step 4: Verify Fixes
```bash
yarn lint:only 2>&1 | tail -50
```