xiaohongshu
xiaohongshu
fix-lint
Helps fix oxlint errors and warnings in the OneKey codebase. Use when running yarn lint and encountering warnings, cleaning up code before committing, or fixing spellcheck, unused variable, or other linting warnings.
Full skill instructions
This skill helps fix oxlint warnings in the OneKey app-monorepo codebase.
IMPORTANT: This project uses oxlint (not ESLint). The active linting configuration is in .oxlintrc.json.
Use this skill when:
yarn lint and encountering warningsyarn lint:only 2>&1 | tail -100
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 |
@cspell/spellchecker)Evaluate the word: Is it a legitimate technical term or a typo?
For legitimate technical terms, add to skip list:
# 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:
# Known typo - exsited -> existed (ETranslations.some_key)
exsited
Common legitimate terms to add:
chunkhash, minimizer, rspacklovelace, Kusama, workchain, feebumpVirtualized, overscan, overscrollingnacl, Bech32, secp256k1@typescript-eslint/no-unused-vars)Unused imports - Remove the import:
// Before
import { Used, Unused } from 'package';
// After
import { Used } from 'package';
Unused function parameters - Prefix with underscore:
// Before
function foo(used: string, unused: number) { return used; }
// After
function foo(used: string, _unused: number) { return used; }
Unused destructured variables - Prefix with underscore:
// Before
const { used, unused } = obj;
// After
const { used, unused: _unused } = obj;
Unused assigned variables - Prefix with underscore:
// Before
const unused = getValue();
// After
const _unused = getValue();
@typescript-eslint/no-non-null-assertion)Add type assertions or guards:
// Before
const value = obj.prop!.name;
// After
const value = (obj.prop as { name: string } | undefined)?.name;
react/no-unstable-nested-components)Extract the component outside the parent:
// Before
function Parent() {
const NestedComponent = () => <div />;
return <NestedComponent />;
}
// After
const ExtractedComponent = () => <div />;
function Parent() {
return <ExtractedComponent />;
}
yarn lint:only 2>&1 | tail -50
Translation enum keys (e.g., ETranslations.perp_invaild_tp_sl) cannot be easily renamed as they're managed externally. Add to skip list with a comment:
# Known typo in translation key - invaild -> invalid
invaild
Methods like openInMobileApp that throw NotImplemented() often have unused parameters:
public async openInMobileApp(
_request: IJsBridgeMessagePayload,
_params: ISignMessagePayload,
): Promise<void> {
throw new NotImplemented();
}
When destructuring from hooks but not using all values:
const { used, unused: _unused } = usePromiseResult(...);
Run lint with increased memory for large codebases:
yarn lint:only
Check if word is in skip list before adding:
grep -i "wordToCheck" development/spellCheckerSkipWords.txt
For bulk fixes, use Task agents to parallelize work across multiple files
Verify no regressions after fixes:
yarn tsc:only
development/spellCheckerSkipWords.txt - Add technical terms and known typos (one word per line, use # for comments).ts and .tsx files - Fix unused variables and importsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience