CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-eslint-config-node

tessl install tessl/npm-eslint-config-node@3.0.0

Pluggable ESLint configuration for Node.js that extends ESNext with Node.js-specific safety checks and best practices

Agent Success

Agent success rate when using this tile

73%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.12x

Baseline

Agent success rate without this tile

65%

task.mdevals/scenario-8/

ESLint Configuration Composer

Create a configuration builder that composes layered ESLint rule sets for different JavaScript environments.

Requirements

Build a system that generates ESLint configurations by composing base environment rules with optional style guide rules. Your system should support:

  1. ESNext base configuration - Modern JavaScript linting rules
  2. Node.js configuration - Extends ESNext with server-side rules
  3. Style guide layer - Code formatting rules that layer on top of any base configuration

Each configuration should be a valid ESLint configuration object with:

  • An extends array (for composition)
  • A rules object (for ESLint rule definitions)
  • Standard severity levels: 0 (off), 1 (warn), 2 (error)

Test Cases

  • Creating an ESNext base configuration includes modern JavaScript rules like no-var and prefer-const @test
  • Creating a Node.js configuration properly extends the ESNext configuration and adds Node-specific rules like no-path-concat @test
  • Creating a style guide configuration includes formatting rules like quote preferences and indentation settings @test
  • Composing multiple configurations in an .eslintrc file correctly merges rules from extended configs @test

Implementation

@generates

API

/**
 * Generates an ESNext base configuration with modern JavaScript rules
 * @returns {Object} ESLint configuration object with rules for ES2015+ code
 */
function generateESNextConfig() {
  // IMPLEMENTATION HERE
}

/**
 * Generates a Node.js configuration that extends ESNext
 * @param {string} baseConfigPath - Path to the base configuration to extend
 * @returns {Object} ESLint configuration object with Node.js-specific rules
 */
function generateNodeConfig(baseConfigPath) {
  // IMPLEMENTATION HERE
}

/**
 * Generates a style guide configuration with formatting rules
 * @returns {Object} ESLint configuration object with code style rules
 */
function generateStyleGuideConfig() {
  // IMPLEMENTATION HERE
}

/**
 * Composes multiple ESLint configurations into a single .eslintrc file
 * @param {string[]} configPaths - Array of configuration paths to extend
 * @param {Object} additionalRules - Optional additional rules to override
 * @returns {Object} Combined ESLint configuration object
 */
function composeConfigs(configPaths, additionalRules = {}) {
  // IMPLEMENTATION HERE
}

module.exports = {
  generateESNextConfig,
  generateNodeConfig,
  generateStyleGuideConfig,
  composeConfigs
};

Dependencies { .dependencies }

@kunalgolani/eslint-config { .dependency }

Provides composable ESLint configurations for multiple JavaScript environments including ESNext, Node.js, and style guides.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/eslint-config-node@3.0.x
tile.json