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

chore : cat no console es lint rule added to pkgs with minimal/no changes #3054

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

samika98
Copy link
Contributor

@samika98 samika98 commented Dec 4, 2023

Description

es-lint rule for no direct access to console added. This will deny direct access to console from the code.
This PR includes packages in js-ceramic codebase that required minimal changes.
PRs for this are broken down into 3 PRS :

  1. PR with minimal code changes - packages where direct console access was minimal. (This PR)
  2. PR for CLI - wip
  3. PR for common, strem-tests, blockchain-utils-linking, logging, indexing - wip

How Has This Been Tested?

Ran npm run lint on the packages where this rule has been added and corrected code that was not following the standard.

PR checklist

Before submitting this PR, please make sure:

  • [ Yes ] I have tagged the relevant reviewers and interested parties
  • [ Not required] I have updated the READMEs of affected packages
  • [ Not required] I have made corresponding changes to the documentation

References:

https://eslint.org/docs/latest/rules/no-console -- es lint rule for denying direct access to console

Copy link

linear bot commented Dec 4, 2023

@samika98 samika98 changed the title no console es lint rule added to pkgs with minimal/no changes chore : cat no console es lint rule added to pkgs with minimal/no changes Dec 4, 2023
@@ -9,10 +9,14 @@ import { KeyringPair } from '@polkadot/keyring/types'
import { DispatchError } from '@polkadot/types/interfaces'
import { ITuple } from '@polkadot/types/types'
import { SubmittableExtrinsic } from '@polkadot/api/promise/types'
import { LoggerProvider } from '@ceramicnetwork/common'
Copy link
Contributor Author

@samika98 samika98 Dec 7, 2023

Choose a reason for hiding this comment

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

Code Change here, in this file

@@ -1,11 +1,14 @@
#!/usr/bin/env node

import { IpfsDaemon } from '../ipfs-daemon.js'
import { LoggerProvider } from '@ceramicnetwork/common'
Copy link
Contributor Author

@samika98 samika98 Dec 7, 2023

Choose a reason for hiding this comment

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

Code change here, in this file. Let me know if we want to keep console.log in the http-client library, or changing it with the logger is better

@samika98
Copy link
Contributor Author

samika98 commented Dec 7, 2023

Changes are mostly in the eslint file. There are 2 code changes in the PR, they are marked with comments for easier reviewing.

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.

None yet

1 participant