Inist-CNRS / lodex

Linked Open Data EXperiment
https://www.lodex.fr/
Other
53 stars 12 forks source link

Apply updated eslint rules #1934

Closed AlasDiablo closed 6 months ago

AlasDiablo commented 6 months ago

This pr apply eslint change from https://github.com/Inist-CNRS/lodex/pull/1900

List of manual fix to do :

lodex/src/api/controller/api/dataset.js
  5:8  error  'fs' is defined but never used  no-unused-vars

lodex/src/api/services/saveParsedStream-e2e.spec.js
  6:8  error  No default export found in imported module "./saveParsedStream"  import/default

lodex/src/app/js/admin/parsing/sagas.spec.js
  14:10  error  'UPLOAD_SUCCESS' is defined but never used  no-unused-vars
  15:10  error  'delay' is defined but never used           no-unused-vars

lodex/src/app/js/admin/publish/sagas.js
  18:9  error  Unexpected console statement  no-console

lodex/src/app/js/admin/reducers.js
  23:8  warning  Using exported name 'precomputed' as identifier for default export   import/no-named-as-default
  24:8  warning  Using exported name 'configTenant' as identifier for default export  import/no-named-as-default

lodex/src/app/js/admin/removedResources/ImportButton.js
  1:17  error  'useEffect' is defined but never used  no-unused-vars

lodex/src/app/js/embeddedIstexSummary/FieldProvider.js
  1:8  error  'React' is defined but never used  no-unused-vars

lodex/src/app/js/fields/selectors.spec.js
  25:20  warning  Caution: `selectors` also has a named export `getFields`. Check if you meant to write `import {getFields} from './selectors'` instead                      import/no-named-as-default-member
  87:17  warning  Caution: `selectors` also has a named export `getCollectionFields`. Check if you meant to write `import {getCollectionFields} from './selectors'` instead  import/no-named-as-default-member

lodex/src/app/js/formats/checkPredicate.js
  17:9   error  'meta' is missing in props validation        react/prop-types
  18:9   error  'label' is missing in props validation       react/prop-types
  19:9   error  'resource' is missing in props validation    react/prop-types
  20:9   error  'field' is missing in props validation       react/prop-types
  21:9   error  'p' is missing in props validation           react/prop-types
  29:41  error  'field.name' is missing in props validation  react/prop-types

lodex/src/app/js/formats/other/istexRefbibs/IstexRefbibsView.js
  42:5  error  'field' is defined but never used     no-unused-vars
  43:5  error  'resource' is defined but never used  no-unused-vars

lodex/src/app/js/formats/other/istexRefbibs/fetchIstexRefbibsData.js
  107:21  error  'total' is assigned a value but never used  no-unused-vars
  107:28  error  'hits' is assigned a value but never used   no-unused-vars

lodex/src/app/js/formats/other/istexSummary/FetchFold.js
  92:51  error  'skip' is missing in props validation  react/prop-types

lodex/src/app/js/formats/other/istexSummary/IstexSummaryAdmin.js
  15:8  error  'FormatGroupedFieldSet' is defined but never used  no-unused-vars

lodex/src/app/js/formats/url/link-image/LinkImageAdmin.js
  5:10  error  'Box' is defined but never used  no-unused-vars

lodex/src/app/js/lib/components/FormAutoCompleteField.js
  26:8   error  'props' is defined but never used  no-unused-vars
  81:30  error  'index' is not defined             no-undef

lodex/src/app/js/lib/composeRenderProps.js
  3:45  error  Component definition is missing display name  react/display-name

lodex/src/app/js/public/Routes.js
  12:8  warning  Using exported name 'NavBar' as identifier for default export      import/no-named-as-default
  13:8  warning  Using exported name 'CustomPage' as identifier for default export  import/no-named-as-default
  19:8  warning  Using exported name 'Breadcrumb' as identifier for default export  import/no-named-as-default

lodex/src/app/js/public/ScrollToTop.js
  5:24  error  'children' is missing in props validation           react/prop-types
  5:34  error  'location' is missing in props validation           react/prop-types
  5:46  error  'location.pathname' is missing in props validation  react/prop-types

lodex/src/app/js/public/reducers.js
  18:8  warning  Using exported name 'configTenant' as identifier for default export  import/no-named-as-default

lodex/src/app/js/public/resource/Detail.js
  176:36  error  'resource.subresourceId' is missing in props validation  react/prop-types

lodex/src/app/js/root-admin/CreateTenantDialog.js
  20:5   error  'MAX_DB_NAME_SIZE' is defined but never used                     no-unused-vars
  48:77  error  `"` can be escaped with `"`, `“`, `"`, `”`  react/no-unescaped-entities
  48:79  error  `"` can be escaped with `"`, `“`, `"`, `”`  react/no-unescaped-entities

lodex/src/app/js/root-admin/LoginForm.js
  59:17  error  Unknown property 'sx' found  react/no-unknown-property

lodex/src/test-utils.js
  35:1   error  Multiple exports of name 'render'  import/export
  37:26  error  Multiple exports of name 'render'  import/export