-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: created shared utils package and moved objectKeys function to it #35615
Conversation
.../packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
Outdated
Show resolved
Hide resolved
Warning Rate limit exceeded@AmanAgarwal041 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 59 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent updates enhance the codebase's architecture by relocating the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (25)
- app/client/package.json (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/utils/index.ts (1 hunks)
- app/client/packages/utils/.eslintrc.json (1 hunks)
- app/client/packages/utils/index.d.ts (1 hunks)
- app/client/packages/utils/jest.config.js (1 hunks)
- app/client/packages/utils/package.json (1 hunks)
- app/client/packages/utils/src/index.ts (1 hunks)
- app/client/packages/utils/src/object/index.ts (1 hunks)
- app/client/packages/utils/src/object/keys.test.ts (1 hunks)
- app/client/packages/utils/src/object/keys.ts (1 hunks)
- app/client/packages/utils/tsconfig.json (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts (1 hunks)
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
Files skipped from review due to trivial changes (21)
- app/client/package.json
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx
- app/client/packages/design-system/widgets/src/utils/index.ts
- app/client/packages/utils/.eslintrc.json
- app/client/packages/utils/index.d.ts
- app/client/packages/utils/jest.config.js
- app/client/packages/utils/package.json
- app/client/packages/utils/src/index.ts
- app/client/packages/utils/src/object/index.ts
- app/client/packages/utils/src/object/keys.test.ts
- app/client/packages/utils/tsconfig.json
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts
Additional comments not posted (4)
app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1)
1-2
: Great job on updating the import path!The import path for
objectKeys
has been successfully updated to the newappsmith-utils
package, which enhances modularity and reusability. This is a good step towards better code organization.app/client/packages/utils/src/object/keys.ts (1)
13-15
: Excellent enhancement of type safety and export style!Switching
objectKeys
to a default export and specifying the return type asArray<keyof T>
improves both usability and type safety. This aligns well with TypeScript conventions and makes the function more robust.app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1)
1-3
: Well done on updating the import path!The import path for
objectKeys
has been updated to use theappsmith-utils
package, promoting better code organization and reusability. This is a positive step towards a cleaner architecture.app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1)
2-3
: Good job on updating the import path forobjectKeys
.This change aligns with the PR objectives of centralizing utility functions in a shared module. It helps improve code organization and maintainability. Ensure that all references to
objectKeys
in the codebase are updated to reflect this new path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (25)
- app/client/package.json (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/utils/index.ts (1 hunks)
- app/client/packages/utils/.eslintrc.json (1 hunks)
- app/client/packages/utils/index.d.ts (1 hunks)
- app/client/packages/utils/jest.config.js (1 hunks)
- app/client/packages/utils/package.json (1 hunks)
- app/client/packages/utils/src/index.ts (1 hunks)
- app/client/packages/utils/src/object/index.ts (1 hunks)
- app/client/packages/utils/src/object/keys.test.ts (1 hunks)
- app/client/packages/utils/src/object/keys.ts (1 hunks)
- app/client/packages/utils/tsconfig.json (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts (1 hunks)
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
Files skipped from review due to trivial changes (16)
- app/client/package.json
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx
- app/client/packages/design-system/widgets/src/utils/index.ts
- app/client/packages/utils/.eslintrc.json
- app/client/packages/utils/index.d.ts
- app/client/packages/utils/package.json
- app/client/packages/utils/src/index.ts
- app/client/packages/utils/src/object/index.ts
- app/client/packages/utils/tsconfig.json
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts
Additional comments not posted (9)
app/client/packages/utils/src/object/keys.test.ts (1)
1-7
: Great job on the test case!The test effectively verifies that
objectKeys
returns the correct keys from an object. Consider adding more test cases to cover edge cases, such as empty objects or objects with non-string keys.app/client/packages/utils/jest.config.js (1)
1-12
: The Jest configuration looks solid!The configuration is well set up for testing TypeScript and JavaScript files. Ensure that the testRegex pattern matches all intended test files.
app/client/packages/utils/src/object/keys.ts (1)
7-15
: The implementation ofobjectKeys
is well done!Switching to a default export is a good choice for simplifying imports. Verify that all imports of
objectKeys
have been updated to reflect this change.Verification successful
All imports of
objectKeys
are correctly updated to default exports!The verification confirms that the
objectKeys
function is imported as a default export in the test file. No other instances of incorrect imports were found. Great job on maintaining consistency across the codebase!Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Ensure all imports of `objectKeys` are updated to reflect the default export. # Test: Search for imports of `objectKeys`. Expect: Only default imports. rg --type ts --type js -A 2 $'import objectKeys from'Length of output: 322
app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1)
4-4
: Good job on updating the import path!The import path for
objectKeys
has been successfully updated to use the new utilities package. This helps in centralizing utility functions, which is a great step towards better maintainability.app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1)
3-3
: Nice update on the import path!The import path for
objectKeys
has been updated to the new utilities package. This centralization is beneficial for code organization and maintainability.app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1)
3-3
: Great work on updating the import path!The import path for
objectKeys
has been updated to use the new utilities package. This helps in centralizing utility functions, enhancing code maintainability.app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1)
1-4
: Verify theobjectKeys
function implementation.The import of
objectKeys
has been changed toappsmith-utils/src/object
. Ensure that the implementation in the new location matches the expected functionality, as this might affect the behavior of the component.app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1)
10-10
: Verify theobjectKeys
function implementation.The import of
objectKeys
has been changed toappsmith-utils/src/object
. Ensure that the implementation in the new location matches the expected functionality, as this might affect the behavior of the component.app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1)
3-4
: Verify theobjectKeys
function implementation.The import of
objectKeys
has been changed toappsmith-utils/src/object
. Ensure that the implementation in the new location matches the expected functionality, as this might affect the behavior of the component.
.../packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
Outdated
Show resolved
Hide resolved
app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts
Outdated
Show resolved
Hide resolved
@AmanAgarwal041 Could you please add yourself and @jsartisan (as the author of the original function) to CODEOWNERS file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (22)
- app/client/package.json (1 hunks)
- app/client/packages/design-system/widgets/package.json (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx (1 hunks)
- app/client/packages/utils/.eslintignore (1 hunks)
- app/client/packages/utils/.prettierignore (1 hunks)
- app/client/packages/utils/jest.config.js (1 hunks)
- app/client/packages/utils/package.json (1 hunks)
- app/client/packages/utils/src/index.d.ts (1 hunks)
- app/client/packages/utils/tsconfig.json (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts (1 hunks)
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
Files skipped from review due to trivial changes (6)
- app/client/package.json
- app/client/packages/utils/.eslintignore
- app/client/packages/utils/.prettierignore
- app/client/packages/utils/jest.config.js
- app/client/packages/utils/src/index.d.ts
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts
Files skipped from review as they are similar to previous changes (15)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx
- app/client/packages/utils/package.json
- app/client/packages/utils/tsconfig.json
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts
Additional comments not posted (1)
app/client/packages/design-system/widgets/package.json (1)
14-14
: Good job on adding the@appsmith/utils
dependency!This addition aligns well with the goal of centralizing utility functions into a shared package, promoting better code organization and reusability. Make sure that all necessary utilities are correctly exported and utilized in the package.
…35508-object-keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (26)
- app/client/.eslintrc.base.json (2 hunks)
- app/client/package.json (2 hunks)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx (1 hunks)
- app/client/packages/eslint-plugin/index.js (1 hunks)
- app/client/packages/eslint-plugin/object-keys-replacement/rule.js (1 hunks)
- app/client/packages/eslint-plugin/package.json (1 hunks)
- app/client/packages/utils/jest.config.js (1 hunks)
- app/client/packages/utils/package.json (1 hunks)
- app/client/packages/utils/src/index.ts (1 hunks)
- app/client/packages/utils/src/object/index.ts (1 hunks)
- app/client/packages/utils/src/object/keys.test.ts (1 hunks)
- app/client/packages/utils/src/object/keys.ts (1 hunks)
- app/client/packages/utils/tsconfig.json (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts (1 hunks)
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
Files skipped from review due to trivial changes (4)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx
- app/client/packages/eslint-plugin/package.json
- app/client/packages/utils/jest.config.js
- app/client/packages/utils/package.json
Files skipped from review as they are similar to previous changes (19)
- app/client/package.json
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx
- app/client/packages/utils/src/index.ts
- app/client/packages/utils/src/object/index.ts
- app/client/packages/utils/src/object/keys.test.ts
- app/client/packages/utils/src/object/keys.ts
- app/client/packages/utils/tsconfig.json
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts
Additional comments not posted (3)
app/client/packages/eslint-plugin/index.js (1)
1-8
: Great job setting up the custom ESLint rule!The setup correctly imports and exports the
objectKeysRule
. This will help enforce the use of theobjectKeys
function across the codebase.app/client/packages/eslint-plugin/object-keys-replacement/rule.js (1)
1-34
: Well-defined ESLint rule forobjectKeys
usage!The rule correctly identifies the use of
Object.keys
and suggests usingobjectKeys
instead. The message is clear and the rule is set up as a suggestion, which is appropriate for this context.app/client/.eslintrc.base.json (1)
19-20
: Nice addition of the custom plugin and rule!The inclusion of
@appsmith-plugins
and theobject-keys
rule in the ESLint configuration is well done. This ensures that the new rule is enforced across the codebase, promoting consistency and adherence to the updated standards.Also applies to: 88-89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (16)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx (1 hunks)
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx (1 hunks)
- app/client/packages/eslint-plugin/.eslintrc.json (1 hunks)
- app/client/packages/eslint-plugin/.prettierignore (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts (1 hunks)
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts (1 hunks)
Files skipped from review due to trivial changes (6)
- app/client/packages/design-system/widgets/src/components/Button/chromatic/Button.chromatic.stories.tsx
- app/client/packages/design-system/widgets/src/components/InlineButtons/stories/InlineButtons.stories.tsx
- app/client/packages/eslint-plugin/.eslintrc.json
- app/client/packages/eslint-plugin/.prettierignore
- app/client/src/widgets/wds/WDSIconButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/styleConfig.ts
Files skipped from review as they are similar to previous changes (10)
- app/client/packages/design-system/widgets/src/components/Button/stories/Button.stories.tsx
- app/client/packages/design-system/widgets/src/components/IconButton/stories/IconButton.stories.tsx
- app/client/packages/design-system/widgets/src/components/ToolbarButtons/stories/ToolbarButtons.stories.tsx
- app/client/src/widgets/wds/WDSButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSIconButtonWidget/config/propertyPaneConfig/styleConfig.ts
- app/client/src/widgets/wds/WDSInlineButtonsWidget/config/propertyPaneConfig/contentConfig.ts
- app/client/src/widgets/wds/WDSMenuButtonWidget/config/defaultsConfig.ts
- app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/General.ts
- app/client/src/widgets/wds/WDSToolbarButtonsWidget/config/propertyPaneConfig/styleConfig.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/packages/eslint-plugin/src/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- app/client/packages/eslint-plugin/src/index.ts
@AmanAgarwal041 Can we merge this? Are there any pending comments to be resolved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/packages/eslint-plugin/src/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- app/client/packages/eslint-plugin/src/index.ts
It was some client linting error that were coming. I have fixed those. Waiting for the test to pass. |
@AmanAgarwal041 Looks like all of them have passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this local file? I think we already have everything that listed here in the main one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, actually somehow it was asking to prettify package.json and Readme.md which I added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked, now the prettier should not as about package.json, everything is fine here. Also Readme.md can be fixed, prettier will make valid improvements.
Another small nuance is that readme
file is usually called only in capital letters. Readme.md > README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed readme and prettier from the file, but need the file to avoid dist
prettier check. Update Readme to README
.
eb5f9fe
…35508-object-keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
app/client/packages/eslint-plugin/README.md (1)
9-9
: Consider adding a comma for clarity.In the sentence, "Navigate to your Appsmith ESLint plugin directory i.e.
app/client/packages/eslint-plugin
," consider adding a comma after "i.e." for improved readability.Navigate to your Appsmith ESLint plugin directory i.e. `app/client/packages/eslint-plugin`. +Navigate to your Appsmith ESLint plugin directory, i.e., `app/client/packages/eslint-plugin`.
Tools
LanguageTool
[uncategorized] ~9-~9: Possible missing comma found.
Context: ...Navigate to your Appsmith ESLint plugin directory i.e. `app/client/packages/eslint-plugin...(AI_HYDRA_LEO_MISSING_COMMA)
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- app/client/packages/eslint-plugin/README.md (1 hunks)
- app/client/packages/eslint-plugin/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/client/packages/eslint-plugin/package.json
Additional context used
LanguageTool
app/client/packages/eslint-plugin/README.md
[uncategorized] ~9-~9: Possible missing comma found.
Context: ...Navigate to your Appsmith ESLint plugin directory i.e. `app/client/packages/eslint-plugin...(AI_HYDRA_LEO_MISSING_COMMA)
Additional comments not posted (5)
app/client/packages/eslint-plugin/README.md (5)
40-54
: Great job on clear instructions!The steps to update the plugin index file are well-explained and easy to follow.
56-89
: Excellent testing instructions!The guide provides a solid foundation for testing custom rules with ESLint's
RuleTester
.
91-98
: Clear guidance on client configuration!The steps to add the custom rule to the client configuration are straightforward and easy to understand.
100-104
: Valuable resources provided!The additional resources section offers useful links for further exploration of ESLint.
106-106
: Nice closing statement!The friendly sign-off adds a welcoming touch to the guide.
Suggestions have been addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) You can still delete this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KelvinOm I already merged this PR. Should we delete this file and add dist
in the root .prettierignore ?
Description
Created a shared utils package to move common util functions to it. This PR currently handles the
objectKeys
function which was earlier being used from design-system package.This PR also introduces a way to create your own eslint custom rule for the project. All the steps are mentioned in the Readme for the same in
packages/eslint-plugin
.EE PR : https://github.com/appsmithorg/appsmith-ee/pull/4943
Fixes #35508
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10507166570
Commit: f5e0eef
Cypress dashboard.
Tags:
@tag.All
Spec:
Thu, 22 Aug 2024 13:06:47 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
@appsmith/utils
) to enhance functionality across the application.objectKeys
, improving coding practices.Bug Fixes
@appsmith/utils
dependencies to streamline package management.Documentation
Chores