Skip to content

Eslint config is broken and is not working + enhancing it by add some rules #9190

@MV88

Description

@MV88

Description

I checked current config is broken and has never worked since March 2021 !
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"] }],

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

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions