Skip to content

Commit 271a262

Browse files
committed
prettier 2.8.8
1 parent 1354ba3 commit 271a262

File tree

17 files changed

+2463
-2773
lines changed

17 files changed

+2463
-2773
lines changed

Diff for: .stylelintrc

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
{
2-
"plugins": [
3-
"stylelint-order"
4-
],
5-
"rules": {
6-
"order/order": [
7-
"custom-properties",
8-
"declarations"
9-
],
10-
"order/properties-alphabetical-order": true
11-
}
12-
}
2+
"plugins": ["stylelint-order"],
3+
"rules": {
4+
"order/order": ["custom-properties", "declarations"],
5+
"order/properties-alphabetical-order": true
6+
}
7+
}

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"jest-css-modules": "^2.1.0",
132132
"jest-image-snapshot": "^4.0.0",
133133
"npm-run-all": "^4.1.5",
134-
"prettier": "^2.0.4",
134+
"prettier": "^2.8.8",
135135
"progress-bar-webpack-plugin": "^2.1.0",
136136
"raw-loader": "^4.0.1",
137137
"rimraf": "^5.0.0",

Diff for: src/components/Drawing/DrawingContent/DrawingContent.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,8 @@ export class DrawingContent extends React.Component {
229229
};
230230

231231
getDrawingEndProcessor = () => {
232-
const {
233-
formatTempCoords,
234-
formatFinalCoords
235-
} = this.getActiveModeHandlers();
232+
const { formatTempCoords, formatFinalCoords } =
233+
this.getActiveModeHandlers();
236234

237235
if (formatFinalCoords != null) {
238236
return formatFinalCoords;

Diff for: src/components/Drawing/DrawingSidebar/DrawingSidebar.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ class DrawingSidebar extends React.Component {
139139
>
140140
{mainMode === 'draw' &&
141141
_.keys(DRAWING_MODES).map((modeKey) => {
142-
const { displayName, emoji } = DRAWING_MODES[
143-
modeKey
144-
];
142+
const { displayName, emoji } =
143+
DRAWING_MODES[modeKey];
145144
return (
146145
<EmojiButton
147146
key={modeKey}

Diff for: src/components/Drawing/DrawingSidebar/MultiplyCanvasOptions.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ import PercentClicker from 'components/common/PercentClicker/PercentClicker';
77
import styles from './ShrinkCanvasOptions.styles.css';
88

99
const MultiplyCanvasOptions = (props) => {
10-
const {
11-
multiplyCanvasOptions,
12-
globalHeight,
13-
globalWidth,
14-
dispatch
15-
} = props;
10+
const { multiplyCanvasOptions, globalHeight, globalWidth, dispatch } =
11+
props;
1612

1713
const { x, y } = multiplyCanvasOptions;
1814
const finalHeight = globalHeight * y;

Diff for: src/components/Drawing/modes/circle.mode.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ const makeCircle = (centerX, centerY, radius, pointsOnCircle = 50) => {
1414
};
1515

1616
const formatTempCoords = (tempCoords, { pointsOnCircle }) => {
17-
const [startCoords, endCoords] = getFirstAndLastCoordsFromTempCoords(
18-
tempCoords
19-
);
17+
const [startCoords, endCoords] =
18+
getFirstAndLastCoordsFromTempCoords(tempCoords);
2019

2120
const [x1, y1] = startCoords;
2221
const [x2, y2] = endCoords;

Diff for: src/components/Drawing/modes/square.mode.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import { allPointsBetweenTwoCoords } from '../../../utils/coordUtils';
33
import { getFirstAndLastCoordsFromTempCoords } from '../../../utils/drawingUtils';
44

55
const formatTempCoords = (coords) => {
6-
const [startCoords, endCoords] = getFirstAndLastCoordsFromTempCoords(
7-
coords
8-
);
6+
const [startCoords, endCoords] =
7+
getFirstAndLastCoordsFromTempCoords(coords);
98
const [startX, startY] = startCoords;
109
const [endX, endY] = endCoords;
1110
const fourCorners = _.clone([
@@ -21,9 +20,8 @@ const formatTempCoords = (coords) => {
2120

2221
const formatFinalCoords = (coords, options) => {
2322
const { pointsOnEachLine } = options;
24-
const [startCoords, endCoords] = getFirstAndLastCoordsFromTempCoords(
25-
coords
26-
);
23+
const [startCoords, endCoords] =
24+
getFirstAndLastCoordsFromTempCoords(coords);
2725
const [startX, startY] = startCoords;
2826
const [endX, endY] = endCoords;
2927

Diff for: src/components/Drawing/modes/straightLine.mode.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { allPointsBetweenTwoCoords } from '../../../utils/coordUtils';
22
import { getFirstAndLastCoordsFromTempCoords } from '../../../utils/drawingUtils';
33

44
const formatTempCoords = (tempCoords, { pointsOnEachLine }) => {
5-
const [startCoords, endCoords] = getFirstAndLastCoordsFromTempCoords(
6-
tempCoords
7-
);
5+
const [startCoords, endCoords] =
6+
getFirstAndLastCoordsFromTempCoords(tempCoords);
87

98
const allPoints = allPointsBetweenTwoCoords(startCoords, endCoords, {
109
maxPointCount: pointsOnEachLine

Diff for: src/components/EfxSidebar/EfxSidebar.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,8 @@ class EfxSidebar extends React.Component {
185185
};
186186

187187
processEfxLinesForLayer = (layerID) => {
188-
const {
189-
allOriginalLines,
190-
globalSettings,
191-
allLayers,
192-
dispatch
193-
} = this.props;
188+
const { allOriginalLines, globalSettings, allLayers, dispatch } =
189+
this.props;
194190

195191
const { filters } = allLayers.find((l) => l.id === layerID);
196192
const linesForThisLayer = allOriginalLines[layerID];
@@ -281,12 +277,8 @@ class EfxSidebar extends React.Component {
281277
dispatch
282278
} = this.props;
283279

284-
const {
285-
savingPreset,
286-
savePresetName,
287-
presets,
288-
loadingMessage
289-
} = this.state;
280+
const { savingPreset, savePresetName, presets, loadingMessage } =
281+
this.state;
290282

291283
return (
292284
<SidebarContainer>

Diff for: src/components/GifmakerContent/GifmakerSidebar.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,8 @@ class GifmakerSidebar extends React.Component {
8181
};
8282

8383
render() {
84-
const {
85-
loading,
86-
frames,
87-
gifFrameDelay,
88-
gifBackgroundColor,
89-
dispatch
90-
} = this.props;
84+
const { loading, frames, gifFrameDelay, gifBackgroundColor, dispatch } =
85+
this.props;
9186

9287
if (loading) {
9388
return <SidebarContainer> LOADING </SidebarContainer>;

Diff for: src/components/OptionsSidebar/OptionsSidebar.js

+4-14
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,8 @@ class OptionsSidebar extends React.Component {
6161
};
6262

6363
isDirty = () => {
64-
const {
65-
height,
66-
width,
67-
pointShowRadius,
68-
pointShowColor,
69-
shiftToDraw
70-
} = this.props;
64+
const { height, width, pointShowRadius, pointShowColor, shiftToDraw } =
65+
this.props;
7166
const {
7267
tempHeight,
7368
tempWidth,
@@ -92,13 +87,8 @@ class OptionsSidebar extends React.Component {
9287
};
9388

9489
render() {
95-
const {
96-
height,
97-
width,
98-
pointShowRadius,
99-
pointShowColor,
100-
shiftToDraw
101-
} = this.props;
90+
const { height, width, pointShowRadius, pointShowColor, shiftToDraw } =
91+
this.props;
10292
const {
10393
tempHeight,
10494
tempWidth,

Diff for: src/components/PlotSidebar/PlotSidebar.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,8 @@ class PlotSidebar extends React.Component {
113113
dispatch(setCurrentPlotPercentage(0));
114114

115115
const lineDrawCallback = (response) => {
116-
const {
117-
currentLineId,
118-
currentLineCount,
119-
totalLineCount
120-
} = response;
116+
const { currentLineId, currentLineCount, totalLineCount } =
117+
response;
121118

122119
dispatch(setCurrentLineId(currentLineId));
123120
this.setCurrentLineIndex(currentLineCount);

Diff for: src/filters/Distort.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ const filterName = 'distort';
66
const displayName = 'dist0rt';
77

88
const DistortComponent = ({ filterSettings, updateOptions }) => {
9-
const {
10-
percentToAffect,
11-
distortionAmount,
12-
horizontal,
13-
vertical
14-
} = filterSettings;
9+
const { percentToAffect, distortionAmount, horizontal, vertical } =
10+
filterSettings;
1511

1612
return (
1713
<>
@@ -66,12 +62,8 @@ const DistortComponent = ({ filterSettings, updateOptions }) => {
6662
export const DistortFilter = ({ filterSettings, pointArrays }) => {
6763
if (!filterSettings || !filterSettings.enabled) return pointArrays;
6864

69-
const {
70-
percentToAffect,
71-
distortionAmount,
72-
horizontal,
73-
vertical
74-
} = filterSettings;
65+
const { percentToAffect, distortionAmount, horizontal, vertical } =
66+
filterSettings;
7567

7668
const yValueMap = {};
7769
const xValueMap = {};

Diff for: src/utils/__tests__/coordUtils.test.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,22 @@ describe('isPointOnLineBetweenTwoCoords()', () => {
167167
it('should return true when point is on line', () => {
168168
const startCoords = [0, 0];
169169
const endCoords = [100, 100];
170-
const result = isPointOnLineBetweenTwoCoords(startCoords, endCoords, [
171-
10,
172-
10
173-
]);
170+
const result = isPointOnLineBetweenTwoCoords(
171+
startCoords,
172+
endCoords,
173+
[10, 10]
174+
);
174175
expect(result).toBe(true);
175176
});
176177

177178
it('should return false when point is not on line', () => {
178179
const startCoords = [0, 0];
179180
const endCoords = [100, 100];
180-
const result = isPointOnLineBetweenTwoCoords(startCoords, endCoords, [
181-
10,
182-
50
183-
]);
181+
const result = isPointOnLineBetweenTwoCoords(
182+
startCoords,
183+
endCoords,
184+
[10, 50]
185+
);
184186
expect(result).toBe(false);
185187
});
186188
});

Diff for: src/utils/__tests__/fillLines.test.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -142,25 +142,8 @@ const testLinesAtAngle = (context, angle) => {
142142
};
143143

144144
const ANGLES = [
145-
0,
146-
10,
147-
20,
148-
30,
149-
40,
150-
50,
151-
60,
152-
70,
153-
80,
154-
90,
155-
100,
156-
110,
157-
120,
158-
130,
159-
140,
160-
150,
161-
160,
162-
170,
163-
180
145+
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160,
146+
170, 180
164147
];
165148

166149
describe('Draw Lines At Angle', () => {

Diff for: src/utils/lineSortUtils.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ export const findNearestLine = (currentLine, remainingLines) => {
1515
).end;
1616

1717
remainingLines.forEach(({ id, pointArrayContainer }) => {
18-
const { start, end } = getStartAndEndPointsOfCoords(
19-
pointArrayContainer
20-
);
18+
const { start, end } =
19+
getStartAndEndPointsOfCoords(pointArrayContainer);
2120

2221
const startDistance = distanceBetweenTwoCoords(currentLineEnd, start);
2322
const endDistance = distanceBetweenTwoCoords(currentLineEnd, end);

0 commit comments

Comments
 (0)