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

Proposal to enhance eslint config, plus fixing current configuration #9188

Closed
wants to merge 2 commits into from

Conversation

MV88
Copy link
Contributor

@MV88 MV88 commented May 22, 2023

Description

I checked current config is broken and has never worked since 3 years!!!
check here the broken part https://github.com/geosolutions-it/MapStore2/blob/master/utility/eslint/index.js#L235

now we got
✖4095 problems (4095 errors, 0 warnings)
with --fix becomes
✖ 3869 problems (3869 errors, 0 warnings)

338 PropType is defined but prop is never used "react/no-unused-prop-types": 2
185 render should be placed after
3308 is missing in props validation "react/prop-types": [2, { "ignore": ["children"] }],

This PR is not mergiable because

  • all the issues must be fixed unless we want to disable some and fix others
  • we should revert the pointing to local utility/eslint index file and use a published one
  • I would like to also add
    • "object-curly-spacing": [2, "never"] that has autofix
    • "comma-dangle": [ 2, "always-multiline" ], that has autofix

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#9190

What is the new behavior?

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@offtherailz if you approve, please publish it since I cannot do that

@MV88 MV88 requested a review from offtherailz May 22, 2023 17:03
@MV88 MV88 self-assigned this May 22, 2023
@MV88 MV88 marked this pull request as draft May 23, 2023 07:57
@@ -49,7 +49,7 @@
"@geosolutions/acorn-jsx": "4.0.2",
"@geosolutions/jsdoc": "3.4.4",
"@geosolutions/mocha": "6.2.1-3",
"@mapstore/eslint-config-mapstore": "1.0.5",
"@mapstore/eslint-config-mapstore": "file:./utility/eslint",
Copy link
Member

@offtherailz offtherailz May 24, 2023

Choose a reason for hiding this comment

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

This should not be committed, I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

of course, i did it so the action-build could have used the new config, it's also written in the PR description when i say PR is not mergiable

@MV88 MV88 linked an issue May 24, 2023 that may be closed by this pull request
1 task
@MV88 MV88 added this to the 2023.02.00 milestone May 24, 2023
@tdipisa
Copy link
Member

tdipisa commented May 24, 2023

Thank you so much @MV88 for reporting this.

@offtherailz @MV88 @allyoucanmap @dsuren1
I think the typo should be corrected as soon as possible, possibly also in more than one step, since we have now lots of stratified errors reported due to this.

I think we could proceed by splitting this in two steps:

  1. Manual fix of the following:
    338 PropType is defined but prop is never used "react/no-unused-prop-types": 2
    185 render should be placed after
  2. Then fixing this:
    3308 is missing in props validation "react/prop-types": [2, { "ignore": ["children"] }],

We can continue using this PR by maintaining it in draft mode until all problems are solved. Can you please can you hear each other guys and give me an estimate for both points above?

@MV88
Copy link
Contributor Author

MV88 commented May 24, 2023

@tdipisa

person point 1 point 2
mv88 4h max 3 days

point 2 can be done slowly by updating the components when a new PR is created in mapstore

@tdipisa
Copy link
Member

tdipisa commented Mar 4, 2024

Closed in favore of #10006

@tdipisa tdipisa closed this Mar 4, 2024
@tdipisa tdipisa removed this from the 2024.01.00 milestone Mar 4, 2024
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.

Eslint config is broken and is not working + enhancing it by add some rules
3 participants