diff --git a/.eslintrc.json b/.eslintrc.json index 9748435..f2b5228 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,5 +2,8 @@ "extends": [ "eslint:recommended", "plugin:react/recommended" - ] + ], + "rules": { + "react/prop-types": "warn" + } } diff --git a/package.json b/package.json index 224461d..fb30b04 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "react-custom-scrollbars": "^4.2.1", "react-dom": "^16.12.0", "react-onclickoutside": "^6.9.0", - "react-scripts": "3.4.1" + "react-scripts": "4.0.3" }, "scripts": { "cra-build": "react-scripts build", @@ -66,7 +66,7 @@ "babel-core": "^6.26.3", "babel-eslint": "^10.1.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "eslint": "^6.7.2", + "eslint": "^7.11.0", "eslint-config-airbnb": "^18.0.1", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", diff --git a/src/components/Chart/lib/chart.js b/src/components/Chart/lib/chart.js index afd9ef0..24c7202 100644 --- a/src/components/Chart/lib/chart.js +++ b/src/components/Chart/lib/chart.js @@ -203,7 +203,7 @@ export default class BitfinexTradingChart { const v = ind.v() let nullP = 0 - + if (indicatorInstances[j][1].ui.lines) { nullP = {} indicatorInstances[j][1].ui.lines.forEach(key => nullP[key] = 0) @@ -342,7 +342,7 @@ export default class BitfinexTradingChart { } } - renderBBandsIndicator (indicator, data, slot) { + renderBBandsIndicator (indicator, data) { const colors = indicator[2] const candlesToRender = this.getCandlesInView() const vpHeight = this.getOHLCVPHeight() @@ -525,7 +525,7 @@ export default class BitfinexTradingChart { } } - renderOverlayLineIndicator (indicator, data, slot) { + renderOverlayLineIndicator (indicator, data) { const color = indicator[2][0] const candlesToRender = this.getCandlesInView() const vpHeight = this.getOHLCVPHeight() @@ -548,7 +548,7 @@ export default class BitfinexTradingChart { drawLine(this.ohlcCanvas, color, linePoints) } - renderOverlayLinesIndicator (indicator, data, slot) { + renderOverlayLinesIndicator (indicator, data) { const colors = indicator[2] const candlesToRender = this.getCandlesInView() const vpHeight = this.getOHLCVPHeight() @@ -891,7 +891,7 @@ export default class BitfinexTradingChart { this.isDragging = false } - onMouseUp (e) { + onMouseUp () { this.isDragging = false this.dragStart = null diff --git a/src/components/Chart/lib/drawings/drawing.js b/src/components/Chart/lib/drawings/drawing.js index 4956218..adb2c6c 100644 --- a/src/components/Chart/lib/drawings/drawing.js +++ b/src/components/Chart/lib/drawings/drawing.js @@ -52,7 +52,7 @@ export default class Drawing { this.anchors.forEach(a => a.moving = false) } - onMouseDown (x, y) { + onMouseDown () { let hasMovingAnchor = false this.anchors.forEach((a) => { diff --git a/src/components/IndicatorSettingsModal/IndicatorSettingsModal.js b/src/components/IndicatorSettingsModal/IndicatorSettingsModal.js index 39bdc3e..f2bb734 100644 --- a/src/components/IndicatorSettingsModal/IndicatorSettingsModal.js +++ b/src/components/IndicatorSettingsModal/IndicatorSettingsModal.js @@ -59,7 +59,7 @@ export default class IndicatorSettingsModal extends React.PureComponent {