Skip to content

eslint-ai is an cli tools that help us to lint and view suggestion from ai if we had a code error with eslint support.

License

Notifications You must be signed in to change notification settings

andostronaut/eslint-ai

Repository files navigation

ESLint: AI

build license npm release

eslint-ai is an cli tools that help us to lint and view suggestion from ai if we had a code error with eslint support.

Setup

Get your OPENAI_KEY from OpenAi

You'll have to create a account and get your api key

Set your configuration:

eslint-ai config set OPENAI_KEY=<your key> # for api key
eslint-ai config set OPENAI_MODEL=<your model> # for specifing your prefered model
eslint-ai config set OPENAI_API_ENDPOINT=<your api endpoint> # for specifing your api endpoint

eslint-ai config ui # to use ui prompt directly

Usage

Recommended

npx eslint-ai # basic usage

npx eslint-ai <file> # you can specify a list of file to lint

Using global installation

npm install -g eslint-ai # npm
yarn add global eslint-ai # yarn


eslint-ai # basic usage

eslint-ai <file> # you can specify a list of file to lint

Update

To update to the latest version, use:

eslint-ai update

Support

eslint-ai is an MIT-licensed open source project. It can grow thanks to the sponsors and support.

License

eslint-ai is MIT licensed.