Skip to content

site/ declares five ESLint packages it never runs #180

Description

@The-Running-Dev

What changes, and for whom. site/ stops declaring five ESLint packages it never runs. Contributors get an install that matches what the project actually uses, and nobody has to work out which of two linters is authoritative.

Why now. Noticed while reading site/package.json for #179. It is unrelated to that migration and was deliberately kept out of it.

Current implementation facts

  • site/package.json lint is oxlint. Configuration lives in site/.oxlintrc.json.
  • There is no eslint.config.js, eslint.config.mjs, .eslintrc* or eslintConfig field anywhere under site/.
  • No site/ script invokes eslint, and no workflow does either.
  • site/package.json nonetheless declares five ESLint devDependencies: eslint, @eslint/js, typescript-eslint, eslint-plugin-react-hooks, eslint-plugin-react-refresh.
  • The overlap is partly real: .oxlintrc.json enables react/rules-of-hooks and react/only-export-components, which are the oxlint equivalents of the two plugins listed. The rules are covered; the packages are not what covers them.
  • src/engine/ has its own real eslint.config.js carrying the determinism guard, and is out of scope here.

Suggested implementation

  1. Confirm nothing under site/ resolves any of the five — including transitively through a config this issue has not found.
  2. Remove them from site/package.json and regenerate site/package-lock.json; both docs workflows run npm --prefix site ci, so the lock must stay in sync.
  3. Run npm --prefix site run check from a clean install.

If instead ESLint is meant to run in site/ and the configuration is what went missing, this issue is wrong and should be closed in favour of one that adds the config. Decide which before removing anything.

Done when

  • site/package.json declares no ESLint package that no site/ script or configuration uses.
  • site/package-lock.json is regenerated and npm --prefix site ci succeeds from a clean clone.
  • npm --prefix site run check passes with the same rules enforced as before — oxlint's react/rules-of-hooks and react/only-export-components still run and still fail on a violation.
  • No lint coverage is lost: a hooks-order violation and a mixed component/constant export are each still reported.

Non-goals

  • Changing which linter site/ uses, or its rule set.
  • Anything under src/engine/, whose ESLint configuration and determinism guard are real and load-bearing.
  • Any change to site/ sources, build, or the landing-page package migration in W69 — Consume the Reusable Landing-Page Package #179.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions