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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gateweb/eslint-config-gateweb

v2.1.1

Published

A shared ESLint configuration project for frontEnd project.

Readme

@gateweb/eslint-config-gateweb

Gateweb's ESLint config presets for modern front-end projects.

[!NOTE] This project is a customized version of the excellent @antfu/eslint-config, adapted to fit the specific needs of Gateweb's front-end projects.

Features

  • Comprehensive Rules: Integrates multiple ESLint plugins like @typescript-eslint, eslint-plugin-react, eslint-plugin-import-x, eslint-plugin-jsdoc, and more.
  • Flat Config Format: Uses the new ESLint flat config format (eslint.config.js).
  • TypeScript Support: First-class support for TypeScript.
  • React Support: Includes rules for React and JSX.
  • Prettier Integration: Option to integrate with Prettier for code formatting.
  • Highly Customizable: Provides flexible options to tailor the configuration to your project's needs.
  • Automatic Package Detection: Automatically enables rules for TypeScript if typescript is detected in your project.

Installation

Install the package using your preferred package manager:

# Using pnpm
pnpm add -D @gateweb/eslint-config-gateweb eslint

# Using npm
npm install -D @gateweb/eslint-config-gateweb eslint

# Using yarn
yarn add -D @gateweb/eslint-config-gateweb eslint

Usage

Create an eslint.config.js file in your project root and add the following:

// eslint.config.js
import { createConfig } from '@gateweb/eslint-config-gateweb';

export default createConfig();

Advanced Configuration

You can customize the configuration by passing an options object to createConfig.

// eslint.config.js
import { createConfig } from '@gateweb/eslint-config-gateweb';

export default createConfig(
  {
    // Enable/disable features
    typescript: true,
    react: true,
    prettier: true,

    // Customize stylistic rules
    stylistic: {
      indent: 2,
      quotes: 'single',
    },

    // Override specific rules
    overrides: {
      javascript: {
        'no-console': 'warn',
      },
      typescript: {
        '@typescript-eslint/no-explicit-any': 'off',
      },
    },
  },
  // You can also append your own flat configs
  {
    files: ['**/*.test.ts'],
    rules: {
      'no-unused-expressions': 'off',
    },
  }
);

Options

The createConfig function accepts the following options:

  • typescript: boolean | object - Enable or configure TypeScript support. Defaults to auto-detection.
  • react: boolean | object - Enable or configure React support. Defaults to true.
  • jsx: boolean - Enable JSX support. Defaults to true.
  • prettier: boolean - Enable Prettier integration. Defaults to false.
  • test: boolean | object - Enable test file linting. Defaults to true.
  • stylistic: boolean | object - Enable or configure stylistic rules. Defaults to true unless prettier is enabled.
  • gitignore: boolean | object - Enable gitignore support. Defaults to true.
  • componentExts: string[] - File extensions for component files.
  • isInEditor: boolean - Manually specify if running in an editor environment.
  • overrides: object - Override rules for specific configurations (e.g., javascript, typescript, react).

Prettier Integration

To use Prettier for formatting, first install it:

pnpm add -D prettier eslint-config-prettier

Then, enable the prettier option in your eslint.config.js:

// eslint.config.js
import { createConfig } from '@gateweb/eslint-config-gateweb';

export default createConfig({
  prettier: true,
});

This will disable stylistic rules that conflict with Prettier.

VS Code Integration

For the best experience with VS Code, create a .vscode/settings.json file with the following content:

{
  "eslint.experimental.useFlatConfig": true,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }
}

This enables ESLint's flat config support, formats on save, and enables auto-fixing of ESLint errors.