Central repository for eslint rules and shared components

Central repository for eslint rules and shared components

This are the Leipzig UI-GitHub repositories:

ui-finc-config,
ui-finc-select,
ui-idm-connect,
ui-erm-usage,
ui-plugin-find-erm-usage-data-provider,
ui-plugin-find-finc-metadata-source,
ui-plugin-find-finc-metadata-collection

For these repositories we would like to have a central repository for:

  1. Leipzig-Eslint rules
    All the Leipzig UI-GitHub repositories (ui-finc-config, ui-finc-select, ui-idm-connect, ui-erm-usage, ui-plugin-find-erm-usage-data-provider, ui-plugin-find-finc-metadata-source, ui-plugin-find-finc-metadata-collection) should be able to refer to a central repository to access to the central eslint rules defined by the Leipzig project Team.
    The eslint rules have been already defined in this ticket:
    https://folio-org.atlassian.net/browse/UIFC-396
    The defined rules are these:
    https://github.com/folio-org/ui-finc-config/blob/master/.eslintrc

  2. Reusable Leipzig-Stripes components

Reusable Components should be outsourced to a central Repository so they can be accessed and imported by all UI-repositories, for example:
- Monthpicker
- RepeatableField
- EditCard
- NoPermissionMessage


See other GitHub repositories containing shared components:
https://github.com/folio-org/stripes-acq-components


https://github.com/folio-org/stripes-erm-components

 

https://github.com/folio-org/stripes-inventory-components

See other GitHub repositories containing eslint rules:
https://github.com/folio-org/eslint-config-stripes/blob/main/acquisitions.js

See Guidlines for creating repository:
https://dev.folio.org/guidelines/create-new-repo/#branch-protection-and-required-checks

 

TODO: When the code and configuration is in place, then this new repository needs to be manually added to Sonarcloud. Seek FOLIO DevOps assistance.

 

I created this repository for specify further discussions:
stripes-leipzig-components

 

To decide:

Decisions meeting 2025-10-15

  1. content of repository (eslint and/or stripe-components)
    (see https://folio-org.atlassian.net/wiki/spaces/FOLIJET/pages/edit-v2/1245577239#This-are-the-options-we-do-have-concerning-content%3A )
    For now just stripes components. We will see about eslint later

  2. namestripes-leipzig-components
    ok

  3. structure, setup of repository
    ok

  4. when is the right time to go official:
    already asking for sonarcloude (PR will wait for it).
    Jira can wait, maybe a tag will do. If Jira is available, add to README!
    (maybe content and naming should be final?)
    (should we ask for several repositories at the same time?)

    1. add repository to sonarcloude?

    2. create Jira project?

 

This are the options we do have concerning content:

  1. One repository for React components AND config files (like eslint rules)

    image-20250930-123450.png
  2. Two different repositories
    2.1 One repository for React components stripes-leipzig-components
    2.2 One repository for config files “leipzig-config
    -> should this be a FOLIO GitHub repository since there are no config repository on team level?
    -> should we use GitLab instead? https://git.sc.uni-leipzig.de/ubl

  3. Just one repositoy for React components stripes-leipzig-components
    We keep the .eslintrc redundant in every ui-app
    -> we could propose a change to the FOLIO rules (eslint-config-stripes) on #folio-stripes-architecture and then file an ESCONF ticket
    -> since it seems like the community will change from eslint to prettier, we should not waste to much time with eslint any more?

 

 

Code to move into the new repository/repositories:

  1. constants into /stripes-leipzig-components/util/
    see: https://github.com/folio-org/ui-finc-config/blob/master/src/util/constants.js

  2. urls into /stripes-leipzig-components/util/ → may be replaced by APIs?
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/urls.js

  3. hooks into /stripes-leipzig-components/hooks/
    see https://github.com/folio-org/ui-finc-config/pull/372/files

  4. Monthpicker into /stripes-leipzig-components/lib/
    see https://github.com/folio-org/ui-erm-usage/tree/master/src/util/Monthpicker

  5. RepeatableField into /stripes-leipzig-components/lib/
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/RepeatableField.js

  6. ViewContainer
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/ViewContainer.js

  7. renderListUtils
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/renderListUtils.js

  8. FormContainer
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/FormContainer.js

  9. NoPermissionsMessage
    see https://github.com/folio-org/ui-finc-config/blob/master/src/components/DisplayUtils/NoPermissionsMessage.js