lints

Configure oxlint and eslint rules to enforce codebase conventions.

2|Updated Oct 16, 2021
One-click install
npx skills add https://github.com/pattobrien/dotfiles --skill lints-pattobrien
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lints
Source: https://github.com/pattobrien/dotfiles/tree/main/claude/skills/lints
Command: npx skills add https://github.com/pattobrien/dotfiles --skill lints-pattobrien

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @boundaries/eslint-plugin.

What problem does it solve? Enforcing consistent code conventions across a codebase or monorepo is difficult to do manually, and large-scale refactors often lack a deterministic way to measure compliance. This Skill guides the configuration of oxlint and eslint rules so conventions are enforced automatically by the linter. ## Core Features & Use Cases - Oxlint-first linting: Uses oxlint, a Rust-based drop-in replacement for eslint, as the default linter. - Rule configuration guidance: Covers max-lines-per-function, max-params, max-lines, max-depth, and restricted globals such as navigator, window, and document. - Boundary enforcement: Uses @boundaries/eslint-plugin to control which files can import internal or external dependencies and to make nested files private to siblings or parent files. - Use Case: When refactoring a monorepo, enable a rule across the entire codebase, run the linter to count violations, automate the fixes, and repeat until the codebase is compliant. ## Quick Start Configure oxlint rules to restrict direct usage of window and document globals in my TypeScript project.

Frequently Asked Questions about lints

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure oxlint rules for a TypeScript project?▼

Oxlint is a Rust-based drop-in replacement for eslint and should always be used instead of eslint. Enable rules such as max-lines-per-function, max-params, max-lines, and max-depth in your lint configuration to enforce concise functions and files.

Oxlint vs eslint, which should I use?▼

Oxlint is the preferred choice because it is a Rust-based drop-in replacement for eslint with faster execution. This workflow mandates always using oxlint rather than eslint for linting JavaScript and TypeScript code.

How do I restrict globals like window and document in eslint?▼

Use restricted-globals style rules to prevent direct usage of navigator, window, and document in source files. This forces code to access browser APIs through controlled abstractions instead of global references.

How do I enforce import boundaries between files in a monorepo?▼

Install @boundaries/eslint-plugin and configure its boundaries/dependencies rules to control which files can import internal or external dependencies. It also supports making nested files private so only siblings or immediate parents can import them.

What is lint-driven development for refactoring?▼

Lint-driven development enables a rule across the whole codebase, runs the linter to count violations, then applies automated fixes until compliant. The cycle repeats until the linter reports zero violations of the target convention.