mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-08-01 17:00:55 -04:00
Merge pull request #2051 from LLK/update-eslint-smore
Update eslint and babel-eslint, and fix resulting errors
This commit is contained in:
commit
96db8cde53
7 changed files with 845 additions and 546 deletions
1357
package-lock.json
generated
1357
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -50,7 +50,7 @@
|
||||||
"autoprefixer": "9.7.4",
|
"autoprefixer": "9.7.4",
|
||||||
"babel-cli": "6.26.0",
|
"babel-cli": "6.26.0",
|
||||||
"babel-core": "6.26.3",
|
"babel-core": "6.26.3",
|
||||||
"babel-eslint": "8.2.6",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-jest": "23.6.0",
|
"babel-jest": "23.6.0",
|
||||||
"babel-loader": "7.1.5",
|
"babel-loader": "7.1.5",
|
||||||
"babel-plugin-react-intl": "3.0.1",
|
"babel-plugin-react-intl": "3.0.1",
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"css-loader": "3.4.0",
|
"css-loader": "3.4.0",
|
||||||
"enzyme": "3.11.0",
|
"enzyme": "3.11.0",
|
||||||
"enzyme-adapter-react-16": "1.15.6",
|
"enzyme-adapter-react-16": "1.15.6",
|
||||||
"eslint": "5.16.0",
|
"eslint": "^7.13.0",
|
||||||
"eslint-config-import": "0.13.0",
|
"eslint-config-import": "0.13.0",
|
||||||
"eslint-config-scratch": "7.0.0",
|
"eslint-config-scratch": "7.0.0",
|
||||||
"eslint-plugin-import": "2.26.0",
|
"eslint-plugin-import": "2.26.0",
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
/* eslint-disable import/no-commonjs */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
/* eslint-enable import/no-commonjs */
|
||||||
root: true,
|
root: true,
|
||||||
extends: ['scratch', 'scratch/es6', 'scratch/react', 'import'],
|
extends: ['scratch', 'scratch/es6', 'scratch/react', 'import'],
|
||||||
env: {
|
env: {
|
||||||
|
|
|
@ -7,8 +7,9 @@ import {changeStrokeColor, changeStrokeColor2, changeStrokeGradientType} from '.
|
||||||
import {changeStrokeWidth} from '../reducers/stroke-width';
|
import {changeStrokeWidth} from '../reducers/stroke-width';
|
||||||
import StrokeWidthIndicatorComponent from '../components/stroke-width-indicator.jsx';
|
import StrokeWidthIndicatorComponent from '../components/stroke-width-indicator.jsx';
|
||||||
import {getSelectedLeafItems} from '../helper/selection';
|
import {getSelectedLeafItems} from '../helper/selection';
|
||||||
import {applyColorToSelection, applyStrokeWidthToSelection, getColorsFromSelection, MIXED}
|
import {
|
||||||
from '../helper/style-path';
|
applyColorToSelection, applyStrokeWidthToSelection, getColorsFromSelection, MIXED
|
||||||
|
} from '../helper/style-path';
|
||||||
import GradientTypes from '../lib/gradient-types';
|
import GradientTypes from '../lib/gradient-types';
|
||||||
import Modes from '../lib/modes';
|
import Modes from '../lib/modes';
|
||||||
import Formats, {isBitmap} from '../lib/format';
|
import Formats, {isBitmap} from '../lib/format';
|
||||||
|
|
|
@ -4,8 +4,9 @@ import {isGroup} from '../group';
|
||||||
import {isCompoundPathItem, getRootItem} from '../item';
|
import {isCompoundPathItem, getRootItem} from '../item';
|
||||||
import {checkPointsClose, snapDeltaToAngle} from '../math';
|
import {checkPointsClose, snapDeltaToAngle} from '../math';
|
||||||
import {getActionBounds, CENTER} from '../view';
|
import {getActionBounds, CENTER} from '../view';
|
||||||
import {clearSelection, cloneSelection, getSelectedLeafItems, getSelectedRootItems, setItemSelection}
|
import {
|
||||||
from '../selection';
|
clearSelection, cloneSelection, getSelectedLeafItems, getSelectedRootItems, setItemSelection
|
||||||
|
} from '../selection';
|
||||||
import {getDragCrosshairLayer, CROSSHAIR_FULL_OPACITY} from '../layer';
|
import {getDragCrosshairLayer, CROSSHAIR_FULL_OPACITY} from '../layer';
|
||||||
|
|
||||||
/** Snap to align selection center to rotation center within this distance */
|
/** Snap to align selection center to rotation center within this distance */
|
||||||
|
|
|
@ -633,8 +633,7 @@ const styleShape = function (path, options) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Object.prototype.hasOwnProperty.call(options, 'strokeWidth')) path.strokeWidth = options.strokeWidth;
|
||||||
if (options.hasOwnProperty('strokeWidth')) path.strokeWidth = options.strokeWidth;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
@ -14,6 +14,7 @@ test('initialState', () => {
|
||||||
|
|
||||||
test('changeBrushSize', () => {
|
test('changeBrushSize', () => {
|
||||||
let defaultState;
|
let defaultState;
|
||||||
|
|
||||||
const newBrushSize = 8078;
|
const newBrushSize = 8078;
|
||||||
|
|
||||||
expect(brushReducer(defaultState /* state */, changeBrushSize(newBrushSize) /* action */))
|
expect(brushReducer(defaultState /* state */, changeBrushSize(newBrushSize) /* action */))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue