Skip to content

Modernize lint stack and convert to ESM#20

Merged
soulgalore merged 1 commit into
mainfrom
chromedriver-lint-bump
May 20, 2026
Merged

Modernize lint stack and convert to ESM#20
soulgalore merged 1 commit into
mainfrom
chromedriver-lint-bump

Conversation

@soulgalore
Copy link
Copy Markdown
Member

Replace eslint 5 / prettier 1 (2018) with the same flat-config setup that
sitespeed.io uses: eslint 10 + eslint-plugin-unicorn + current
prettier/config-prettier/plugin-prettier. The unicorn rules push the
package away from CommonJS, so flip the package to "type": "module" and
rewrite require/module.exports/__dirname with import/export and
import.meta.url. Browsertime already imports via
await import('@sitespeed.io/chromedriver') and reads .default.binPath(),
which still works under the new exports.

While there, drop the dead eslint-check script that referenced a
non-existent .eslintrc.js, and rely on top-level await in the two CLI
scripts (install.js, check-latest.js) so we can drop the explicit
promise-chain catch wrappers that unicorn flagged.

Co-authored-by: Claude noreply@anthropic.com

  Replace eslint 5 / prettier 1 (2018) with the same flat-config setup that
  sitespeed.io uses: eslint 10 + eslint-plugin-unicorn + current
  prettier/config-prettier/plugin-prettier. The unicorn rules push the
  package away from CommonJS, so flip the package to "type": "module" and
  rewrite require/module.exports/__dirname with import/export and
  import.meta.url. Browsertime already imports via
  await import('@sitespeed.io/chromedriver') and reads .default.binPath(),
  which still works under the new exports.

  While there, drop the dead eslint-check script that referenced a
  non-existent .eslintrc.js, and rely on top-level await in the two CLI
  scripts (install.js, check-latest.js) so we can drop the explicit
  promise-chain catch wrappers that unicorn flagged.

  Co-authored-by: Claude noreply@anthropic.com
@soulgalore soulgalore merged commit 6ddf04e into main May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant