Tooling:
- ESLint 9 flat config (eslint.config.mjs) with three scopes:
- browser vanilla JS for js/ (no modules, window globals)
- Node ESM for scripts/
- typescript-eslint for tests/ and *.ts
- Stylelint with a deliberately minimal "bug-only" ruleset
(block-no-empty, color-no-invalid-hex, function-no-unknown,
property-no-unknown, …) — no nags about compact handwritten CSS
- html-validate against index.html (DOCTYPE, accessible names,
non-redundant ARIA roles, valid landmark usage)
- TypeScript --noEmit strict on playwright.config.ts + tests/*.ts
npm scripts:
- lint — parallel run of lint:js, lint:css, lint:html (~3s)
- lint:js{,:fix}, lint:css{,:fix}, lint:html
- typecheck — tsc --noEmit
- check — lint + typecheck + test in parallel (CI entry point)
Fixes uncovered by the new checks:
- js/app.js: drop unused `activeTimers`, drop unused `t` lookup in
refreshTreeRow, switch `activeTags` let→const, replace empty
`catch(_)` blocks with parameter-less catch + intent comment
- js/data.js: drop unused index arg in renderExperience
- index.html: uppercase DOCTYPE, drop redundant role="banner" /
role="contentinfo" on <header>/<footer>, add aria-labels on icon-only
Stop / Reset buttons, add role="group" to the tag bar so its
aria-label is valid, add explicit type="button" everywhere
- tests/portfolio.spec.ts: landmark test now uses getByRole() rather
than the explicit [role="banner"] attribute selector
Housekeeping:
- .gitignore picks up .eslintcache / .stylelintcache / *.tsbuildinfo
- README documents the lint + check toolchain
Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
1.1 KiB
JSON
34 lines
1.1 KiB
JSON
{
|
|
"name": "portfolio-tests",
|
|
"private": true,
|
|
"description": "Playwright tests for iliadobkin.com — the portfolio that looks like a Playwright report, tested by actual Playwright.",
|
|
"scripts": {
|
|
"test": "playwright test",
|
|
"test:headed": "playwright test --headed",
|
|
"test:ui": "playwright test --ui",
|
|
"report": "playwright show-report",
|
|
"lint": "npm-run-all -p lint:js lint:css lint:html",
|
|
"lint:js": "eslint .",
|
|
"lint:js:fix": "eslint . --fix",
|
|
"lint:css": "stylelint \"css/**/*.css\"",
|
|
"lint:css:fix": "stylelint \"css/**/*.css\" --fix",
|
|
"lint:html": "html-validate index.html",
|
|
"typecheck": "tsc --noEmit",
|
|
"check": "npm-run-all -p lint typecheck test"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@playwright/test": "^1.52.0",
|
|
"@types/node": "^25.7.0",
|
|
"eslint": "^10.3.0",
|
|
"globals": "^17.6.0",
|
|
"html-validate": "^11.0.0",
|
|
"npm-run-all2": "^8.0.4",
|
|
"serve": "^14.2.6",
|
|
"stylelint": "^17.11.0",
|
|
"stylelint-config-standard": "^40.0.0",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.59.3"
|
|
}
|
|
}
|