npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@scaffit/eslint

v1.0.4

Published

ESLint configuration setup with framework-specific rules for Next.js, React, Vue, Angular, Svelte, Express, Fastify, Node.js projects

Readme

@scaffit/eslint

ESLint configuration setup with framework-specific rules.

Features

  • Multi-framework support - Next.js, React, Vue, Angular, Svelte, Express, Fastify, Node.js
  • Automatic framework detection - Adapts configuration based on your project
  • TypeScript support - Full TypeScript linting rules
  • Prettier integration - Works seamlessly with Prettier
  • Customizable rules - Choose strictness level and specific rules
  • Package.json scripts - Add lint and lint:fix commands

Installation

Option 1: Using Scaffit CLI (Recommended)

# Add ESLint scaffold (no installation needed!)
npx scaffit add eslint

Alternative: Global Installation

# Install CLI globally
npm install -g scaffit

# Add ESLint scaffold
scaffit add eslint

Option 2: Direct npm package usage

# Install scaffold directly
npm install @scaffit/eslint

# Use in your code
import { setupESLint, previewESLint } from '@scaffit/eslint';

// Setup ESLint with custom options
const result = await setupESLint({
  includeTypeScript: true,
  includePrettier: true,
  strictnessLevel: 'recommended',
  addLintScripts: true,
  projectRoot: './my-project'
});

// Preview changes before applying
const preview = await previewESLint({
  includeTypeScript: true,
  includePrettier: true,
  strictnessLevel: 'recommended'
});

Note: Both approaches require @scaffit/core to be installed (automatically handled).

Usage

After installation, you can immediately lint your code:

# Check for linting issues
npm run lint

# Auto-fix linting issues
npm run lint:fix

Note: Linting is ready to use immediately after installation.

Configuration Options

  • TypeScript support: Add TypeScript-specific ESLint rules
  • Prettier integration: Configure ESLint to work with Prettier
  • Strictness level: Choose between recommended, strict, or custom
  • Framework: Automatically detected (Next.js, React, Vue, Angular, Svelte, Express, Fastify, Node.js)

Generated Files

.eslintrc.json

Framework-specific ESLint configuration:

Next.js:

{
  "extends": [
    "next/core-web-vitals",
    "@typescript-eslint/recommended",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint"],
  "rules": {
    "@typescript-eslint/no-unused-vars": "error",
    "@typescript-eslint/no-explicit-any": "warn",
    "prefer-const": "error"
  }
}

React/Vue/Angular/Svelte:

{
  "extends": [
    "eslint:recommended",
    "@typescript-eslint/recommended",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint"],
  "rules": {
    "@typescript-eslint/no-unused-vars": "error",
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn"
  }
}

Express/Fastify/Node.js:

{
  "extends": [
    "eslint:recommended",
    "@typescript-eslint/recommended",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint"],
  "env": {
    "node": true,
    "es2022": true
  },
  "rules": {
    "@typescript-eslint/no-unused-vars": "error",
    "no-console": "warn"
  }
}

.eslintignore

Framework-specific ignore patterns:

Next.js:

node_modules
.next
out
.vercel
dist
build
coverage
*.log
*.lock
package-lock.json
yarn.lock
pnpm-lock.yaml

React/Vue/Angular/Svelte:

node_modules
dist
build
coverage
*.log
*.lock
package-lock.json
yarn.lock
pnpm-lock.yaml

Express/Fastify/Node.js:

node_modules
dist
build
coverage
*.log
*.lock
package-lock.json
yarn.lock
pnpm-lock.yaml

Dependencies Added

  • eslint - JavaScript/TypeScript linter
  • @typescript-eslint/parser - TypeScript parser for ESLint (if TypeScript enabled)
  • @typescript-eslint/eslint-plugin - TypeScript-specific ESLint rules (if TypeScript enabled)
  • eslint-config-prettier - Disable ESLint rules that conflict with Prettier (if Prettier integration enabled)

Package.json Scripts Added

  • lint - Run ESLint on all files
  • lint:fix - Run ESLint and fix auto-fixable issues

Framework-Specific Features

Next.js

  • Next.js specific rules (next/core-web-vitals)
  • React hooks rules
  • Next.js best practices

React

  • React hooks rules
  • JSX-specific linting
  • React best practices

Vue

  • Vue-specific rules
  • Template linting
  • Vue composition API rules

Angular

  • Angular-specific rules
  • TypeScript strict mode
  • Angular best practices

Svelte

  • Svelte-specific rules
  • Component linting
  • Svelte best practices

Express/Fastify/Node.js

  • Node.js environment
  • Server-side specific rules
  • API best practices

Usage Examples

Run linting

npm run lint

Fix linting issues

npm run lint:fix

Lint specific files

npx eslint src/**/*.{js,ts,jsx,tsx}

VS Code Integration

Add to your VS Code settings.json:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "typescript",
    "javascriptreact",
    "typescriptreact"
  ]
}

Configuration

You can customize ESLint by editing .eslintrc.json:

  • extends: Base configurations to extend
  • rules: Custom rules and their severity
  • parser: JavaScript/TypeScript parser
  • plugins: Additional ESLint plugins
  • env: Environment settings

Next Steps

  1. Run npm run lint to check for issues
  2. Run npm run lint:fix to fix auto-fixable issues
  3. Set up your editor to show ESLint errors
  4. Consider adding pre-commit hooks with lint-staged
  5. Add ESLint to your CI/CD pipeline