Skip to content

@studnicky/eslint-config

Standard ESLint plugin for TypeScript projects. Ships two namespaced rule sets — plugin (22 @studnicky rules) and v8Plugin (24 @studnicky/v8 rules) — plus individual rule modules.

Install

Add the GitHub Packages registry to .npmrc:

@studnicky:registry=https://npm.pkg.github.com
sh
pnpm add -D @studnicky/eslint-config

Install peer dependencies:

sh
pnpm add -D eslint@>=10 typescript-eslint@>=8 @typescript-eslint/eslint-plugin@>=8 @typescript-eslint/parser@>=8 @stylistic/eslint-plugin@>=5 eslint-plugin-import-x@>=4 eslint-plugin-perfectionist@>=5 eslint-plugin-regexp@>=3 eslint-plugin-unused-imports@>=4 typescript@>=6

Usage

js
// eslint.config.mjs
import { plugin, v8Plugin } from '@studnicky/eslint-config';

export default [
  {
    plugins: { '@studnicky': plugin, '@studnicky/v8': v8Plugin },
    rules: {
      '@studnicky/type-alias-invariants': 'error',
      '@studnicky/v8/array-spread-outside-loops': 'error'
    }
  }
];

Subpath exports

SubpathExports
@studnicky/eslint-configplugin, v8Plugin, and all individual rule modules
@studnicky/eslint-config/pluginplugin (the @studnicky ESLint plugin object)
@studnicky/eslint-config/v8v8Plugin (the @studnicky/v8 ESLint plugin object)

Rule reference

Full documentation for all 46 custom rules is in the ESLint Plugins section:

Source on GitHub