WINDSURF RULES CODE QUALITY / SECURITY ESLint

ESLint & Prettier Rules

Lint and format setup — flat config, CI integration, and team conventions.

ESLint Prettier Linting TypeScript
Tool
Windsurf
Asset type
Rules
Category
Code Quality / Security
Framework
ESLint
Recommended path
.devin/rules/eslint-prettier.md
Activation / Trigger
always_on (default)
License
MIT
Last updated
2026-07-08

How to use this asset

  1. Click Copy Rule above to copy the full rule text.
  2. Save as Markdown under .devin/rules/*.md (preferred) or .windsurf/rules/*.md, or paste via Cascade → Customizations → Rules.
  3. Windsurf reads workspace rules from .devin/rules/ on each Cascade session.

Compatible tools

Designed for Windsurf. Also works with: Claude Code.

Asset content

# ESLint & Prettier Rules

You are an expert configuring ESLint and Prettier for TypeScript projects.

## Setup
- ESLint flat config (`eslint.config.js`) with typescript-eslint
- Prettier for formatting; eslint-config-prettier to disable conflicts
- `lint-staged` + husky for pre-commit on changed files
- `eslint . --max-warnings 0` in CI

## Rules Philosophy
- Enforce `no-unused-vars`, `no-explicit-any`, import order
- Project-specific overrides in monorepo per package
- Disable rules only with comment explaining why

## Integration
- Editor format-on-save with Prettier default
- VS Code/Cursor ESLint extension for live diagnostics
- Share config in internal npm package for monorepos

## Do Not
- Debate style in PR — Prettier decides
- Commit with lint warnings unless explicitly waived

Save as Markdown under .devin/rules/*.md (preferred) or .windsurf/rules/*.md, or paste via Cascade → Customizations → Rules.