CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--plugin-proposal-object-rest-spread

Babel plugin that transforms ECMAScript object rest and spread syntax into ES5-compatible code.

85

1.06x

Quality

Pending

Does it follow best practices?

Impact

85%

1.06x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

task.mdevals/scenario-10/

Build Configuration Optimizer

Create a configuration optimization tool that analyzes modern JavaScript code and generates optimized build configurations with appropriate compilation assumptions.

Capabilities

Configuration Generation

  • Given a source file path and target browsers, generates a configuration object with appropriate assumptions @test
  • Returns a configuration with at least 3 different assumption options based on code analysis @test
  • Includes proper targets configuration for specified browsers @test

Code Analysis

  • Analyzes source code to detect which assumptions can be safely enabled @test
  • Detects class usage patterns to recommend class-related assumptions @test

Optimization Reporting

  • Returns a report object containing both the configuration and reasoning for each assumption @test
  • Report includes estimated bundle size impact for each enabled assumption @test

Implementation

@generates

API

/**
 * Analyzes source code and generates an optimized build configuration
 * with appropriate assumptions for the given target environments.
 *
 * @param {string} sourceFile - Path to the source file to analyze
 * @param {string[]} targets - Array of target browser/environment strings (e.g., ['chrome 90', 'firefox 88'])
 * @returns {Object} Configuration object with assumptions and targets
 */
function generateOptimizedConfig(sourceFile, targets) {
  // IMPLEMENTATION HERE
}

/**
 * Analyzes source code and provides a detailed optimization report
 * including recommended assumptions and their impact.
 *
 * @param {string} sourceFile - Path to the source file to analyze
 * @param {string[]} targets - Array of target browser/environment strings
 * @returns {Object} Report object with config, reasoning, and size estimates
 */
function analyzeAndReport(sourceFile, targets) {
  // IMPLEMENTATION HERE
}

module.exports = {
  generateOptimizedConfig,
  analyzeAndReport
};

Dependencies { .dependencies }

@babel/core { .dependency }

Provides the core transformation and configuration functionality.

@babel/parser { .dependency }

Provides JavaScript parsing capabilities for code analysis.

tile.json