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-1/

Array Bracket Spacing Audit

A linting setup that ensures array literals, destructuring patterns, and computed member expressions use symmetrical spacing inside brackets.

Capabilities

Allows even spacing patterns

  • Linting a file containing [1, 2], [1], and items[index] reports no spacing errors when spacing around each bracket pair matches (zero or one space). @test

Rejects uneven arrays

  • Linting code with [1,2 ] or [ 1,2] reports spacing violations for each bracket pair that mixes spacing. @test

Rejects missing spacing in nested literals

  • Linting const grid = [ [1,2], [3, 4] ]; reports spacing errors for nested arrays that do not keep matching spacing around inner brackets. @test

Implementation

@generates

  • Provide a lint configuration that enables the dependency's spacing rule to require matching whitespace on both sides of array brackets in array literals, array patterns, and bracketed member expressions.
  • Include a helper that runs ESLint programmatically with this configuration against provided file paths and returns their diagnostics.

API

export interface LintMessage {
  filePath: string;
  ruleId: string;
  line: number;
  column: number;
  message: string;
}

export async function lintArraySpacing(paths: string[]): Promise<{
  errorCount: number;
  warningCount: number;
  messages: LintMessage[];
}>;

Dependencies { .dependencies }

eslint { .dependency }

Provides the lint engine.

eslint-plugin-standard { .dependency }

Supplies the spacing rule required for array brackets.

Install with Tessl CLI

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

tile.json