Claude Skill

eslint-fixes

Resolve specific ESLint errors and warnings that appear in this project. Use when fixing lint failures, ESLint reported issues, or autofix conflicts (e.g. no-void, canonical/export-specifier-newline vs prettier, no-shadow trailing underscores, sonarjs/deprecation, you-dont-need-l

LLM Mart · 0 points · 14 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download gaia-react-gaia-.claude_skills_eslint-fixes-6bb0226.zip · 1 KB
Part of gaia-react/gaia — 26 skills

Install

skills CLI npx skills add https://github.com/gaia-react/gaia/tree/main/.claude/skills/eslint-fixes
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install gaia-react-gaia@llmmart
Git git clone https://github.com/gaia-react/gaia.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole gaia-react/gaia collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

ESLint Fix Patterns

How to resolve specific ESLint errors in this project.

no-void

Don't use the void operator in event listener functions. Instead, make the function async and await the promise.

// BAD
const handleClickNavigate = () => {
  void navigate('/path');
};

// GOOD
const handleClickNavigate = async () => {
  await navigate('/path');
};

canonical/export-specifier-newline vs prettier conflict

Use inline export const declarations instead of a grouped export { ... } statement to avoid circular fix warnings between these two rules.

// BAD, causes circular fix between prettier and canonical
export {DAYS, DURATIONS, FITNESS_GOALS};

// GOOD, declare with export directly
export const DAYS = ['mon', 'tue'] as const;
export const DURATIONS = [15, 30, 45] as const;
export const FITNESS_GOALS = ['weight_loss'] as const;

no-shadow trailing underscores

ESLint's no-shadow autofixes by appending _. Once shadowing is resolved, remove the trailing _.

sonarjs/deprecation

Never suppress with eslint-disable. Always fix the underlying deprecation.

Common case: Zod v4 deprecated z.string().email() in favor of z.email().

// BAD, suppressing the warning
// eslint-disable-next-line sonarjs/deprecation
email: z.string().email(),

// GOOD, use the non-deprecated API
email: z.email(),

you-dont-need-lodash-underscore/*

Use native JavaScript instead of lodash/underscore equivalents.

// BAD
import _ from 'lodash';
const first = _.find(items, (item) => item.active);
const names = _.map(items, (item) => item.name);

// GOOD
const first = items.find((item) => item.active);
const names = items.map((item) => item.name);

testing-library/prefer-screen-queries

Use screen queries instead of destructuring from render().

// BAD
const {getByText, getByRole} = render(<MyComponent />);

// GOOD
render(<MyComponent />);
screen.getByText('...');
screen.getByRole('button');

testing-library/await-async-events

userEvent methods are async, always await them.

// BAD
userEvent.click(button);

// GOOD
await userEvent.click(button);

jest-dom/prefer-*

Use jest-dom matchers instead of raw DOM property checks.

// BAD
expect(input.value).toBe('hello');
expect(checkbox.checked).toBe(true);
expect(el.textContent).toBe('Hello');

// GOOD
expect(input).toHaveValue('hello');
expect(checkbox).toBeChecked();
expect(el).toHaveTextContent('Hello');
Files (gaia)
  • SKILL.md 2.9 KB
    ---
    name: eslint-fixes
    description: Resolve specific ESLint errors and warnings that appear in this project. Use when fixing lint failures, ESLint reported issues, or autofix conflicts (e.g. no-void, canonical/export-specifier-newline vs prettier, no-shadow trailing underscores, sonarjs/deprecation, you-dont-need-lodash-underscore, testing-library/prefer-screen-queries, testing-library/await-async-events, jest-dom/prefer-*).
    model: haiku
    ---
    
    # ESLint Fix Patterns
    
    How to resolve specific ESLint errors in this project.
    
    ## no-void
    
    Don't use the `void` operator in event listener functions. Instead, make the function `async` and `await` the promise.
    
    ```tsx
    // BAD
    const handleClickNavigate = () => {
      void navigate('/path');
    };
    
    // GOOD
    const handleClickNavigate = async () => {
      await navigate('/path');
    };
    ```
    
    ## canonical/export-specifier-newline vs prettier conflict
    
    Use inline `export const` declarations instead of a grouped `export { ... }` statement to avoid circular fix warnings between these two rules.
    
    ```tsx
    // BAD, causes circular fix between prettier and canonical
    export {DAYS, DURATIONS, FITNESS_GOALS};
    
    // GOOD, declare with export directly
    export const DAYS = ['mon', 'tue'] as const;
    export const DURATIONS = [15, 30, 45] as const;
    export const FITNESS_GOALS = ['weight_loss'] as const;
    ```
    
    ## no-shadow trailing underscores
    
    ESLint's `no-shadow` autofixes by appending `_`. Once shadowing is resolved, remove the trailing `_`.
    
    ## sonarjs/deprecation
    
    Never suppress with `eslint-disable`. Always fix the underlying deprecation.
    
    Common case: Zod v4 deprecated `z.string().email()` in favor of `z.email()`.
    
    ```tsx
    // BAD, suppressing the warning
    // eslint-disable-next-line sonarjs/deprecation
    email: z.string().email(),
    
    // GOOD, use the non-deprecated API
    email: z.email(),
    ```
    
    ## you-dont-need-lodash-underscore/\*
    
    Use native JavaScript instead of lodash/underscore equivalents.
    
    ```tsx
    // BAD
    import _ from 'lodash';
    const first = _.find(items, (item) => item.active);
    const names = _.map(items, (item) => item.name);
    
    // GOOD
    const first = items.find((item) => item.active);
    const names = items.map((item) => item.name);
    ```
    
    ## testing-library/prefer-screen-queries
    
    Use `screen` queries instead of destructuring from `render()`.
    
    ```tsx
    // BAD
    const {getByText, getByRole} = render(<MyComponent />);
    
    // GOOD
    render(<MyComponent />);
    screen.getByText('...');
    screen.getByRole('button');
    ```
    
    ## testing-library/await-async-events
    
    `userEvent` methods are async, always `await` them.
    
    ```tsx
    // BAD
    userEvent.click(button);
    
    // GOOD
    await userEvent.click(button);
    ```
    
    ## jest-dom/prefer-\*
    
    Use jest-dom matchers instead of raw DOM property checks.
    
    ```tsx
    // BAD
    expect(input.value).toBe('hello');
    expect(checkbox.checked).toBe(true);
    expect(el.textContent).toBe('Hello');
    
    // GOOD
    expect(input).toHaveValue('hello');
    expect(checkbox).toBeChecked();
    expect(el).toHaveTextContent('Hello');
    ```
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related