Auto-generated tile from GitHub (10 skills)
92
94%
Does it follow best practices?
Impact
92%
1.16xAverage score across 44 eval scenarios
Advisory
Suggest reviewing before use
The inventory service is a small Node.js library that's been growing fast. There are now several contributors and nobody agrees on indentation, semicolons, or spacing conventions. Code review is full of style comments that slow down meaningful feedback, and a couple of subtle bugs slipped through recently that a linter would have caught.
The team lead has decided it's time to add proper linting. They want a modern ESLint setup that enforces Standard-like code style as a baseline, with optional TypeScript support. The project has both .js and .ts source files, and already has a .gitignore so the team is particular about not linting build artifacts and node_modules.
Your task is to add linting to the project by creating the configuration and updating the project metadata so that any contributor can run linting with a single command.
Produce the following files in your working directory, starting from the provided project skeleton:
package.json — updated with linting devDependencies and lint scriptseslint.config.js — the ESLint configuration filesetup-lint.sh — a short shell script that installs dependencies and verifies the linter runs without crashing (i.e. npx eslint . exits 0 or only reports lint violations, not config errors)The shell script should be executable and should work from a fresh environment where npm install has not yet been run.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: package.json =============== { "name": "inventory-service", "version": "1.0.0", "description": "A Node.js inventory management library", "main": "index.js", "type": "module", "scripts": { "test": "node --test" }, "devDependencies": {} }
=============== FILE: index.js =============== export function getItem(id) { return { id, name: 'Widget', stock: 42 } }
export function updateStock(id,qty) { if(qty < 0) throw new Error('negative stock') return { id, qty } }
=============== FILE: index.ts =============== export interface Item { id: string name: string stock: number }
export function getItem(id: string): Item { return { id, name: 'Widget', stock: 42 } }
=============== FILE: .gitignore =============== node_modules/ dist/ coverage/ *.log
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
skills
documentation
fastify
init
linting-neostandard-eslint9
node
nodejs-core
rules
oauth
octocat
snipgrapher