You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eslint config is broken and is not working + enhancing it by add some rules #9190
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"] }],
enhancements
in order to improve the current codebase we can add the following rules
"react/no-unused-prop-types": 2,
"object-curly-spacing": [2, "never"], that has autofix
"comma-dangle": [ 2, "always-multiline" ], that has autofix
How to reproduce
check lint running in actions or locally, both in a project and in the main mapstore repo
Expected Result
to work fine with no errors
Current Result
actually it is not executed because of some errors, you can notice this with vscode if you open
"object-curly-spacing": [2, "never"], that has autofix - LGTM
"comma-dangle": [ 2, "always-multiline" ], that has autofix - I personally do not like it to much, because JSON can not have this form in any case, so for constistency, I'd prefer to continue writing the same way. Anyway I understand the advantages in terms of code manipulation and diff
Anyway, in general, I'd like to reduce as much as possible our style rules in favor of standard ones, if possible, so we do not have to maintain a custom eslint configuration. We should see if there is some common used standard config that matches our requirements, maybe the best option
Activity
offtherailz commentedon May 24, 2023
My opinions about new rules:
I can suggest also for the future
eslint object-curly-newline: ["error", { "consistent": true }]Anyway, in general, I'd like to reduce as much as possible our style rules in favor of standard ones, if possible, so we do not have to maintain a custom eslint configuration. We should see if there is some common used standard config that matches our requirements, maybe the best option
MV88 commentedon May 24, 2023
just want pin out that "comma-dangle" rule is not applied to json, but i feel it is kinda handy to have it,
feel free to reject it, no problem for me
tdipisa commentedon Mar 4, 2024
Closed in favor of #10005