Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint scripts/githooks/check-localstorage-usage.js #3184

Open
palisadoes opened this issue Jan 6, 2025 · 3 comments
Open

Lint scripts/githooks/check-localstorage-usage.js #3184

palisadoes opened this issue Jan 6, 2025 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers test Testing application unapproved

Comments

@palisadoes
Copy link
Contributor

Describe the bug

File scripts/githooks/check-localstorage-usage.js fails eslint and prettier formatting

To Reproduce
Steps to reproduce the behavior:

  1. Run eslint and prettier
  2. Fails

Expected behavior

  • Tests pass

Actual behavior

  • Test fails

Screenshots

image

Additional details

  • N/A

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@palisadoes palisadoes added bug Something isn't working good first issue Good for newcomers labels Jan 6, 2025
@github-actions github-actions bot added test Testing application unapproved labels Jan 6, 2025
@yugal07
Copy link

yugal07 commented Jan 6, 2025

I would like take on this issue. Please assign it to me @palisadoes

@kavyakapoor420
Copy link

Hey @palisadoes @Cioppolo14,

I used the following commands to verify whether the issue was resolved:

npx prettier --write scripts/githooks/check-localstorage-usage.js
npx eslint --fix scripts/githooks/check-localstorage-usage.js

After resolving the error related to the missing return type on the function, I am encountering the following issue when i m verifying

Screenshot

Could you please guide me on how to verify whether the issue has been resolved?

also the extension for the file is .js so how can iexplicitly define return type to function in Javascript ?

@yugal07
Copy link

yugal07 commented Jan 7, 2025

Hello @kavyakapoor420 , That is the issue in this. Prettier format can be resolved easily but for the return type error, we have to oveerride the ts-specific rule of returning type in js files. This can be done via either changing the esling config file to ignore the rule for file with ".js" extention (approach i have used in my PR) or adding some TSDoc in the file and forcing return types for functions. Hope you understood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers test Testing application unapproved
Projects
Status: Backlog
Development

No branches or pull requests

3 participants