Skip to content

chore: set up ESLint, Prettier, Husky, and lint-staged#50

Open
BRGOVIND wants to merge 1 commit into
amfoss:developfrom
BRGOVIND:issue/11-dev-tooling
Open

chore: set up ESLint, Prettier, Husky, and lint-staged#50
BRGOVIND wants to merge 1 commit into
amfoss:developfrom
BRGOVIND:issue/11-dev-tooling

Conversation

@BRGOVIND

Copy link
Copy Markdown

Summary

Sets up the development tooling requested in #11.

  • ESLint.eslintrc.cjs extending next/core-web-vitals, with import ordering via simple-import-sort and Prettier integration (eslint-config-prettier + eslint-plugin-prettier).
  • Prettier.prettierrc (single quotes, 2-space, 80 cols, endOfLine: auto to avoid CRLF/LF churn across OSes) and .prettierignore so format skips node_modules, .next, build output, and lockfiles.
  • Husky + lint-staged — a v9 pre-commit hook runs eslint --fix and prettier --write on staged *.{js,jsx,ts,tsx} files.
  • Scripts — added lint:fix, format, and prepare (husky); the existing lint (next lint) still works.
  • Import ordering — enforced via simple-import-sort/imports and simple-import-sort/exports.

Tasks from #11

  • Setup and configure ESLint
  • Create a configuration file for Prettier
  • Set up Husky and lint-staged for pre-commit hooks
  • Add import ordering rules

Notes

  • Pinned to eslint@^8.57.0 / [email protected] to match the project's Next 14 setup (the eslintrc-style config relies on the Next 14 shareable config's parser).
  • This PR only adds the tooling; existing files are not mass-reformatted. They'll be formatted incrementally as they're touched via the pre-commit hook. Happy to follow up with a one-time prettier --write . formatting PR if maintainers prefer.

Closes #11

- Add ESLint config (.eslintrc.cjs) extending next/core-web-vitals with
  import sorting (simple-import-sort) and Prettier integration
- Add Prettier config (.prettierrc) and .prettierignore
- Add lint-staged config to run eslint --fix and prettier --write on
  staged JS/JSX files via a Husky v9 pre-commit hook
- Add lint:fix, format, and prepare scripts plus the required devDependencies

Closes amfoss#11
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@BRGOVIND is attempting to deploy a commit to the amFOSS Dev Team on Vercel.

A member of the Team first needs to authorize it.

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.

Set up ESLint, Prettier, and additional configurations

1 participant