Feature and its Use Cases
Is your feature request related to a problem? Please describe.
The CONTRIBUTING.md checklist instructs contributors to run npm run lint before opening a pull request, but the current package.json does not define either a lint or format script.
Running:
currently results in:
npm ERR! Missing script: "lint"
This mismatch creates confusion for new contributors and makes it difficult to maintain consistent code quality across the project.
Describe the solution you'd like
Add standard linting and formatting scripts to package.json so contributors can easily run the same checks locally.
Proposed changes
- Install ESLint and Prettier as development dependencies:
npm install -D eslint prettier eslint-config-prettier eslint-plugin-react
- Add the following scripts to
package.json:
{
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint src/",
"format": "prettier --write src/"
}
}
- Update the ESLint configuration to:
- Extend recommended React rules.
- Disable formatting conflicts with Prettier.
- Update
CONTRIBUTING.md so that the checklist correctly references the new scripts.
Describe alternatives you've considered
-
Removing the npm run lint reference from CONTRIBUTING.md
This would eliminate the confusion, but it would also reduce code quality standards rather than improve them.
-
Using only Prettier without ESLint
While Prettier handles formatting, ESLint helps detect potential issues such as unused variables, missing imports, and other code-quality problems that Prettier cannot catch.
Additional context
The repository already contains an eslint.config.js file, which suggests that ESLint support has been partially set up. It only lacks the corresponding npm scripts and any missing development dependencies.
Once these changes are added, the CONTRIBUTING.md checklist (npm run lint passes) will work as intended and provide a smoother onboarding experience for contributors.
Additional Context
Code of Conduct
Feature and its Use Cases
Is your feature request related to a problem? Please describe.
The
CONTRIBUTING.mdchecklist instructs contributors to runnpm run lintbefore opening a pull request, but the currentpackage.jsondoes not define either alintorformatscript.Running:
currently results in:
This mismatch creates confusion for new contributors and makes it difficult to maintain consistent code quality across the project.
Describe the solution you'd like
Add standard linting and formatting scripts to
package.jsonso contributors can easily run the same checks locally.Proposed changes
package.json:{ "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "lint": "eslint src/", "format": "prettier --write src/" } }CONTRIBUTING.mdso that the checklist correctly references the new scripts.Describe alternatives you've considered
Removing the
npm run lintreference fromCONTRIBUTING.mdThis would eliminate the confusion, but it would also reduce code quality standards rather than improve them.
Using only Prettier without ESLint
While Prettier handles formatting, ESLint helps detect potential issues such as unused variables, missing imports, and other code-quality problems that Prettier cannot catch.
Additional context
The repository already contains an
eslint.config.jsfile, which suggests that ESLint support has been partially set up. It only lacks the corresponding npm scripts and any missing development dependencies.Once these changes are added, the
CONTRIBUTING.mdchecklist (npm run lintpasses) will work as intended and provide a smoother onboarding experience for contributors.Additional Context
Code of Conduct