seatable / seatable-plugin-table-relationships

0 stars 0 forks source link

Various eslint errors after run start #48

Open christophdb opened 2 months ago

christophdb commented 2 months ago

These lint errors should be fixed.

Warning
(54:3) autoprefixer: start value has mixed support, consider using flex-start instead

[eslint] 
src/components/custom-components/index.tsx
  Line 80:6:    React Hook useEffect has missing dependencies: 'appActiveState.activePresetId' and 'pluginDataStore'. Either include them or remove the dependency array                                                                                                                                               react-hooks/exhaustive-deps
  Line 115:6:   React Hook useEffect has missing dependencies: 'allTables', 'appActiveState.activePresetId', 'edges', 'nodes', 'pluginDataStore.presets', 'setEdges', and 'setNodes'. Either include them or remove the dependency array                                                                               react-hooks/exhaustive-deps
  Line 125:28:  Assignments to the 'activeCustomSettings' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect  react-hooks/exhaustive-deps
  Line 241:5:   React Hook useCallback has missing dependencies: 'allTables', 'edges', 'links', and 'setEdges'. Either include them or remove the dependency array                                                                                                                                                     react-hooks/exhaustive-deps
  Line 271:5:   React Hook useCallback has missing dependencies: 'activeRelationships', 'appActiveState.activePresetId', 'edges', 'links', 'pluginDataStore', and 'setNodes'. Either include them or remove the dependency array                                                                                       react-hooks/exhaustive-deps

src/utils/custom-utils/utils.ts
  Line 79:37:  Array.prototype.find() expects a return value from arrow function  array-callback-return

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in ./src/styles/custom-styles/PluginTR.module.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].oneOf[9].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].oneOf[9].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[0].oneOf[9].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[0].oneOf[9].use[4]!./src/styles/custom-styles/PluginTR.module.scss)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning

(54:3) autoprefixer: start value has mixed support, consider using flex-start instead

WARNING in [eslint] 
src/components/custom-components/index.tsx
  Line 80:6:    React Hook useEffect has missing dependencies: 'appActiveState.activePresetId' and 'pluginDataStore'. Either include them or remove the dependency array                                                                                                                                               react-hooks/exhaustive-deps
  Line 115:6:   React Hook useEffect has missing dependencies: 'allTables', 'appActiveState.activePresetId', 'edges', 'nodes', 'pluginDataStore.presets', 'setEdges', and 'setNodes'. Either include them or remove the dependency array                                                                               react-hooks/exhaustive-deps
  Line 125:28:  Assignments to the 'activeCustomSettings' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect  react-hooks/exhaustive-deps
  Line 241:5:   React Hook useCallback has missing dependencies: 'allTables', 'edges', 'links', and 'setEdges'. Either include them or remove the dependency array                                                                                                                                                     react-hooks/exhaustive-deps
  Line 271:5:   React Hook useCallback has missing dependencies: 'activeRelationships', 'appActiveState.activePresetId', 'edges', 'links', 'pluginDataStore', and 'setNodes'. Either include them or remove the dependency array                                                                                       react-hooks/exhaustive-deps

src/utils/custom-utils/utils.ts
  Line 79:37:  Array.prototype.find() expects a return value from arrow function  array-callback-return
matteobu commented 2 months ago

@christophdb Yes, this will be handled once the Plugin is in prod. So I can focus on lower-level issues.