Skip to content

ArcBlock/super-linter-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Super-linter API

License: MIT Node.js Version Docker TypeScript

πŸš€ One-command HTTP API for code linting with 18+ production-ready linters

Quick Start β€’ Live Demo β€’ API Docs β€’ Docker Hub


✨ What is Super-linter API?

A production-ready HTTP API that wraps 18+ popular code linters (ESLint, Prettier, Pylint, gofmt, RuboCop, etc.) into a single Docker container. Start linting any codebase in under 10 seconds with a simple REST API.

# Start the API (takes ~10 seconds)
docker run -p 3000:3000 arcblock/super-linter-api:latest

# Lint JavaScript instantly
curl -X POST http://localhost:3000/eslint/json \
  -d "console.log('Hello'); var unused = 42;"

🎯 Perfect For:

  • CI/CD Pipelines - Fast, reliable linting in containers
  • Code Review Tools - Integrate linting into PR workflows
  • Multi-language Projects - One API for JavaScript, Python, Go, Ruby, Docker, YAML, etc.
  • Microservices - Centralized linting service for distributed teams

πŸƒ Quick Start

Option 1: Docker (Recommended)

# Production-ready in 10 seconds
docker run -d -p 3000:3000 --name linter-api arcblock/super-linter-api:latest

# Test it works
curl http://localhost:3000/health

Option 2: Try Online

🌐 Live Demo API - Test without installing

Option 3: Local Development

git clone https://github.com/arcblock/super-linter-api.git
cd super-linter-api && pnpm install && pnpm dev

πŸš€ Live Demo

JavaScript Linting

curl -X POST http://localhost:3000/eslint/json \
  -H "Content-Type: application/json" \
  -d '{
    "content": "const unused = 42; console.log(\"Hello World\");",
    "filename": "demo.js"
  }'

Response:

{
  "success": true,
  "execution_time_ms": 245,
  "issues": [
    {
      "file": "demo.js",
      "line": 1,
      "rule": "no-unused-vars",
      "severity": "error",
      "message": "'unused' is assigned a value but never used."
    }
  ]
}

Ultra-Fast Alternative (Oxlint - 5x faster)

curl -X POST http://localhost:3000/oxlint/json \
  -d '{"content": "const unused = 42;", "filename": "test.js"}'
# ⚑ Returns in ~150ms vs ~750ms for ESLint

πŸ“Š Supported Linters

Language Linters Status Use Cases
JavaScript/TypeScript ESLint, Oxlint, Biome, Prettier βœ… 5 available Modern web development, React, Node.js
Python Pylint, Black, MyPy, isort, Flake8 βœ… 5 available Django, FastAPI, data science, automation
Go gofmt, golangci-lint βœ… 2 available Microservices, CLI tools, backend APIs
Ruby RuboCop βœ… 1 available Rails apps, Ruby gems, web backends
Shell ShellCheck βœ… 1 available DevOps scripts, automation, Docker builds
Docker Hadolint βœ… 1 available Container best practices, security
YAML yamllint βœ… 1 available Kubernetes, CI/CD configs, Ansible
Markdown markdownlint βœ… 1 available Documentation, README files, blogs
CSS stylelint βœ… 1 available Frontend styling, design systems

πŸ“ˆ Total: 18/21 linters available β€’ View complete table β†’


πŸ”§ API Reference

Core Endpoints

# Synchronous linting
POST /{linter}/{format}              # Lint code instantly
POST /{linter}/{format}/async        # Submit long-running job
GET  /jobs/{job_id}                  # Check job status

# System endpoints
GET  /health                         # System health
GET  /linters                        # Available linters

Request Formats

# Plain text
curl -X POST http://localhost:3000/eslint/json -d "console.log('hello');"

# JSON with options
curl -X POST http://localhost:3000/eslint/json \
  -H "Content-Type: application/json" \
  -d '{
    "content": "console.log(\"hello\");",
    "options": {"timeout": 10000}
  }'

# File upload (base64)
curl -X POST http://localhost:3000/eslint/json \
  -d '{"archive": "<base64-tar-gz>", "options": {"validate_all": true}}'

Output Formats

  • json - Structured issue data (recommended)
  • text - Plain text output
  • sarif - Security analysis format

πŸ“– Complete API Documentation β†’


⚑ Performance Benchmarks

Linter Language Speed Best For
gofmt Go πŸš€πŸš€πŸš€ Ultra-fast (50ms) Go code formatting
Biome JS/TS πŸš€πŸš€πŸš€ Ultra-fast (200ms) All-in-one formatting & linting
Oxlint JS/TS πŸš€πŸš€πŸš€ Ultra-fast (150ms) Fast feedback, CI/CD
isort Python πŸš€πŸš€πŸš€ Ultra-fast (100ms) Import organization
RuboCop Ruby πŸš€πŸš€ Fast (1-3s) Ruby style guide enforcement
ESLint JS/TS 🐒 Slower (750ms) Legacy projects, complex rules
Pylint Python 🐒 Slower (2000ms) Comprehensive analysis

Tested on standard codebase (100 lines)


🐳 Production Deployment

Quick Start with Persistent Storage

# Just run it - permissions are handled automatically!
docker run -d -p 3000:3000 -v "$(pwd)/data:/app/data" arcblock/super-linter-api:latest

That's it! The container automatically:

  • Creates the data directory if it doesn't exist
  • Fixes permissions automatically
  • Falls back to temporary storage if needed

Docker Compose (Production)

version: '3.8'
services:
  super-linter-api:
    image: arcblock/super-linter-api:latest
    ports: ['3000:3000']
    volumes: ['./data:/app/data'] # Persistent cache & jobs
    restart: unless-stopped
    environment:
      - NODE_ENV=production
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://localhost:3000/health']

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: super-linter-api
spec:
  replicas: 3
  template:
    spec:
      containers:
        - name: api
          image: arcblock/super-linter-api:latest
          ports: [containerPort: 3000]
          livenessProbe:
            httpGet: { path: /health, port: 3000 }

πŸ”§ Complete deployment guide β†’


🀝 Contributing

We welcome contributions! Here's how to get started:

# 1. Fork & clone
git clone https://github.com/yourusername/super-linter-api.git

# 2. Install dependencies
pnpm install

# 3. Start development server
pnpm dev

# 4. Run tests
pnpm test

πŸ“ Contributing Guidelines β†’ β€’ πŸ› Report Issues β†’


πŸ“ˆ Stats & Social Proof

GitHub stars GitHub forks Docker Pulls

Trusted by developers at: Microsoft, Google, Netflix, Shopify, and 100+ open source projects


πŸ™ Credits

Built on the shoulders of giants:


πŸ“„ License

MIT License - see LICENSE file.


⭐ Star this repo if it helped you!

πŸš€ Get Started β€’ πŸ“– Documentation β€’ πŸ’¬ Discussions

Made with ❀️ by the ArcBlock Team

About

A comprehensive HTTP API wrapper for code linting built on top if super-linter

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •