CtrlK
BlogDocsLog inGet started
Tessl Logo

mcollina/linting-neostandard-eslint9

Configures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` package. Use when you need to set up or fix linting with `eslint.config.js` or `eslint.config.mjs`, troubleshoot lint errors, configure neostandard rules, migrate from `.eslintrc` to flat config, or integrate linting into CI pipelines and pre-commit hooks.

96

1.25x
Quality

95%

Does it follow best practices?

Impact

97%

1.25x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-5/

Add Linting to a TypeScript Library

Problem/Feature Description

A small open source TypeScript library (string-utils) has recently been published to npm. The team wants to add consistent code quality tooling before accepting community contributions. They've heard that neostandard provides a Standard-like baseline that works well with ESLint v9's modern flat config system, and they want to adopt it.

The project currently has no linting configuration at all — just a tsconfig.json, source files in src/, and a package.json with a build script. The team wants a complete linting setup that: enforces consistent code style across .ts files, can be run manually by contributors, and gives clear errors rather than silently applying fixes.

Output Specification

Produce or modify the following files in-place:

  • package.json — updated with necessary devDependencies and npm scripts for linting
  • eslint.config.js or eslint.config.mjs — the ESLint flat config using neostandard as the base, with TypeScript support enabled
  • A short LINTING.md file documenting: how to run the linter, what the config does, and why TypeScript support was enabled

Do NOT run npm install — just produce the correctly updated files. The grader will inspect the file contents.

Input Files

The following files are provided as inputs. Extract them before beginning.

=============== FILE: package.json =============== { "name": "string-utils", "version": "1.0.0", "description": "Utility functions for string manipulation", "main": "dist/index.js", "types": "dist/index.d.ts", "type": "module", "scripts": { "build": "tsc" }, "devDependencies": { "typescript": "^5.4.0" } }

=============== FILE: tsconfig.json =============== { "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "outDir": "dist", "declaration": true, "strict": true }, "include": ["src/**/*.ts"] }

=============== FILE: src/index.ts =============== export function capitalize(s: string): string { if (!s) return s return s.charAt(0).toUpperCase() + s.slice(1) }

export function truncate(s: string, maxLen: number): string { if (s.length <= maxLen) return s return s.slice(0, maxLen) + '...' }

evals

SKILL.md

tile.json