Skip to content

Upgrade ESLint rules to strict mode to catch potential runtime errors #262

@AlAfiz

Description

@AlAfiz

Description

The default Next.js linting is quite permissive. We should tighten the rules to enforce best practices, especially regarding React hooks and TypeScript types.

Acceptance Criteria

  • Update .eslintrc.json.
  • Extend from plugin:@typescript-eslint/strict-type-checked and plugin:react-hooks/recommended.
  • Set the react-hooks/exhaustive-deps rule to "error" instead of "warn".
  • Explicitly disable the usage of the TypeScript any type (@typescript-eslint/no-explicit-any).
  • Fix all the new warnings/errors generated by this stricter configuration.

Technical Details

  • This requires configuring the parserOptions.project in ESLint to point to the tsconfig.json so the linter can read the type information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions