million-lint-check
v1.0.18
Published
A command-line tool to verify if Million Lint is active in a project.
Readme
What?
Million Lint Checker is a command line tool that automatically detects whether Million Lint works on your repository or not.
How?
It works by doing the following things -
- Detects package manager and does local setup using @antfu/ni
- Runs @million/lint
- Randomly interacts (fuzzes) with the frontend and detects Million Lint suggestions in the shadow DOM using puppeteer
Installation
- Run
npx million-lint-check@latest setup $PORT, where$PORTis the port your frontend will run on in development.
Note
- For some projects setup will have to be done manually. Once the project is at a state where a simple
npm run devis sufficient to run it, this tool can be used. - This only works with VSCode
- I've only tested this on the project below ;_; (should work for all
nr devprojects)
Example
We'll test the CLI on crnsh/github-h-index as an example
git clone https://github.com/crnsh/github-h-index.gitcd github-h-indexcode .(This is temporarily necessary)npx million-lint-check@latest setup 3000
Running development server...
Development server started in the background.
Opening browser and interacting with components...
> [email protected] dev
> next dev
▲ Next.js 14.1.1
- Local: http://localhost:3000
⚡ Million Lint v0.0.66
✓ Ready in 0.18ms
✓ Ready in 2.2s
○ Compiling / ...
✓ Compiled / in 1158ms (380 modules)
✓ Compiled in 180ms (380 modules)
Successfully connected to http://localhost:3000 after 1 attempt(s).
Randomly interacting with page...
Finding element...
Million Lint is working as expected!
Shutting down development server...