CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-eslint-plugin-standard

ESLint plugin providing custom rules for JavaScript Standard Style linting

Overall
score

36%

Evaluation36%

0.58x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-7/

Symmetric Spacing Lint Helper

Build a lint helper that validates symmetric (0 or 1 space) padding around bracketed/braced structures in JavaScript source while ignoring multi-line pairs.

Capabilities

Accepts symmetric padding

  • lintSpacing("const obj={a:[1,2]};\\nconst arr=[1,2];") returns { valid: true, errors: [] }, allowing zero-space padding as long as both sides of each pair match. @test
  • lintSpacing("const obj = { a: [ 1, 2 ] };\\nconst arr = [ 1, 2 ];") returns { valid: true, errors: [] }, allowing single-space padding when both sides of each pair match. @test

Flags asymmetric same-line spacing

  • lintSpacing("const arr = [1, 2 ];") returns { valid: false, errors: [...] } with exactly one reported violation on line 1 for the uneven array brackets. @test
  • lintSpacing("const obj = {a: 1 }; const val = data[ bar];") returns { valid: false, errors: [...] } with two violations: one for the object braces and one for the computed property brackets around bar. @test

Ignores multiline edges

  • lintSpacing("const obj = {\\n items: [1,2]\\n};\\nconst arr = [\\n 1,\\n 2\\n];") returns { valid: true, errors: [] } because spacing checks are skipped when a bracket/brace pair spans multiple lines. @test

Implementation

@generates

API

/**
 * Lints JavaScript source code for symmetric (0 or 1 space) padding around array brackets,
 * object braces, and computed property brackets on the same line.
 *
 * @param {string} source - JavaScript source to lint.
 * @returns {{ valid: boolean, errors: Array<{ line: number, column: number, message: string }> }}
 *          valid is true when all bracket/brace pairs satisfy symmetric spacing;
 *          errors contains one entry per spacing violation with positions from the lint engine.
 */
export function lintSpacing(source) {}

Dependencies { .dependencies }

eslint-plugin-standard { .dependency }

Provides lint rules with an 'either' spacing mode that enforces matching 0-or-1 padding around array brackets, object braces, and computed property brackets on single-line pairs.

Install with Tessl CLI

npx tessl i tessl/npm-eslint-plugin-standard@5.0.0
What are skills?

tile.json