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

@front-utils/linter

v1.3.0

Published

Configuration files for linting

Readme

Front-utils/linter

🚀 Высокопроизводительная конфигурация ESLint для современных JavaScript/TypeScript проектов

Оптимизированная конфигурация ESLint с фокусом на производительность и качество кода. Поддерживает JavaScript, TypeScript, React и тестирование.

✨ Особенности

  • Высокая производительность - оптимизированные правила и плагины
  • 🎯 ESLint 9 Flat Config - современная плоская конфигурация
  • 📦 Готовые пресеты - js, ts, react, test конфигурации
  • 🔧 Расширяемость - легко кастомизировать под проект
  • 📚 TypeScript поддержка - полный типчек и анализ
  • ⚛️ React интеграция - хуки, JSX и лучшие практики

📊 Производительность

Результаты тестирования (среднее время на файл):

  • JavaScript: ~2.7 сек
  • TypeScript: ~3.6 сек
  • React: ~3.7 сек

Улучшение производительности на 25-45% после оптимизации медленных правил

🚀 Установка

# npm
npm install @front-utils/linter --save-dev

# yarn
yarn add @front-utils/linter -D

# bun
bun add @front-utils/linter --dev

📖 Быстрый старт

Использование готовых конфигов

// eslint.config.js
import { configs } from "@front-utils/linter";

// JavaScript проект
export default configs.js;

// TypeScript проект
export default configs.ts;

// React + TypeScript
export default configs.react;

Кастомная конфигурация

import { defineConfig } from 'eslint/config';
import { configs } from "@front-utils/linter";

export default defineConfig({
    extends: configs.react,
    files  : ['src/**/*.{ts,tsx,js,jsx}'],
    rules  : {
        // Ваши кастомные правила
        'import/no-unresolved': ['error', { ignore: ['^bun:'], }],
    },
});

📋 Доступные конфигурации

| Конфиг | Описание | Включаемые плагины | |--------|----------|-------------------| | configs.js | Базовая JS конфигурация | @eslint/js, import, promise, compat, optimize-regex, sonarjs, filenames, jsx-a11y, security | | configs.ts | TypeScript поддержка | + typescript-eslint, import/resolver-typescript | | configs.react | React + TypeScript | + react, react-hooks, globals |

🔧 Создание алиасов

import { utils } from "@front-utils/linter";
import importPlugin from 'eslint-plugin-import';

export const aliases = [
    ...utils.createEslintAlias({
        name: 'pkg',
        basePath: '.',
        config: {
            utils: 'src/infrastructure/utils',
            models: 'src/data/models'
        }
    }),
];

const importConfig = {
    plugins: { import: importPlugin },
    settings: {
        'import/resolver': {
            alias: {
                map       : aliases,
                extensions: ['.ts', '.tsx', '.js', '.jsx'],
            },
        },
    }
};

📦 Зависимости

Минимальные зависимости (для configs.js)

npm install @eslint/js eslint-plugin-import eslint-plugin-promise --save-dev

TypeScript проект (для configs.ts)

npm install typescript-eslint eslint-import-resolver-typescript --save-dev

React проект (для configs.react)

npm install eslint-plugin-react eslint-plugin-react-hooks globals --save-dev

Полный набор (monorepo)

npm install typescript-eslint eslint-plugin-react eslint-plugin-react-hooks \
    eslint-plugin-testing-library eslint-plugin-jest-dom globals --save-dev

Дополнительные плагины (используются в базовой конфигурации)

# Опциональные плагины для расширенного функционала
npm install eslint-plugin-compat eslint-plugin-optimize-regex \
    eslint-plugin-sonarjs eslint-plugin-filenames \
    eslint-plugin-jsx-a11y eslint-plugin-security --save-dev

⚡ Оптимизации производительности

Конфигурация оптимизирована путем отключения медленных правил:

  • indent - медленное форматирование
  • max-len - проверка длины строк
  • unicorn/* - отключены медленные правила
  • sonarjs - отключен для ускорения
  • perfectionist/sort-imports - заменен на import/order

🛠 Расширенное использование

Кастомные правила

import { defineConfig } from 'eslint/config';
import { configs } from "@front-utils/linter";

export default defineConfig({
    extends: configs.react,
    rules: {
        // Отключить строгие правила для легаси кода
        'react/prop-types': 'off',
        'react/require-default-props': 'off',

        // Добавить кастомные правила
        'no-console': 'warn',
        'prefer-const': 'error',
    },
});

Игнорирование файлов

import { defineConfig } from 'eslint/config';
import { configs } from "@front-utils/linter";

export default defineConfig({
    extends: configs.react,
    ignores: [
        'dist/**/*',
        'node_modules/**/*',
        'coverage/**/*',
        '**/*.d.ts',
    ],
});

📚 Примеры проектов

Next.js + TypeScript

// eslint.config.js
import { configs } from "@front-utils/linter";

export default defineConfig({
    extends: configs.react,
    files  : ['**/*.{ts,tsx,js,jsx}'],
    settings: {
        react: {
            version: 'detect',
        },
    },
});

Node.js API

// eslint.config.js
import { configs } from "@front-utils/linter";

export default defineConfig({
    extends: configs.ts,
    files  : ['src/**/*.{ts,js}'],
    languageOptions: {
        globals: {
            console: 'readonly',
            process: 'readonly',
            Buffer: 'readonly',
        },
    },
});

🔍 Поиск и устранение проблем

Медленная работа ESLint

  1. Используйте --cache флаг
  2. Ограничьте файлы: files: ['src/**/*.{ts,tsx,js,jsx}']
  3. Отключите ненужные плагины

Ошибки импорта

// Добавьте в правила
rules: {
    'import/no-unresolved': ['error', {
        ignore: ['^bun:', '^node:'],
    }],
}

📄 Лицензия

ISC License