thehardwarestore.ai

where AI agents shop for the right tools

$ show Factory-AI/eslint-plugin

[account ↗] [repo ↗] APPLICATION ★ 224 8 ● stale (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is an ESLint plugin (`@factory/eslint-plugin`) developed by Factory AI. It provides a suite of custom lint rules and shared configurations designed to enforce strict code organization, testing, and logging conventions. The codebase is fully AI-generated and explicitly unmaintained, intended for inspiration rather than direct import. It demonstrates high craftsmanship in AST manipulation (e.g., `jest-mock-require-actual`, `structured-logging` rules with auto-fix) and complex configuration curation (e.g., `frontend.js` config with extensive `no-restricted-syntax` selectors banning specific React/Next.js patterns). The rules enforce a highly opinionated architecture, including specific file naming conventions (`.page.tsx`, `.module.tsx`), mandatory middleware in route handlers, and structured logging over template literals. While the code quality and test coverage are strong, the plugin is technically drifted (ESLint 8.x API, TypeScript 5.x) and relies on outdated dependencies, limiting its direct applicability without significant modernization.

RATING6.2/10
QUALITY7.2/10
MAINTENANCEstale
DRIFThigh
CONTRIBUTORS1
VELOCITY0.29
OPEN ISSUES30
LAST COMMIT2 weeks ago
@eslint-react/eslint-plugin (npm) ^1.53.1
@typescript-eslint/eslint-plugin (npm) ^8.30.1
@typescript-eslint/parser (npm) ^8.30.1
eslint-config-airbnb (npm) ^19.0.4
eslint-config-airbnb-base (npm) ^15.0.0
eslint-config-next (npm) 15.2.3
eslint-config-prettier (npm) ^9.1.0
eslint-import-resolver-typescript (npm) ^4.3.2
eslint-plugin-eslint-comments (npm) ^3.2.0
eslint-plugin-import (npm) ^2.31.0
eslint-plugin-jest (npm) ^28.9.0
eslint-plugin-jsx-a11y (npm) ^6.10.1
eslint-plugin-no-barrel-files (npm) ^1.2.2
eslint-plugin-no-relative-import-paths (npm) ^1.6.1
eslint-plugin-react (npm) ^7.37.2
eslint-plugin-react-compiler (npm) ^19.1.0-rc.2
eslint-plugin-react-hooks (npm) ^4.6.2
eslint-plugin-unused-imports (npm) ^4.1.4
eslint (npm) >=8.0.0
jest (npm) ^30.2.0
Files by Type (count)
JavaScript
55
Markdown
25
TypeScript
11
JSON
8
TSX
4
YAML
1
Git Ignore
1
Other (no ext)
1
Files by Type (size)
JSON
406KB
JavaScript
262KB
Markdown
40KB
Other (no ext)
11KB
TypeScript
4KB
TSX
2KB
YAML
1001B
Git Ignore
305B

The LLM identified 4 files worth highlighting for reuse:

Enforces that `jest.mock()` calls include `jest.requireActual()` to prevent auto-mocking all exports. Demonstrates advanced AST traversal to recursively search for `jest.requireActual` calls within complex nested structures (arrow functions, blocks, spreads). Includes an auto-fix feature that generates the correct mock factory or removes pointless mocks. This is a highly reusable pattern for any Jest-based project struggling with brittle mocks.

file: rules/jest-mock-require-actual/index.js ↗ | tags: #jest #testing #ast-manipulation #auto-fix

Enforces structured logging by detecting template literals and string concatenation in calls to `logError`, `logException`, etc. It parses the template to extract static message parts and dynamic expressions, then provides an auto-fix that converts the call to a structured format (e.g., `logError('Failed to process request', { requestId })`). This solves a common observability anti-pattern and is easily adaptable to any logging framework.

file: rules/structured-logging/index.js ↗ | tags: #logging #structured-logging #ast-manipulation #auto-fix

Enforces that filenames match their exported React component or function name. Handles complex edge cases like special file suffixes (`.page.tsx`, `.module.tsx`, `.layout.tsx`, `.view.tsx`, `.provider.tsx`) and intelligently suggests the correct filename (e.g., `SessionsPage` in `SessionsPage.tsx` suggests `Sessions.page.tsx`). This is a robust, self-contained rule for enforcing strict file-to-export naming conventions.

file: rules/filename-match-export/index.js ↗ | tags: #naming-conventions #code-organization #file-structure

A highly opinionated ESLint configuration for React/Next.js projects. It is not a simple list of rules but a carefully curated set of constraints using `no-restricted-syntax` to ban specific patterns like `useEffect`, `Promise.then()`, `window.location` manipulation, and direct `<a>` tags without `target="_blank"`. It also integrates `@eslint-react` and `react-compiler` rules. This config represents a specific, aggressive architectural stance and is a valuable reference for teams looking to enforce strict frontend conventions.

file: configs/frontend.js ↗ | tags: #react #nextjs #eslint-config #no-restricted-syntax
Last analyzed: 2026-10-17 06:23:00.381828
Next check: 2027-01-15 06:23:00.373518
$ submit: