-
Notifications
You must be signed in to change notification settings - Fork 11
[Draft] | Support flat eslint configuration format for nimble packages #2718
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
Closed
gokulprasanth-ni
wants to merge
8
commits into
main
from
users/gokulprasanthRavi/feat/convert-to-eslint-v9
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d2b0684
update to flat eslint config
gokulprasanth-ni 67e1c8b
update lock file
gokulprasanth-ni e7d26ba
update lock
gokulprasanth-ni ad4ebf1
Change files
gokulprasanth-ni 562276a
update config file
gokulprasanth-ni d9dabab
Merge branch 'main' into users/gokulprasanthRavi/feat/convert-to-esliβ¦
gokulprasanth-ni 7d28363
update code
gokulprasanth-ni 40ba025
revert changes
gokulprasanth-ni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-jasmine-parameterized-65c24422-e02e-4fad-b5c8-02fd9392e918.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/jasmine-parameterized", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-angular-18d1b127-e543-4e25-8529-bc5fa3c931ac.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/nimble-angular", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-6a132db3-8604-461f-8c5b-11090d2d2eef.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/nimble-components", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-react-b2693da0-1f45-41bc-96a4-79d0bebbecdc.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/nimble-react", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-tokens-7ac41db2-b6a8-4938-b810-4ec452cbbf61.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/nimble-tokens", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-ok-angular-2f4b15c3-08ca-4a4f-a752-603d5f2fe6b2.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/ok-angular", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-ok-components-07217f13-2df7-4d36-a3b8-ca3442e06671.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/ok-components", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-ok-react-5a17a0f5-60d0-4281-a4db-f359fc6ad458.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/ok-react", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-spright-angular-b576ee05-bfcb-4e70-aebf-90f164024a93.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/spright-angular", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-spright-components-b204ef72-a6e0-4e88-b775-0875d142fa2f.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/spright-components", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-spright-react-a6f41eb1-ba04-4cc4-b540-5881d77a2d33.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/spright-react", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-xliff-to-json-converter-ea81ceee-5bd8-4f67-8901-24889622cadf.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Upgrade to ESLint v9 and update the configuration to use the flat configuration format", | ||
| "packageName": "@ni/xliff-to-json-converter", | ||
| "email": "131153319+gokulprasanth-ni@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Moved the PR to draft because like described in this comment lets do the nimble transition after AzDo. We should iterate in AzDo first and we don't have the time to review the change in nimble right now.
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.
Milan, I want to ensure I understood correctly. Are you suggesting that we update the SLE apps first, followed by the Nimble update? Additionally, in your other comment, you mentioned updating the Azdo pipelineβcould you please clarify what specific updates are required there?
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.
yep!
sorry wasn't being clear, the SLE apps is what I meant. Not aware of any azdo pipeline changes.
Uh oh!
There was an error while loading. Please reload this page.
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.
fyi @gokulprasanth-ni as part of regular dependency updates we pulled in the the stylistic eslint changes (from pre v9) into nimble. We also made some intentional rule tweaks which are now merged in main. Just an fyi when the eslint v9 upgrade is revisited.
Hopefully now there will be far fewer changes in the PRs as the stylistic update was merged separately
Uh oh!
There was an error while loading. Please reload this page.
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.
The goal of splitting the prettier update to a separate PR was to reduce the number of formatting changes in this PR. The assumption was that prettier is what caused so many changes but there are still over 100 files changed in this PR many with just formatting changes. Does splitting the prettier update into a separate PR actually make a difference?
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.
@rajsite @jattasNI I tried updating the
prettier-eslintandprettier-eslint-clipackages version in the Nimble monorepo to make them compatible with ESLint v9. Following this upgrade, we tried enabling ESLint and Prettier for linting across several packages in the workspace.Problem:
During this update, they were conflicts between ESLint and Prettier that create a circular fixing problem:
Proposed Solutions:
We're considering the following approaches to resolve this conflict:
Disable ESLint style rules: Turn off all style/formatting-related rules in ESLint (such as indent, quotes, semi, comma-dangle, etc.) and rely exclusively on Prettier for code formatting. This would allow ESLint to focus on code quality and potential bugs while Prettier handles all stylistic concerns.
Use
eslint-plugin-prettier: Integrate Prettier directly into ESLint by usingeslint-plugin-prettieralong witheslint-config-prettier. This approach:But we are still not sure whether these approaches works fine or not. We would like to get your thoughts on this and also any alternate solutions available to fix this issue.
Uh oh!
There was an error while loading. Please reload this page.
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.
Looking at it again I'm not sure why we call both prettier-eslint and eslint via the cli. I think we can just prettier-eslint which is aware of the eslint configuration already.
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.
Closing this PR as it will be handled in the below PR
#2768