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

Prettier and linting should be consistent across all repos (and agree with each other) #200

Open
Peeja opened this issue Dec 2, 2024 · 1 comment
Labels
refactor refactor

Comments

@Peeja
Copy link
Member

Peeja commented Dec 2, 2024

Note: Given we're planning to move to (a) monorepo(s), this should probably wait for that. It's a lot easier to do this in one (or fewer) repo(s).

Acceptance Criteria

  1. Every JS/TS repo uses the same Prettier config.
  2. Every JS/TS repo uses the same lint config, at least for stylistic rules2
  3. The Prettier and ESLint rules don't conflict.
  4. Files can be formatted correctly on save by an editor.
  5. Failing to format files breaks CI.
  6. We don't depend on hd-scripts, which we have too little control over.
  7. Lint warnings fail the build.
    • @Peeja's reasoning:
      • Errors should represent likely incorrect behavior—code that's actually broken.
      • Warnings should represent code which is confusing, less performant than it could be, or otherwise out of line with our house style, but which behaves as intended when run.
      • Either should fail CI, because we don't want to merge either to main.
      • The difference is simply what the linter communicates to the author. In particular, it's more likely to be correct to lint-ignore a warning, while lint-ignoring an error is a signal that something bad may be happening.
@Peeja Peeja converted this from a draft issue Dec 2, 2024
@Peeja Peeja added the refactor refactor label Dec 2, 2024
@Peeja
Copy link
Member Author

Peeja commented Dec 2, 2024

(I've thrown a bunch of things in here which could be broken apart, either for granularity or because we don't all agree on all of them.)

@hannahhoward hannahhoward moved this from Inbox to 2024 Holiday Hackathon! in Storacha Project Planning Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor refactor
Projects
Status: 2024 Holiday Hackathon!
Development

No branches or pull requests

1 participant