Skip to content
Back to skills

Eslint Fixes

ASecurity

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, unawaited user-event calls in a play function, raw DOM property checks the jest-dom matchers replace).

  • 23 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
developmentjavascriptgojavaapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add gaia-react/gaia --skill eslint-fixes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eslint Fixes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Eslint Fixes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gaia-react-eslint-fixes/badge)](https://www.skillsdirectory.com/skills/gaia-react-eslint-fixes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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, unawaited user-event calls in a play function, raw DOM property checks the jest-dom matchers replace).
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);
```

## Unawaited user-event calls

`userEvent` from `storybook/test` is async in a play function, always `await` it.

```tsx
// BAD
userEvent.click(button);

// GOOD
await userEvent.click(button);
```

## Raw DOM property checks

Use the jest-dom matchers `storybook/test` re-exports 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');
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.