
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@factory/eslint-plugin
Advanced tools
ESLint plugin with configurations and custom rules for Factory projects
An open-source ESLint plugin showcasing how agent-native organizations use custom lint rules to drive AI coding agents toward better results.
This codebase is forked from what is used internally at Factory and has been altered to be more generic. We are sharing this as requested by the developer community and to showcase an example of what an agent-native organization does with custom lint rules to improve agent output quality.
All code in this repository is fully AI-generated.
To learn more about our approach:
Our recommendation is NOT to simply import this package. Instead, take the ideas from these rules and build your own set of custom lint rules tailored to your codebase, tech stack, and conventions.
We have included comprehensive markdown documentation for each rule (in rules/<rule-name>/README.md) that makes it easy for any AI agent to parse and adapt to your custom tech stack or framework.
Note: This repository is not planned to be actively maintained or updated. It is designed for sharing and inspiration only.
| Config | Use Case | Description |
|---|---|---|
plugin:@factory/base | Base | Core TypeScript/JavaScript rules |
plugin:@factory/recommended | Packages/Libraries | Base + Factory plugin rules |
plugin:@factory/frontend | React/Vite apps | Recommended + React/JSX rules |
plugin:@factory/backend | Backend apps | Recommended + backend constraints |
graph TD
A[base] --> B[recommended]
B --> C[frontend]
B --> D[backend]
This plugin includes custom rules that enforce code organization and best practices:
@factory/enum-file-organization - Enums must live in enums.ts files@factory/types-file-organization - Type definitions must live in types.ts files@factory/constants-file-organization - Constants must live in constants.ts files@factory/errors-file-organization - Error classes must live in errors.ts files@factory/test-utils-organization - Test utilities must live under test-utils/@factory/test-file-location - Test files must be colocated with source files@factory/filename-match-export - Filenames must match exported components/functions@factory/no-exported-function-expressions - Prefer function declarations for exports@factory/no-exported-string-union-types - Prefer enums over string union types@factory/require-test-files - TypeScript files must have corresponding test files@factory/require-tsx-test-stories-files - TSX files need test and story files@factory/jest-mock-absolute-paths - Jest mocks must use absolute paths@factory/jest-mock-require-actual - Jest mocks must include jest.requireActual()@factory/no-unstable-mock-module - Disallow unstable_mockModule@factory/structured-logging - Enforce structured logging patterns@factory/no-log-exception-with-throw - No logging exceptions before throwing@factory/require-route-middleware - Route files must use middleware@factory/require-v0-route-handle-middleware - v0 routes need specific middleware@factory/require-v0-strict-schemas - v0 routes need strict schema validation@factory/no-dynamic-styled-components - No dynamic styled-components@factory/no-plain-html-text-elements - No plain text in HTML elements@factory/no-use-effect-in-hooks - Restrict useEffect in custom hooks@factory/restrict-tsx-components - Enforce component patternsnpm install @factory/eslint-plugin eslint --save-dev
Create an .eslintrc.js file in your project root:
module.exports = {
root: true,
plugins: ['@factory'],
extends: ['plugin:@factory/recommended'],
};
module.exports = {
root: true,
plugins: ['@factory'],
extends: ['plugin:@factory/frontend'],
};
module.exports = {
root: true,
plugins: ['@factory'],
extends: ['plugin:@factory/backend'],
};
MIT
FAQs
ESLint plugin with configurations and custom rules for Factory projects
We found that @factory/eslint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.