tessl install tessl/npm-eslint-config-node@3.0.0Pluggable 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%
Build a Node.js utility that validates and merges ESLint rule configurations with proper severity level handling.
Create a configuration utility that:
Rule configurations are objects where:
0, 1, 2, "off", "warn", or "error"[2, "always"] or ["error", { "max": 100 }]The utility should export a function mergeConfigs that:
config: The merged configuration (normalized to numeric severity)summary: An object with counts: { disabled: <count>, warnings: <count>, errors: <count> }{ "no-console": "error" }, normalizes to { "no-console": 2 } @test{ "no-console": "warn", "no-debugger": "off" }, normalizes to { "no-console": 1, "no-debugger": 0 } @test{ "quotes": ["error", "single"] }, normalizes to { "quotes": [2, "single"] } @test{ "max-len": ["warn", { "code": 80 }] }, normalizes to { "max-len": [1, { "code": 80 }] } @test{ "no-console": 1 } and { "no-console": 2 } results in { "no-console": 2 } @test{ "no-console": 1, "quotes": 2 } and { "no-debugger": 0 } results in { "no-console": 1, "quotes": 2, "no-debugger": 0 } @test{ "no-console": 2, "no-debugger": 1, "no-alert": 0 } produces summary { disabled: 1, warnings: 1, errors: 1 } @test{ "quotes": [2, "single"], "semi": [0, "never"] } correctly counts severities @test3 throws an error @test"invalid" throws an error @test@generates
/**
* Merges multiple ESLint rule configurations with severity normalization.
*
* @param {Array<Object>} configs - Array of ESLint rule configuration objects
* @returns {Object} Object with 'config' (merged rules) and 'summary' (severity counts)
* @throws {Error} If any severity level is invalid
*/
function mergeConfigs(configs) {
// Implementation here
}
module.exports = { mergeConfigs };Provides reference ESLint configuration patterns with multi-level severity settings.
@satisfied-by