CtrlK
BlogDocsLog inGet started
Tessl Logo

simon/skills

Auto-generated tile from GitHub (10 skills)

92

1.16x
Quality

94%

Does it follow best practices?

Impact

92%

1.16x

Average score across 44 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-12/

Modernize the Linting Setup for a Node.js Library

Problem/Feature Description

A small open-source Node.js library called envparser has been using the standard package for code style enforcement since 2021. The team has decided to modernize their tooling stack after repeatedly hitting limitations with standard's lack of configurability, its slow integration with IDEs, and incompatibility with several newer ESLint plugins they'd like to adopt.

The library is a pure JavaScript project with some TypeScript type declaration files. It currently has a standard entry in package.json for configuration, a "lint": "standard src/" script, and a .husky/pre-commit hook that runs npx standard --fix src/. There is also a GitHub Actions workflow that runs npm run lint on every pull request.

The team wants to migrate to a modern ESLint v9 setup using neostandard as the Standard-like baseline, while keeping the same code style guarantees. They also want to make sure there is no leftover configuration from the old standard setup once the migration is complete.

Output Specification

Produce the following files in the workspace:

  • package.json — updated with new dependencies, updated lint scripts, and old standard config removed
  • ESLint configuration file(s) appropriate for the new setup
  • .github/workflows/lint.yml — CI workflow that runs lint (read-only, no auto-fix)
  • .husky/pre-commit (or .lintstagedrc.json) — pre-commit hook configuration
  • MIGRATION.md — a brief document describing the steps taken to migrate, including the commands run

Input Files

The following files represent the current state of the project. Extract them before beginning.

=============== FILE: package.json =============== { "name": "envparser", "version": "2.3.1", "description": "Parse and validate environment variables", "main": "src/index.js", "type": "module", "scripts": { "test": "node --test test/.test.js", "lint": "standard src/", "lint:check": "standard src/" }, "standard": { "ignore": ["dist/**"] }, "devDependencies": { "standard": "^17.1.0", "husky": "^9.0.0", "lint-staged": "^15.0.0" }, "lint-staged": { ".js": ["npx standard --fix"] }, "engines": { "node": ">=18" } }

=============== FILE: .github/workflows/lint.yml =============== name: Lint

on: pull_request: push: branches: [main]

jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm ci - run: npm run lint

=============== FILE: src/index.js =============== import { readFileSync } from 'node:fs'

export function parseEnv (filepath) { const content = readFileSync(filepath, 'utf8') const result = {} for (const line of content.split('\n')) { const trimmed = line.trim() if (!trimmed || trimmed.startsWith('#')) continue const eqIdx = trimmed.indexOf('=') if (eqIdx < 0) continue const key = trimmed.slice(0, eqIdx).trim() const value = trimmed.slice(eqIdx + 1).trim() result[key] = value } return result }

evals

README.md

tile.json