---
title: "Adding the ESLint Tool to an AI Assistant: Improving Recommendations for JS/TS Projects"
description: "An AI assistant gets better at linting JavaScript and TypeScript projects when it is given ESLint tooling instead of relying on the LLM's built-in knowledge."
url: "https://swe.quest/articles/adding-the-eslint-tool-to-an-ai-assistant-improving-recommendations-for-js-ts-d83ca2ba37ac984c"
canonical: "https://www.docker.com/blog/adding-the-eslint-tool-to-an-ai-assistant/"
source: "Docker"
published: "2024-08-12"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["ai-coding","static-analysis","javascript","typescript","containers"]
---

# Adding the ESLint Tool to an AI Assistant: Improving Recommendations for JS/TS Projects

A post on [Docker](https://swe.quest/sources/docker.md), published 2024-08-12, 7 min read, How-to. Original: [https://www.docker.com/blog/adding-the-eslint-tool-to-an-ai-assistant/](https://www.docker.com/blog/adding-the-eslint-tool-to-an-ai-assistant/)

## Summary

An AI assistant gets better at linting JavaScript and TypeScript projects when it is given ESLint tooling instead of relying on the LLM's built-in knowledge. Out of the box, GPT-4 suggests boilerplate ESLint configs that often don't work. A prompt plus a containerized StandardJS function definition lets the assistant pick ts-standard when tsconfig files exist, run it from the right directory, and install Docker-based Git hooks. The LLM can then generate JSON edit ranges for violations that aren't auto-fixable. Showing these fixes in VSCode's problems window, driven by linter output, avoids the hallucinations that context-free Copilot "fix this" requests produce.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Static analysis](https://swe.quest/tags/static-analysis.md) (Engineering practices)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- ESLint basics
- LLM function calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Docker images ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

ESLint, StandardJS, ts-standard, Docker, GitHub Copilot, VSCode, GPT-4

## Related posts

- [How to Fix ESLint Violations with AI Assistance](https://swe.quest/articles/how-to-fix-eslint-violations-with-ai-assistance-74d040edadf71958.md): Docker · 2024-08-26 · Medium · 8 min read · AI for coding, AI agents, Static analysis, TypeScript, LLMs
  An LLM can produce correct fixes for ESLint violations once it has tools that supply minimal, precise context.
- [Using Docker AI Tools for Devs to Provide Context for Better Code Fixes](https://swe.quest/articles/using-docker-ai-tools-for-devs-to-provide-context-for-better-code-fixes-c0163de9f3027f93.md): Docker · 2024-10-21 · Medium · 8 min read · AI for coding, AI agents, Static analysis, Containers, Python
  LLMs fix lint violations far better when given the surrounding code, so Docker Labs built a prompt-driven pipeline where each step runs in a container: Pylint produces a violation report, violations are loaded into SQLite, and Tree-sitter parses the project into an AST whose top-level statement ranges are indexed alongside the source.
- [Getting Started with the Labs AI Tools for Devs Docker Desktop Extension](https://swe.quest/articles/getting-started-with-the-labs-ai-tools-for-devs-docker-desktop-extension-82e61806b7468ca8.md): Docker · 2024-09-09 · Medium · 4 min read · AI agents, LLMs, Containers, Developer tools
  The Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects.
- [Fixing security vulnerabilities with AI](https://swe.quest/articles/fixing-security-vulnerabilities-with-ai-6cf393c64f079c26.md): GitHub Engineering · 2024-02-14 · Medium · 10 min read · AI for coding, Static analysis, Application security, LLMs, Evaluation
  Copilot Autofix turns CodeQL security alerts into LLM-suggested fixes by building a prompt from the query help, the alert message, and code snippets along the data-flow path.
- [Ghostwriter AI & Complete Code Beta](https://swe.quest/articles/ghostwriter-ai-complete-code-beta-eb4c500f5fc252eb.md): Replit · 2022-09-08 · Medium · 9 min read · AI for coding, Inference & serving, LLMs, Developer tools
  Replit's Ghostwriter adds AI code completion, generation, transformation, explanation and semantic search to its IDE, with Complete Code starting in closed beta.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
