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

[eslint] prefer object dot notation #4975

Closed
wants to merge 1 commit into from
Closed

[eslint] prefer object dot notation #4975

wants to merge 1 commit into from

Conversation

dimaMachina
Copy link
Collaborator

No description provided.

Copy link

changeset-bot bot commented Jun 13, 2024

⚠️ No Changeset found

Latest commit: 33933b2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -3 to +2
return Boolean(
typeof window !== 'undefined' && '__ENV' in window && window['__ENV'] !== undefined,
);
function isBrowser(): boolean {
return typeof window !== 'undefined' && '__ENV' in window && window.__ENV !== undefined;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unneeded cast to boolean

Copy link
Contributor

📚 Storybook Deployment

The latest changes are available as preview in: https://2ccaf746.hive-storybook.pages.dev

Copy link
Contributor

🐋 This PR was built and pushed to the following Docker images (tag: 33933b2d29ec72108604d3c5736a76749d7ae6ad):

Docker Bake metadata
{
"app": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/v3qwj16xa5gd9lqhabxhhs6dp",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:b6fbbbac2f6d5d1653ba2279ec64e85df056947ac23f542778cddc021e3324cf",
    "size": 685
  },
  "containerimage.digest": "sha256:b6fbbbac2f6d5d1653ba2279ec64e85df056947ac23f542778cddc021e3324cf",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/app:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/app:dot_notation"
},
"composition-federation-2": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/9opt8bnz2ln2fcv56puxizg11",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:edbb871cbb421a7347d3aa11880555b97d3e3cf82025befe20273a2afc71dd40",
    "size": 685
  },
  "containerimage.digest": "sha256:edbb871cbb421a7347d3aa11880555b97d3e3cf82025befe20273a2afc71dd40",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:dot_notation"
},
"emails": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/3rp464xe4phbif8drl6yrfjsc",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:324814c93980ce0ae46ccfdc727db49c0c13fc6609340d3784c5bbe6784d9825",
    "size": 685
  },
  "containerimage.digest": "sha256:324814c93980ce0ae46ccfdc727db49c0c13fc6609340d3784c5bbe6784d9825",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/emails:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/emails:dot_notation"
},
"policy": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/qgvjp5osx9znjx0b0zunaitq5",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:70df12db6d089a8ff4f7f40d5c90c43b26a3c5973344ee9821306c7dc81f3dce",
    "size": 685
  },
  "containerimage.digest": "sha256:70df12db6d089a8ff4f7f40d5c90c43b26a3c5973344ee9821306c7dc81f3dce",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/policy:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/policy:dot_notation"
},
"rate-limit": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/579v9kgi9x9tr344obtuovqnv",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:c0fe1c4da163a772315f41cad64d92aa452e3ce164acdd912daab50936e872f1",
    "size": 685
  },
  "containerimage.digest": "sha256:c0fe1c4da163a772315f41cad64d92aa452e3ce164acdd912daab50936e872f1",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/rate-limit:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/rate-limit:dot_notation"
},
"schema": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/ou9ictmodeqf0aobed8k5x1wb",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:c780c261483644777d9e37a89ecbe54f20e8c5c19f7c319307a7b8c9aa85af2e",
    "size": 685
  },
  "containerimage.digest": "sha256:c780c261483644777d9e37a89ecbe54f20e8c5c19f7c319307a7b8c9aa85af2e",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/schema:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/schema:dot_notation"
},
"server": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/fc6wsdzqnl4but2fdd6po1h41",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:839d7044303add7f9c7d0be9ea6b68490f8ee620b6ebc48fad327886cb5b6681",
    "size": 685
  },
  "containerimage.digest": "sha256:839d7044303add7f9c7d0be9ea6b68490f8ee620b6ebc48fad327886cb5b6681",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/server:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/server:dot_notation"
},
"storage": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/09ytzvj5qqnx1tss6k57q0w74",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:a3fee3aad2f630de452e51ce5362e35ed95a2fb31968a28223a9ad63c0bf1543",
    "size": 685
  },
  "containerimage.digest": "sha256:a3fee3aad2f630de452e51ce5362e35ed95a2fb31968a28223a9ad63c0bf1543",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/storage:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/storage:dot_notation"
},
"stripe-billing": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/3dmi08wxt34z0vsit0c3od41m",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:7a34ec0a891bd9ab4f6ecc372dc817e9e00b2fd1fb6282b72b9e71fcafa07ff1",
    "size": 685
  },
  "containerimage.digest": "sha256:7a34ec0a891bd9ab4f6ecc372dc817e9e00b2fd1fb6282b72b9e71fcafa07ff1",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/stripe-billing:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/stripe-billing:dot_notation"
},
"tokens": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/t8kwy1btows6nq8hklxwj4xao",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:1963790aa5ac141e2e1888616cc7492f22cd5520b9f6217b4e48248c1118b5d9",
    "size": 685
  },
  "containerimage.digest": "sha256:1963790aa5ac141e2e1888616cc7492f22cd5520b9f6217b4e48248c1118b5d9",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/tokens:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/tokens:dot_notation"
},
"usage": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/x51e399wplvip8pnd2cngopqb",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:2c62c29dc501637eb8e9caa255dd1b1aeec0ebc8a01a349618630a20c309ebf2",
    "size": 685
  },
  "containerimage.digest": "sha256:2c62c29dc501637eb8e9caa255dd1b1aeec0ebc8a01a349618630a20c309ebf2",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/usage:dot_notation"
},
"usage-estimator": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/q16dz2mkt67ci3zzv4lepkana",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:011fe4892fdffc0506238c744e24c53f356b1eed8c381b78f63f107c4340a2fb",
    "size": 685
  },
  "containerimage.digest": "sha256:011fe4892fdffc0506238c744e24c53f356b1eed8c381b78f63f107c4340a2fb",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-estimator:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/usage-estimator:dot_notation"
},
"usage-ingestor": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/xt9yk2rwyvxbmqewjcazg502s",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:0b978f8bcf0c47c8b4be294294440db6b93f901f01e335671661b9ad3de6c377",
    "size": 685
  },
  "containerimage.digest": "sha256:0b978f8bcf0c47c8b4be294294440db6b93f901f01e335671661b9ad3de6c377",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:dot_notation"
},
"webhooks": {
  "buildx.build.ref": "builder-a6b97a2f-f632-4815-8de7-d67d08ce9169/builder-a6b97a2f-f632-4815-8de7-d67d08ce91690/m7pmsn408hdoue8wcbgx9atac",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:c3e4989df45629e70c56cafb6f8496982dad93c41bbb1b479decc7f8c6b26b0c",
    "size": 685
  },
  "containerimage.digest": "sha256:c3e4989df45629e70c56cafb6f8496982dad93c41bbb1b479decc7f8c6b26b0c",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/webhooks:33933b2d29ec72108604d3c5736a76749d7ae6ad,ghcr.io/kamilkisiela/graphql-hive/webhooks:dot_notation"
}
}

@kamilkisiela
Copy link
Owner

I will merge it if you give me two arguments how it affects Hive users :)

@dimaMachina
Copy link
Collaborator Author

  • is easier to read
  • less verbose
  • works better with aggressive JavaScript minimizers

@kamilkisiela
Copy link
Owner

is easier to read
less verbose

just a personal preference

works better with aggressive JavaScript minimizers
we don't really care about 20b improvement in bundle size

not enough to add new eslint rules, I'm sorry

@kamilkisiela kamilkisiela deleted the dot-notation branch July 10, 2024 10:06
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

2 participants