Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import playwright from 'eslint-plugin-playwright'
import tsParser from '@typescript-eslint/parser'
import htmlPlugin from '@html-eslint/eslint-plugin'

const playwrightConfig = playwright.configs['flat/recommended']
const htmlRecommendedConfig = htmlPlugin.configs['flat/recommended']

export default [
{
Expand All @@ -28,4 +30,32 @@ export default [
...playwrightConfig,
files: ['playwright/**/*.{ts,tsx,js,jsx}'],
},
{
...htmlRecommendedConfig,
files: ['src/**/*.html'],
},
{
files: ['src/**/*.html'],
plugins: {
'@html-eslint': htmlPlugin,
},
rules: {
// Formatting is delegated to Prettier; keep html-eslint focused on semantics and a11y.
'@html-eslint/indent': 'off',
'@html-eslint/attrs-newline': 'off',
'@html-eslint/element-newline': 'off',
'@html-eslint/no-extra-spacing-attrs': 'off',
'@html-eslint/require-closing-tags': 'off',
'@html-eslint/use-baseline': 'off',
'@html-eslint/require-input-label': 'error',
'@html-eslint/require-button-type': 'error',
'@html-eslint/no-accesskey-attrs': 'error',
'@html-eslint/no-positive-tabindex': 'error',
'@html-eslint/no-invalid-role': 'error',
'@html-eslint/no-redundant-role': 'error',
'@html-eslint/no-abstract-roles': 'error',
'@html-eslint/no-aria-hidden-body': 'error',
'@html-eslint/no-aria-hidden-on-focusable': 'error',
},
},
]
216 changes: 216 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"realtime",
"browser",
"development",
"ide",
"jsx",
"css",
"importmap",
Expand All @@ -34,7 +35,7 @@
"build:importmap-mode": "KNIGHTED_PRIMARY_CDN=importMap npm run build",
"preview": "npm run build && http-server dist -a localhost -p 8081 -c-1 -o index.html",
"check-types": "tsc -p tsconfig.json",
"lint:playwright": "eslint playwright playwright.config.ts",
"lint:playwright": "eslint playwright playwright.config.ts src/index.html",
"test:e2e": "npm run build && PLAYWRIGHT_WEB_SERVER_MODE=preview PLAYWRIGHT_PORT=8081 playwright test",
"test:e2e:dev": "playwright test",
"test:e2e:headed": "npm run build && PLAYWRIGHT_WEB_SERVER_MODE=preview PLAYWRIGHT_PORT=8081 playwright test --headed",
Expand All @@ -43,6 +44,8 @@
"lint": "oxlint src scripts && npm run lint:playwright"
},
"devDependencies": {
"@html-eslint/eslint-plugin": "^0.58.1",
"@html-eslint/parser": "^0.58.1",
"@playwright/test": "^1.58.2",
"@types/node": "^25.5.0",
"@typescript-eslint/parser": "^8.57.1",
Expand Down
Loading
Loading