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

Fix linting errors #32

Merged
merged 17 commits into from
Feb 22, 2024
Merged

Fix linting errors #32

merged 17 commits into from
Feb 22, 2024

Conversation

argahsuknesib
Copy link
Collaborator

@argahsuknesib argahsuknesib commented Feb 19, 2024

The pull request corresponds to the issue 30 on the repository.

I fixed the linting issues in the repository. The unit tests are still a work in progress which I will fix and add with another pull request after the linting errors are reviewed.

Running the command,

npm run lint:ts

currently gives,

✖ 267 problems (0 errors, 267 warnings)

The warnings are documentation warnings with JSDoc which aren't important to resolve at the current moment (please correct me on this) and will be resolved in future.

Copy link
Contributor

@pheyvaer pheyvaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folder .idea is personal to your setup and doesn't belong in the repo.

@argahsuknesib
Copy link
Collaborator Author

Thanks for pointing it out @pheyvaer, I changed the IDE but forgot to add the personal setup of the IDE into the .gitignore file.

@pheyvaer pheyvaer self-requested a review February 19, 2024 19:08
@argahsuknesib argahsuknesib linked an issue Feb 20, 2024 that may be closed by this pull request
@pheyvaer
Copy link
Contributor

The warnings are documentation warnings with JSDoc which aren't important to resolve at the current moment (please correct me on this) and will be resolved in future.

The documentation is the main reason why I added linting 😄 So yes they have to be fixed.

@argahsuknesib argahsuknesib requested review from pheyvaer and removed request for pheyvaer February 20, 2024 14:52
@argahsuknesib
Copy link
Collaborator Author

Running,

npm run lint:ts

will give no errors or warnings now.

@pheyvaer
Copy link
Contributor

@argahsuknesib We also need to docs for the classes and their methods. Can you fix that as well? I updated the lint config for that.

@argahsuknesib
Copy link
Collaborator Author

I got another 126 JSDoc comment warnings, I will get rid of the warnings with another commit and reassign you to review. Thanks @pheyvaer !

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs don't belong in a repo, unless there is very specific reason why they should be.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add them to .gitignore

package.json Outdated
"test": "jest --coverage",
"test:watch": "jest --watch",
"start-solid-server": "cd scripts && rm -rf data/.internal/accounts && npx community-solid-server --config ./pod/config/unsafe.json -f ./data/ --seededPodConfigJson ./pod/pod_credentials.json -w 0",
"restart-solid-server": "cd scripts && npx community-solid-server --config ./pod/config/unsafe.json -f ./data/ -w 0",
"start-solid-server-extended-lock": "cd scripts && rm -rf data/.internal/ && npx community-solid-server --config ./pod/config/extendedlock.json -f ./data/ --seededPodConfigJson ./pod/pod_credentials.json",
"test-run": "cd scripts && rm -rf data/.internal/ && npx community-solid-server --config ./pod/config/auth.json -f ./data/ --seededPodConfigJson ./pod/pod_credentials.json --workers 1",
"lint:ts": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0",
"lint:ts:fix": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0 --fix"
"lint:ts:fix": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0 --fix",
"lint:no:warning": "eslint . --ext ts --quiet --max-warnings 0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To stay in line with the other commands this should be lint:ts:no-warning.

scratch/test.ts Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do scratch files belong in the repo? Is this a scratch file created by your IDE maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scratch files are created by me, in which I test some code. But they don't belong in the repo and I added them to .gitignore.

src/server/HTTPServer.ts Show resolved Hide resolved
query_registry.delete_all_queries_from_the_registry();
});

it('delete_all_queries_from_the_registry', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is with underscores in the name, but the previous one is not. This should be consist for all tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks, will do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can fix that in the PR where you add/change your tests.

@pheyvaer
Copy link
Contributor

I got another 126 JSDoc comment warnings, I will get rid of the warnings with another commit and reassign you to review. Thanks @pheyvaer !

Ok, great! I also added some minor comments of things that I noticed.

@argahsuknesib
Copy link
Collaborator Author

argahsuknesib commented Feb 22, 2024

I am working on the tests right now @pheyvaer, should I re-request a review when the coverage is 100%? (as the linting errors are fixed now)

@pheyvaer
Copy link
Contributor

I am working on the tests right now @pheyvaer, should I re-request a review when the coverage is 100%? (as the linting errors are fixed now)

This PR is only for linting errors. So if you are changing/adding tests then this should happen in a separate branch. The linting errors for the tests that are already in this PR should be covered yes.

README.md Outdated Show resolved Hide resolved
src/server/HTTPServer.ts Show resolved Hide resolved
src/utils/ldes-in-ldp/Util.ts Outdated Show resolved Hide resolved
query_registry.delete_all_queries_from_the_registry();
});

it('delete_all_queries_from_the_registry', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can fix that in the PR where you add/change your tests.

@argahsuknesib argahsuknesib merged commit 9e6233d into master Feb 22, 2024
2 checks passed
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.

Fix linting errors
2 participants