Socket
Book a DemoInstallSign in
Socket

@ver0/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ver0/eslint-config

ESLint configs used in all ver0 projects

latest
Source
npmnpm
Version
1.3.6
Version published
Weekly downloads
175
60.55%
Maintainers
1
Weekly downloads
 
Created
Source

@ver0/eslint-config

NPM Version NPM Downloads Dependents (via libraries.io), scoped npm package GitHub Actions Workflow Status


🔬 A comprehensive ESLint configuration used across all ver0 projects

✨ What's Included

This config brings together the best ESLint rules and plugins to help you write clean, consistent code. Here's what you get out of the box:

🎯 Core Features

  • JavaScript & TypeScript - Full support for modern JS/TS syntax
  • React Support - Optional React-specific linting rules
  • Node.js Integration - Node-specific rules when targeting server environments
  • JSON Linting - Support for .json, .jsonc, and .json5 files
  • Markdown Linting - Keep your documentation consistent
  • Vitest Testing - Specialized rules for Vitest test files
  • Prettier Integration - Seamlessly works with Prettier formatting

📦 Supported File Types

  • JavaScript: .js, .jsx, .mjs, .cjs
  • TypeScript: .ts, .tsx, .mts, .cts
  • JSON: .json, .jsonc, .json5
  • Markdown: .md
  • Tests: .test.*, .benchmark.*

🔧 Included Plugins & Configs

  • ESLint recommended rules
  • XO configuration (both JS and TS)
  • Import/export validation and sorting
  • Unicorn (modern JS practices)
  • Promise best practices
  • ESLint comments management
  • TypeScript-specific linting
  • React hooks and JSX rules (when enabled)
  • And many more quality-of-life improvements!

🚀 Installation

yarn add -D @ver0/eslint-config

📖 Usage

ESLint Configuration

Setting up your ESLint config is straightforward! The configuration assumes you're using TypeScript and Prettier by default (though you can disable specific features if needed).

// eslint.config.js
import {defineConfig} from 'eslint/config';
import {buildConfig} from '@ver0/eslint-config';

export default defineConfig(
	...buildConfig({
		globals: 'node',
		typescript: true,
		typescriptUnsafe: true,
		vitest: true,
		json: true,
		markdown: true,
		react: true,
	}),
	{
		files: ['README.md'],
		language: 'markdown/gfm',
	},
	// ... any other configs on your taste...
);

🎛️ Configuration Options

OptionTypeDefaultDescription
globalsstring'node'Required. Environment globals ('node', 'browser', etc.)
prettierbooleantrueEnable Prettier integration and formatting rules
typescriptbooleantrueEnable TypeScript-specific linting rules
typescriptUnsafebooleanfalseDisable TypeScript's strict safety rules
jsonbooleantrueEnable JSON/JSONC/JSON5 file linting
markdownbooleantrueEnable Markdown file linting
reactbooleanfalseEnable React and JSX-specific rules
vitestbooleanfalseEnable Vitest testing framework rules

🌟 Common Configurations

For a Node.js API project:

// eslint.config.js
import {defineConfig} from 'eslint/config';
import {buildConfig} from '@ver0/eslint-config';

export default defineConfig(
	...buildConfig({
		globals: 'node',
		vitest: true, // if you're using Vitest for testing
	}),
	// ... any other configs on your taste...
);

For a React web application:

// eslint.config.js
import {defineConfig} from 'eslint/config';
import {buildConfig} from '@ver0/eslint-config';

export default defineConfig(
	...buildConfig({
		globals: 'browser',
		react: true,
		vitest: true,
	}),
	// ... any other configs on your taste...
);

🎨 Prettier Configuration

This package also provides opininated default Prettier configuration, that you can extend from.

// .prettierrc.js
import ver0Config from '@ver0/eslint-config/.prettierrc.js';

export default {
	...ver0Config,
	// Override any settings if needed
	// printWidth: 100,
};

⚙️ EditorConfig

For consistent formatting across different editors, you can copy our .editorconfig that is aligned with our Prettier configuration:

# .editorconfig
[*]
indent_style = tab
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.yml]
indent_style = space
indent_size = 2

🛠️ Troubleshooting

Rules conflicting with your existing setup? You can override specific rules by adding them after our config:

// eslint.config.js
import {defineConfig} from 'eslint/config';
import {buildConfig} from '@ver0/eslint-config';

export default defineConfig(...buildConfig({globals: 'node'}), {
	rules: {
		'some-rule': 'off', // Override any rule
	},
});

Keywords

eslint

FAQs

Package last updated on 20 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts