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

refactor(container-runtime): Enable various eslint rules from our "recommended" config and fix violations #23609

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

Josmithr
Copy link
Contributor

@Josmithr Josmithr commented Jan 17, 2025

One in a series of PRs working towards migrating the package to our recommended config.

Enables the following rules, which are included in our "recommended" config:

  • unicorn/catch-error-name
  • unicorn/consistent-destructuring
  • unicorn/new-for-builtins
  • unicorn/no-array-callback-reference
  • unicorn/no-array-for-each
  • unicorn/no-null
  • unicorn/no-zero-fractions
  • unicorn/prefer-node-protocol
  • unicorn/prefer-number-properties
  • unicorn/prefer-optional-catch-binding
  • unicorn/prefer-spread
  • unicorn/prefer-string-slice
  • unicorn/switch-case-braces
  • unicorn/throw-new-error

Also disables the unicorn/no-array-push-push rule in our shared config due false positives for non-array types with methods named "push".

AB#3027

Plus a couple of comment improvements
@Josmithr Josmithr requested review from a team and Copilot January 17, 2025 23:33
@github-actions github-actions bot added base: main PRs targeted against main branch area: build Build related issues area: runtime Runtime related issues labels Jan 17, 2025
"unicorn/switch-case-braces": "error",
"unicorn/throw-new-error": "error",

// TODO:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Future PR (trying to keep these PRs somewhat scoped so they're easier to review)

Choose a reason for hiding this comment

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

Copilot reviewed 62 out of 77 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • common/build/eslint-config-fluid/printed-configs/default.json: Language not supported
  • common/build/eslint-config-fluid/printed-configs/react.json: Language not supported
  • common/build/eslint-config-fluid/printed-configs/recommended.json: Language not supported
  • common/build/eslint-config-fluid/printed-configs/strict-biome.json: Language not supported
  • common/build/eslint-config-fluid/printed-configs/strict.json: Language not supported
  • common/build/eslint-config-fluid/printed-configs/test.json: Language not supported
  • packages/runtime/container-runtime/src/containerRuntime.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/opLifecycle/duplicateBatchDetector.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/opLifecycle/opCompressor.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/gc/gcSummaryStateTracker.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/dataStoreContext.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/dataStore.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/channelCollection.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/gc/gcTelemetry.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/blobManager/blobManagerSnapSum.ts: Evaluated as low risk
@Josmithr Josmithr requested review from TommyBrosman and a team January 18, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: runtime Runtime related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants