JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 468
  • Score
    100M100P100Q76433F
  • License MIT

Reusable ESLint flat config and git-hook toolkit for Archipelago projects

Package Exports

  • @archpublicwebsite/eslint-config
  • @archpublicwebsite/eslint-config/tools/git-hooks/commit-msg.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/generate-commit-message.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/post-commit.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/pre-commit.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/prepare-commit-msg.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/shared.mjs
  • @archpublicwebsite/eslint-config/tools/git-hooks/verify-commit-message.mjs
  • @archpublicwebsite/eslint-config/tools/setup/install.mjs

Readme

eslint-config

Reusable ESLint + Git hooks toolkit for Nuxt/Vue projects.

Publish

cd packages/eslint-config
pnpm version patch
npm publish --access public

Quick checks before publish:

  • Ensure .npmrc points to public npm registry.
  • Run npm pack --dry-run and verify only eslint.config.mjs, tools/, and README.md are included.

Install

pnpm add -Dw eslint-config

Required dependencies (consumer project)

This toolkit expects these dev dependencies to exist in the project that installs it:

pnpm add -D lint-staged prettier turbo
  • lint-staged is used by the generated pre-commit hook.
  • prettier is used by the lint:fix flow.
  • turbo is used by the required lint:check / lint:fix scripts.

On install, this package automatically sets up in your project root:

  • .hooks/pre-commit
  • .hooks/prepare-commit-msg
  • .hooks/commit-msg
  • .hooks/post-commit
  • eslint.config.mjs (if not present)
  • .prettierrc plugin entry for prettier-plugin-tailwindcss
  • git config core.hooksPath .hooks (when in a git repo)

What this package provides

  • eslint.config.mjs builder via createArchipelagoConfig
  • Reusable git hook handlers in tools/git-hooks/
    • pre-commit.mjs
    • prepare-commit-msg.mjs
    • commit-msg.mjs
    • post-commit.mjs
    • generate-commit-message.mjs
    • verify-commit-message.mjs
    • tools/setup/install.mjs automatic project bootstrap

ESLint usage

Auto-generated eslint.config.mjs uses this package directly:

import { createArchipelagoConfig } from 'eslint-config'

export default createArchipelagoConfig()

Override rules

You can override any rule in your root eslint.config.mjs:

import { createArchipelagoConfig } from 'eslint-config'

export default createArchipelagoConfig({
  name: 'project/overrides',
  rules: {
    'no-console': 'off',
    'vue/max-attributes-per-line': 'off',
  },
})

Manual setup (optional)

Automatic setup is the default. If needed, you can still run setup manually:

node node_modules/eslint-config/tools/setup/install.mjs

Hook wrappers reference

Root .hooks scripts should delegate to installed package path:

  • .hooks/pre-commit
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node node_modules/eslint-config/tools/git-hooks/pre-commit.mjs
  • .hooks/prepare-commit-msg
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node node_modules/eslint-config/tools/git-hooks/prepare-commit-msg.mjs "$@"
  • .hooks/commit-msg
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node node_modules/eslint-config/tools/git-hooks/commit-msg.mjs "$1"
  • .hooks/post-commit
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node node_modules/eslint-config/tools/git-hooks/post-commit.mjs

Required root scripts

{
  "scripts": {
    "lint": "pnpm lint:fix",
    "lint:check": "turbo run lint",
    "lint:fix": "((pnpm format || true) && turbo run lint --continue=always -- --fix) || true"
  },
  "lint-staged": {
    "*.{js,ts,tsx,vue}": ["eslint --fix"]
  }
}