diff --git a/docs/src/content/docs/samples/lint.mdx b/docs/src/content/docs/samples/lint.mdx index 260a4dfdf..2609e5110 100644 --- a/docs/src/content/docs/samples/lint.mdx +++ b/docs/src/content/docs/samples/lint.mdx @@ -5,6 +5,7 @@ keywords: ["genai", "linter", "script", "coding", "best practices"] sidebar: order: 2 --- + import { Image } from "astro:assets" import { Code } from "astro/components" import src from "../../../assets/lint-copilot.png" @@ -12,13 +13,12 @@ import alt from "../../../assets/lint-copilot.png.txt?raw" import code from "../../../../../packages/sample/genaisrc/lint.genai.mjs?raw" The motivation behind this script is to provide developers with an automated tool that can review and report on the correctness and style of both code and natural language files. -It leverages the power of LLM to inspect code or documents in new ways. +It leverages the power of LLM to inspect code or documents in new ways. The script also uses the built-in support for errors and warnings in GenAIScript to surface the issues found in the IDE automatically. {alt} - ### Script Breakdown Below is a step-by-step explanation of the script: @@ -83,12 +83,16 @@ def("FILE", env.files, { lineNumbers: true }) To execute this script, you can run it from Visual Studio Code or use the GenAIScript CLI. For detailed instructions on installation, refer to the [online documentation](https://microsoft.github.io/genaiscript/getting-started). ```bash -npx --yes genaiscript run lint +npx --yes genaiscript run lint ... ``` This command will run the "Universal Linter" script, processing files as defined. -By following the steps outlined above, you can leverage the power of GenAI to automate the linting process for your projects, ensuring high standards in your code and document files. Happy linting! 🎉 +From the GitHub Copilot Chat window, you can run the linter on all the files in the context by running: + +```sh +@genaiscript /run lint +``` ## Full Source