chore: set up ESLint, Prettier, Husky, and lint-staged#50
Open
BRGOVIND wants to merge 1 commit into
Open
Conversation
- 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
|
@BRGOVIND is attempting to deploy a commit to the amFOSS Dev Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sets up the development tooling requested in #11.
.eslintrc.cjsextendingnext/core-web-vitals, with import ordering viasimple-import-sortand Prettier integration (eslint-config-prettier+eslint-plugin-prettier)..prettierrc(single quotes, 2-space, 80 cols,endOfLine: autoto avoid CRLF/LF churn across OSes) and.prettierignoresoformatskipsnode_modules,.next, build output, and lockfiles.eslint --fixandprettier --writeon staged*.{js,jsx,ts,tsx}files.lint:fix,format, andprepare(husky); the existinglint(next lint) still works.simple-import-sort/importsandsimple-import-sort/exports.Tasks from #11
Notes
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).prettier --write .formatting PR if maintainers prefer.Closes #11