Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint everything #1076

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Lint everything #1076

wants to merge 4 commits into from

Commits on Nov 14, 2024

  1. Make npm run lint lint everything

    `npm run build` applies to everything, so the lint script should as
    well.
    victorlin committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    1ebb0a9 View commit details
    Browse the repository at this point in the history
  2. Apply ESLint rules from top-level to static-site

    These were intentionally not applied in "static-site: Configure and use
    ESLint" (1104d14) by myself, but I don't see a good reason why. It
    makes more sense to apply the same baseline rules to all JS/TS code in
    this repository, with added React-specific rules for static-site.
    victorlin committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    b4724ba View commit details
    Browse the repository at this point in the history
  3. Enforce usage of type-safe equality operators

    Using == / != is a source of bugs.
    
    Rule doc page: https://eslint.org/docs/latest/rules/eqeqeq
    victorlin committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    1bbf263 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. Relax no-use-before-define rule for TS/React files

    Reasoning in comments.
    
    For TypeScript files, it's not clear to me why
    @typescript-eslint/no-use-before-define defaults to `typedefs: true`:
    <https://typescript-eslint.io/rules/no-use-before-define#typedefs>
    victorlin committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    95b0ec0 View commit details
    Browse the repository at this point in the history