Files
playkit/eslint.config.mjs
T
ilia fafb1e9676
CI / skip-ci-check (pull_request) Successful in 19s
CI / release (pull_request) Has been skipped
CI / build-and-test (pull_request) Successful in 55s
CI / secret-scan (pull_request) Successful in 17s
CI / selftest (pull_request) Successful in 54s
Add ESLint gate, actions/redact unit tests; fix README release drift.
- README Release section now matches CI reality: tag push publishes to the
  Gitea npm registry AND creates the Gitea release (was described as
  visibility-only, predating the npm publish step).
- ESLint flat config (eslint + typescript-eslint recommended); `npm run lint`
  is now eslint (typecheck stays separate) and CI build-and-test gates on it.
  One real finding fixed: dead import in src/mail/index.ts.
- New vitest coverage for the previously untested src/browser/actions.ts
  (click/fill retries, safeGoto, waitForUrlHost, assertPublicHost, BasePage
  URL building) and src/logging/redact.ts (redactSecrets).
2026-07-26 15:48:31 -04:00

32 lines
1.0 KiB
JavaScript

// Flat ESLint config — lint the library source (`npx eslint src`).
// Typecheck stays separate (`npm run typecheck`); this catches what tsc doesn't.
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
export default tseslint.config(
{
ignores: ['dist/', 'node_modules/', 'playwright-report/', 'test-results/', 'selftest/demo-site/'],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/**/*.ts'],
languageOptions: {
globals: {
...globals.node,
// Browser globals for code evaluated inside the page (persistentSession, richText).
...globals.browser,
},
},
rules: {
// The kit wraps Playwright objects whose shapes we don't own; `any` is
// still banned by default — allow unused args prefixed with `_`.
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrors: 'none' },
],
},
},
);