Git Product home page Git Product logo

million-lint-check's Introduction


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 -

  1. Detects package manager and does local setup using @antfu/ni
  2. Runs @million/lint
  3. 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 $PORT is 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 dev is 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 dev projects)

Example

We'll test the CLI on crnsh/github-h-index as an example

  1. git clone https://github.com/crnsh/github-h-index.git
  2. cd github-h-index
  3. code . (This is temporarily necessary)
  4. 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...

million-lint-check's People

Contributors

crnsh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.