Merge pull request from LLK/update-eslint-smore

Update eslint and babel-eslint, and fix resulting errors
This commit is contained in:
Christopher Willis-Ford 2022-08-25 13:49:50 -07:00 committed by GitHub
commit 96db8cde53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 845 additions and 546 deletions

1367
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,7 @@
"autoprefixer": "9.7.4",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.6",
"babel-eslint": "^10.1.0",
"babel-jest": "23.6.0",
"babel-loader": "7.1.5",
"babel-plugin-react-intl": "3.0.1",
@ -60,7 +60,7 @@
"css-loader": "3.4.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"eslint": "5.16.0",
"eslint": "^7.13.0",
"eslint-config-import": "0.13.0",
"eslint-config-scratch": "7.0.0",
"eslint-plugin-import": "2.26.0",

View file

@ -1,4 +1,6 @@
/* eslint-disable import/no-commonjs */
module.exports = {
/* eslint-enable import/no-commonjs */
root: true,
extends: ['scratch', 'scratch/es6', 'scratch/react', 'import'],
env: {

View file

@ -7,8 +7,9 @@ import {changeStrokeColor, changeStrokeColor2, changeStrokeGradientType} from '.
import {changeStrokeWidth} from '../reducers/stroke-width';
import StrokeWidthIndicatorComponent from '../components/stroke-width-indicator.jsx';
import {getSelectedLeafItems} from '../helper/selection';
import {applyColorToSelection, applyStrokeWidthToSelection, getColorsFromSelection, MIXED}
from '../helper/style-path';
import {
applyColorToSelection, applyStrokeWidthToSelection, getColorsFromSelection, MIXED
} from '../helper/style-path';
import GradientTypes from '../lib/gradient-types';
import Modes from '../lib/modes';
import Formats, {isBitmap} from '../lib/format';

View file

@ -4,8 +4,9 @@ import {isGroup} from '../group';
import {isCompoundPathItem, getRootItem} from '../item';
import {checkPointsClose, snapDeltaToAngle} from '../math';
import {getActionBounds, CENTER} from '../view';
import {clearSelection, cloneSelection, getSelectedLeafItems, getSelectedRootItems, setItemSelection}
from '../selection';
import {
clearSelection, cloneSelection, getSelectedLeafItems, getSelectedRootItems, setItemSelection
} from '../selection';
import {getDragCrosshairLayer, CROSSHAIR_FULL_OPACITY} from '../layer';
/** Snap to align selection center to rotation center within this distance */
@ -127,7 +128,7 @@ class MoveTool {
point.x = Math.max(actionBounds.left, Math.min(point.x, actionBounds.right));
point.y = Math.max(actionBounds.top, Math.min(point.y, actionBounds.bottom));
const dragVector = point.subtract(event.downPoint);
let snapVector;
@ -167,7 +168,7 @@ class MoveTool {
bounds = item.bounds;
}
}
if (this.firstDrag) {
// Show the center crosshair above the selected item while dragging.
getDragCrosshairLayer().visible = true;

View file

@ -633,8 +633,7 @@ const styleShape = function (path, options) {
);
}
}
if (options.hasOwnProperty('strokeWidth')) path.strokeWidth = options.strokeWidth;
if (Object.prototype.hasOwnProperty.call(options, 'strokeWidth')) path.strokeWidth = options.strokeWidth;
};
export {

View file

@ -14,6 +14,7 @@ test('initialState', () => {
test('changeBrushSize', () => {
let defaultState;
const newBrushSize = 8078;
expect(brushReducer(defaultState /* state */, changeBrushSize(newBrushSize) /* action */))