Skip to content

chore: add linting config#24

Merged
sampotts merged 1 commit intomainfrom
chore/linting
Sep 26, 2025
Merged

chore: add linting config#24
sampotts merged 1 commit intomainfrom
chore/linting

Conversation

@sampotts
Copy link
Copy Markdown
Collaborator

@sampotts sampotts commented Sep 26, 2025

As discussed, this adds an ESLint config using Antfu's config.

Obviously we can tweak rules as we go but I find the defaults a pretty much "best practice".

Initial run of the lint task came up with a few things to fix:

✖ 628 problems (537 errors, 91 warnings)
  465 errors and 1 warning potentially fixable with the `--fix` option.

Enabling it

I've not enabled any automatic stuff yet but I guess we'll want to at a suitable time. This would require changing .vscode/settings.json from:

{
  // At some point, we'll watch to flick this on and uncomment lines 5 & 6 below.
  "eslint.enable": false,
  // Disable the default formatter, use eslint instead
  // "prettier.enable": false,
  // "editor.formatOnSave": false,
}

to:

{
  // Disable the default formatter, use eslint instead
  "prettier.enable": false,
  "editor.formatOnSave": false,
}

and in package.json for the git hooks, by uncommenting:

  • the prepare script (which will add the git hooks)
  • the simple-git-hooks section (which allows us to hook into a commit)
  • the lint-staged section (which allows fixing issues at the staging step of the commit).

@sampotts sampotts requested review from cjpillsbury and mihar-22 and removed request for mihar-22 September 26, 2025 00:05
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