fix: resolve precommit issue
Fixes #99 Added lint-staged to package.json as lint-staged was failing during commit Removed cspell as the flag of cspell was raised even if there was no error. @adithyaakrishna Please look into it.
Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.
Commit c6311aec7723d21e150ae4fa4166e07868301d66
Key changes:
- Removed the
cspellcommand from.lintstagedrc.jsonfile. - Added the
lint-stagedcommand in thepackage.jsonfile.
Potential problems:
- The reason for removing the
cspellcommand is not mentioned in the Pull Request. It would be useful to know whether this was an intentional change and if it affected the project's functionality in any way. - It is unclear why the
lint-stagedcommand was added to thepackage.jsonfile. There is no explanation in the Pull Request.
@Lucif3r-in I dont think this scrip will work, lint-staged should be seperated from scripts in package.json
It should be something like this,
The above is just an example, more info: https://www.npmjs.com/package/lint-staged & https://github.com/okonet/lint-staged
Also lint check seems to fail here, https://github.com/WasmEdge/docs/actions/runs/5312158635/jobs/9616295701?pr=115 👀
@Lucif3r-in I dont think this scrip will work,
lint-stagedshould be seperated from scripts in package.jsonIt should be something like this,
The above is just an example, more info: https://www.npmjs.com/package/lint-staged & https://github.com/okonet/lint-staged
How do I make sure what files to check for eslint?
@Lucif3r-in I dont think this scrip will work,
lint-stagedshould be seperated from scripts in package.json It should be something like this,The above is just an example, more info: https://www.npmjs.com/package/lint-staged & https://github.com/okonet/lint-staged
How do I make sure what files to check for eslint?
"lint-staged": {'*.(js|ts){,x}': 'eslint --cache --fix --ignore-path .gitignore','*.{js,ts,tsx,css,md,html}': 'prettier --write',}@adithyaakrishna
Also lint check seems to fail here, https://github.com/WasmEdge/docs/actions/runs/5312158635/jobs/9616295701?pr=115 👀
Here, I guess I had to run prettier --check
@Lucif3r-in I dont think this scrip will work,
lint-stagedshould be seperated from scripts in package.json It should be something like this,The above is just an example, more info: https://www.npmjs.com/package/lint-staged & https://github.com/okonet/lint-staged
How do I make sure what files to check for eslint?
Look at the suggested changes its already ensuring eslint runs if .ts or .tsx files is changed here you can add js and jsx file here additionally
@Lucif3r-in I dont think this scrip will work,
lint-stagedshould be seperated from scripts in package.json It should be something like this,The above is just an example, more info: https://www.npmjs.com/package/lint-staged & https://github.com/okonet/lint-staged
How do I make sure what files to check for eslint?
Look at the suggested changes its already ensuring eslint runs if .ts or .tsx files is changed here you can add js and jsx file here additionally
I think this is not a suggested change. It was an example, we have to look at the codebase and make changes accordingly. I am working on it. Thanks
Hi @ashutosh-rath02
Please check the CI checks. The Lint failed. Thanks.
