You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/20 12:48:05 UTC

[GitHub] [apisix-dashboard] veithly opened a new pull request, #2647: feat:Configure plug-ins to support this feature

veithly opened a new pull request, #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647

   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [ *] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   I try to configure the two plug-ins to format the import and export.
   
   **Related issues**
   
   fix/resolve #2646
   
   **Checklist:**
   
   - [ *] Did you explain what problem does this PR solve? Or what new features have been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [* ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] veithly commented on a diff in pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
veithly commented on code in PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#discussion_r1001295036


##########
web/.eslintrc.js:
##########
@@ -15,13 +15,38 @@
  * limitations under the License.
  */
 module.exports = {
-  extends: [require.resolve('@umijs/fabric/dist/eslint')],
+  extends: [
+    require.resolve('@umijs/fabric/dist/eslint'),
+    'plugin:import/errors',
+    'plugin:import/warnings',
+  ],
+  plugins: ['simple-import-sort'],
   globals: {
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
     page: true,
     REACT_APP_ENV: true,
   },
   rules: {
     '@typescript-eslint/naming-convention': 'off',
+    'import/no-unresolved': [2, { ignore: ['^@/', '^umi/', '^@@/'] }],
+    'sort-imports': 'off',
+    'import/order': 'off',

Review Comment:
   Avoid conflict and according to simple-import-sort.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] guoqqqi commented on pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#issuecomment-1288292765

   Also cc @SkyeYoung PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] SkyeYoung commented on a diff in pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on code in PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#discussion_r1002820704


##########
web/.eslintrc.js:
##########
@@ -15,13 +15,38 @@
  * limitations under the License.
  */
 module.exports = {
-  extends: [require.resolve('@umijs/fabric/dist/eslint')],
+  extends: [
+    require.resolve('@umijs/fabric/dist/eslint'),
+    'plugin:import/errors',
+    'plugin:import/warnings',
+  ],
+  plugins: ['simple-import-sort'],
   globals: {
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
     page: true,
     REACT_APP_ENV: true,
   },
   rules: {
     '@typescript-eslint/naming-convention': 'off',
+    'import/no-unresolved': [2, { ignore: ['^@/', '^umi/', '^@@/'] }],
+    'sort-imports': 'off',
+    'import/order': 'off',

Review Comment:
   Both parts of the modification look fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#issuecomment-1286345853

   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2647?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2647](https://codecov.io/gh/apache/apisix-dashboard/pull/2647?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b05fc5c) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/7cbdc482f741276ddd80ecaec41ee78598d18b55?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7cbdc48) will **decrease** coverage by `8.51%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2647      +/-   ##
   ==========================================
   - Coverage   76.49%   67.98%   -8.52%     
   ==========================================
     Files         139       39     -100     
     Lines        3748     1040    -2708     
     Branches      872      268     -604     
   ==========================================
   - Hits         2867      707    -2160     
   + Misses        881      333     -548     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `67.98% <100.00%> (-8.52%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2647?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5EZXRhaWwudHN4) | `64.48% <100.00%> (-10.93%)` | :arrow_down: |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `19.67% <0.00%> (-60.66%)` | :arrow_down: |
   | [web/src/components/RightContent/AvatarDropdown.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1JpZ2h0Q29udGVudC9BdmF0YXJEcm9wZG93bi50c3g=) | `50.00% <0.00%> (-32.15%)` | :arrow_down: |
   | [web/src/components/PanelSection/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BhbmVsU2VjdGlvbi9pbmRleC50c3g=) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9yZWZlcmVyLXJlc3RyaWN0aW9uLnRzeA==) | `69.69% <0.00%> (-21.22%)` | :arrow_down: |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `73.17% <0.00%> (-19.52%)` | :arrow_down: |
   | [web/src/components/Plugin/PluginPage.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5QYWdlLnRzeA==) | `82.00% <0.00%> (-17.00%)` | :arrow_down: |
   | [web/src/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4) | `69.23% <0.00%> (-15.39%)` | :arrow_down: |
   | [web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9hcHAudHN4) | `87.87% <0.00%> (-12.13%)` | :arrow_down: |
   | [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9jb3JzLnRzeA==) | `71.11% <0.00%> (-11.12%)` | :arrow_down: |
   | ... and [107 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2647/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] guoqqqi merged pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
guoqqqi merged PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] Baoyuantop commented on a diff in pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on code in PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#discussion_r1001272492


##########
web/package.json:
##########
@@ -68,6 +68,8 @@
     "classnames": "^2.2.6",
     "dayjs": "1.8.28",
     "dotenv": "^16.0.1",
+    "eslint-plugin-import": "^2.26.0",
+    "eslint-plugin-simple-import-sort": "^8.0.0",

Review Comment:
   Are both of these required? I think `eslint-plugin-import` is enough



##########
web/.eslintrc.js:
##########
@@ -15,13 +15,38 @@
  * limitations under the License.
  */
 module.exports = {
-  extends: [require.resolve('@umijs/fabric/dist/eslint')],
+  extends: [
+    require.resolve('@umijs/fabric/dist/eslint'),
+    'plugin:import/errors',
+    'plugin:import/warnings',
+  ],
+  plugins: ['simple-import-sort'],
   globals: {
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
     page: true,
     REACT_APP_ENV: true,
   },
   rules: {
     '@typescript-eslint/naming-convention': 'off',
+    'import/no-unresolved': [2, { ignore: ['^@/', '^umi/', '^@@/'] }],
+    'sort-imports': 'off',
+    'import/order': 'off',

Review Comment:
   Why turn it off?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] veithly commented on a diff in pull request #2647: feat:Configure plug-ins to support this feature

Posted by GitBox <gi...@apache.org>.
veithly commented on code in PR #2647:
URL: https://github.com/apache/apisix-dashboard/pull/2647#discussion_r1001294722


##########
web/package.json:
##########
@@ -68,6 +68,8 @@
     "classnames": "^2.2.6",
     "dayjs": "1.8.28",
     "dotenv": "^16.0.1",
+    "eslint-plugin-import": "^2.26.0",
+    "eslint-plugin-simple-import-sort": "^8.0.0",

Review Comment:
   Because I think it can auto fix import order problem.I try to use only eslint-plugin-import but no work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org