liveBook · Manning

Linting

As explained in Vibe Engineering

A local linter is a tool run in a developer's environment that statically analyzes source code for style issues, likely errors, and convention violations.

A plausible code change can hide a costly failure. Linting provides a fast static check before execution: it flags code patterns that violate rules or suggest known mistakes. Where a compiler asks whether code is valid, a linter asks whether a pattern is advisable. section 8.2.2

A regular expression warning

A markup parser may use nested quantifiers in a bold-text regex. If the closing delimiter never arrives, the engine can try exponentially many ways to divide the input. ESLint with the installed and enabled eslint-plugin-security can flag the pattern before it runs. The plugin also flags some safe expressions, so a warning calls for investigation rather than an assumption that every regex is dangerous. section 8.2.2

    "**" + "a".repeat(22) + "!"   ->  0.34 s
    "**" + "a".repeat(26) + "!"   ->  5.52 s
    "**" + "a".repeat(30) + "!"   ->  ~90 s

The timings show how rapidly the nested-quantifier pattern can slow down as an unclosed input grows; absolute times depend on the machine. section 8.2.2

Linters are fast, deterministic and useful for precisely defined rules, but they do not understand intent or project context. Treat their findings as an early guardrail, not proof of correctness or a replacement for human review. section 5.3.2 section 8.8.4

Use linting as part of a layered verification loop:

  • Run a fast local lint pass during iteration to catch trivial failures before they consume shared CI capacity. section 10.3.4
  • On every change, pair linting and security scanning with type checking, core unit tests and CI regression checks. section 8.8.4
  • Before merging, review logic and intent and test affected integrations; automation alone can miss both. section 8.8.4

How Vibe Engineering covers it

How deep it goes
Explains pattern-based detection and false positives, then places linting in local and CI validation without detailing linter internals.
Examples
Uses a markup parser's nested-quantifier regex and unclosed inputs to illustrate a security warning and rapidly growing execution time.
What you can do after
Apply linting via ESLint and an enabled security plugin, and investigate warnings alongside other verification checks.
How it connects
Connects linting with static analysis, security scanning, type checking, CI and human review.

Also explained in

Compare how 9 books explain linting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.