Skip to content

Commit cd89e81

Browse files
committed
fixup prettier
1 parent 752fe43 commit cd89e81

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

examples/custom/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const dataSources = {
99
col2: [4, 3, 2], // eslint-disable-line no-magic-numbers
1010
col3: [17, 13, 9], // eslint-disable-line no-magic-numbers
1111
};
12-
const dataSourceOptions = Object.keys(dataSources).map(name => ({
12+
const dataSourceOptions = Object.keys(dataSources).map((name) => ({
1313
value: name,
1414
label: name,
1515
}));

examples/custom/src/CustomEditor.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,28 @@ export default class CustomEditor extends Component {
4747
label="Dropdown"
4848
attr="xaxis.title"
4949
show
50-
options={[{label: 'Yes', value: 'yes'}, {label: 'No', value: 'no'}]}
50+
options={[
51+
{label: 'Yes', value: 'yes'},
52+
{label: 'No', value: 'no'},
53+
]}
5154
/>
5255
<Radio
5356
label="Radio"
5457
attr="yaxis.title"
5558
show
56-
options={[{label: 'Yes', value: 'yes'}, {label: 'No', value: 'no'}]}
59+
options={[
60+
{label: 'Yes', value: 'yes'},
61+
{label: 'No', value: 'no'},
62+
]}
5763
/>
5864
<Flaglist
5965
label="Flaglist"
6066
attr="title.font.family"
6167
show
62-
options={[{label: 'Yes', value: 'y'}, {label: 'No', value: 'n'}]}
68+
options={[
69+
{label: 'Yes', value: 'y'},
70+
{label: 'No', value: 'n'},
71+
]}
6372
/>
6473
<ColorPicker label="ColorPicker" attr="plot_bgcolor" show />
6574
<TextEditor attr="title" label="TextEditor default" />

examples/demo/src/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'react-chart-editor/lib/react-chart-editor.css';
55
import Nav from './Nav';
66
import dataSources from './dataSources';
77

8-
const dataSourceOptions = Object.keys(dataSources).map(name => ({
8+
const dataSourceOptions = Object.keys(dataSources).map((name) => ({
99
value: name,
1010
label: name,
1111
}));
@@ -29,17 +29,17 @@ class App extends Component {
2929

3030
UNSAFE_componentWillMount() {
3131
fetch('https://api.github.com/repos/plotly/plotly.js/contents/test/image/mocks')
32-
.then(response => response.json())
33-
.then(mocks => this.setState({mocks}));
32+
.then((response) => response.json())
33+
.then((mocks) => this.setState({mocks}));
3434
}
3535

3636
loadMock(mockIndex) {
3737
const mock = this.state.mocks[mockIndex];
3838
fetch(mock.url, {
3939
headers: new Headers({Accept: 'application/vnd.github.v3.raw'}),
4040
})
41-
.then(response => response.json())
42-
.then(figure => {
41+
.then((response) => response.json())
42+
.then((figure) => {
4343
this.setState({
4444
currentMockIndex: mockIndex,
4545
data: figure.data,

examples/demo/src/Nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Nav = ({mocks, currentMockIndex, loadMock}) => (
2020
value: i,
2121
}))}
2222
value={currentMockIndex}
23-
onChange={option => loadMock(option)}
23+
onChange={(option) => loadMock(option)}
2424
/>
2525
</div>
2626
</div>

examples/redux/src/App.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const dataSources = {
1212
col2: [4, 3, 2], // eslint-disable-line no-magic-numbers
1313
col3: [17, 13, 9], // eslint-disable-line no-magic-numbers
1414
};
15-
const dataSourceOptions = Object.keys(dataSources).map(name => ({
15+
const dataSourceOptions = Object.keys(dataSources).map((name) => ({
1616
value: name,
1717
label: name,
1818
}));
@@ -29,14 +29,7 @@ class App extends Component {
2929
}
3030

3131
render() {
32-
const {
33-
actions,
34-
dataSources,
35-
dataSourceOptions,
36-
data,
37-
layout,
38-
frames,
39-
} = this.props;
32+
const {actions, dataSources, dataSourceOptions, data, layout, frames} = this.props;
4033

4134
return (
4235
<div className="app">
@@ -67,15 +60,15 @@ App.propTypes = {
6760
frames: PropTypes.array,
6861
};
6962

70-
const mapStateToProps = state => ({
63+
const mapStateToProps = (state) => ({
7164
dataSourceOptions: state.dataSourceOptions,
7265
dataSources: state.dataSources,
7366
data: state.data,
7467
layout: state.layout,
7568
frames: state.frames,
7669
});
7770

78-
const mapDispatchToProps = dispatch => ({
71+
const mapDispatchToProps = (dispatch) => ({
7972
actions: bindActionCreators(actions, dispatch),
8073
});
8174

examples/simple/src/App.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const dataSources = {
99
col3: [17, 13, 9], // eslint-disable-line no-magic-numbers
1010
};
1111

12-
const dataSourceOptions = Object.keys(dataSources).map(name => ({
12+
const dataSourceOptions = Object.keys(dataSources).map((name) => ({
1313
value: name,
1414
label: name,
1515
}));
@@ -33,9 +33,7 @@ class App extends Component {
3333
dataSources={dataSources}
3434
dataSourceOptions={dataSourceOptions}
3535
plotly={plotly}
36-
onUpdate={(data, layout, frames) =>
37-
this.setState({data, layout, frames})
38-
}
36+
onUpdate={(data, layout, frames) => this.setState({data, layout, frames})}
3937
useResizeHandler
4038
debug
4139
advancedTraceTypeSelector

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"test": "npm run test:lint && npm run test:pretty && npm run test:js",
2121
"test:js": "jest --setupTestFrameworkScriptFile=raf/polyfill --maxWorkers=2",
2222
"test:lint": "eslint \"src/**/*.js\" \"dev/**/*.js\" \"examples/**/*.js\" && echo -e '\\033[0;32m'PASS'\\033[0m'",
23-
"test:pretty": "prettier -l \"src/**/*.js\" \"dev/**/*.js\" \"examples/**/*.js\" && echo -e '\\033[0;32m'PASS'\\033[0m'",
23+
"test:pretty": "prettier -l \"src/**/*.{js,scss}\" \"dev/**/*.{js,scss}\" \"examples/**/*.{js,scss}\" && echo -e '\\033[0;32m'PASS'\\033[0m'",
2424
"test:percy": "node --max-old-space-size=4096 $(npm bin)/build-storybook && percy storybook ./storybook-static",
2525
"test:percy-local": "node --max-old-space-size=4096 $(npm bin)/build-storybook",
2626
"test:watch": "jest --watch"

src/styles/_helpers.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use "sass:map";
1+
@use 'sass:map';
22
.\+flex {
33
display: flex;
44
}

src/styles/components/widgets/_rangeslider.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Rangeslider
33
*/
4-
@use "sass:math";
4+
@use 'sass:math';
55

66
.rangeslider {
77
margin: 0 var(--spacing-quarter-unit);
@@ -84,9 +84,9 @@
8484
&:after {
8585
content: ' ';
8686
position: absolute;
87-
width: $size*0.2;
87+
width: $size * 0.2;
8888
height: $size;
89-
border-radius: $size*0.25;
89+
border-radius: $size * 0.25;
9090
background-color: var(--color-accent);
9191
display: none;
9292
}

0 commit comments

Comments
 (0)