Skip to content

Commit 43d5210

Browse files
committed
fmt
1 parent d2d02d1 commit 43d5210

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['swiftcarrot']
2+
presets: ['swiftcarrot'],
33
};

rollup.config.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@ import nodeResolve from '@rollup/plugin-node-resolve';
44
import pkg from './package.json';
55

66
const input = './src/index.js';
7-
const external = id => !id.startsWith('.') && !id.startsWith('/');
7+
const external = (id) => !id.startsWith('.') && !id.startsWith('/');
88

99
export default [
1010
{
1111
input,
1212
output: {
1313
file: pkg.main,
14-
format: 'cjs'
14+
format: 'cjs',
1515
},
1616
external,
1717
plugins: [
1818
babel({
1919
runtimeHelpers: true,
20-
plugins: ['@babel/transform-runtime']
20+
plugins: ['@babel/transform-runtime'],
2121
}),
2222
nodeResolve(),
23-
commonjs()
24-
]
23+
commonjs(),
24+
],
2525
},
2626

2727
{
2828
input,
2929
output: {
3030
file: pkg.module,
31-
format: 'esm'
31+
format: 'esm',
3232
},
3333
external,
3434
plugins: [
3535
babel({
3636
runtimeHelpers: true,
37-
plugins: [['@babel/transform-runtime', { useESModules: true }]]
37+
plugins: [['@babel/transform-runtime', { useESModules: true }]],
3838
}),
3939
nodeResolve(),
40-
commonjs()
41-
]
42-
}
40+
commonjs(),
41+
],
42+
},
4343
];

src/__tests__/input-color.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test('parseColor', () => {
1919
v: 86,
2020
a: 100,
2121
hex: '#3498db',
22-
rgba: 'rgba(52,152,219,1)'
22+
rgba: 'rgba(52,152,219,1)',
2323
});
2424
expect(parseColor('#3498db32')).toEqual({
2525
r: 52,
@@ -30,7 +30,7 @@ test('parseColor', () => {
3030
v: 86,
3131
a: 20,
3232
hex: '#3498db',
33-
rgba: 'rgba(52,152,219,0.2)'
33+
rgba: 'rgba(52,152,219,0.2)',
3434
});
3535
});
3636

src/input-color.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const InputColor = ({ initialValue, onChange, placement, ...props }) => {
5454
};
5555

5656
InputColor.defaultProps = {
57-
placement: 'bottom'
57+
placement: 'bottom',
5858
};
5959

6060
export default InputColor;

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export {
2020
hsv2hex,
2121
hex2rgb,
2222
rgba,
23-
hsv2rgb
23+
hsv2rgb,
2424
} from '@swiftcarrot/color-fns';

stories/InputColor.stories.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import InputColor from '../src';
33

44
export default {
55
title: 'InputColor',
6-
component: InputColor
6+
component: InputColor,
77
};
88

99
export const Demo = () => {
@@ -22,15 +22,15 @@ export const Demo = () => {
2222
width: 50,
2323
height: 50,
2424
marginBottom: 20,
25-
backgroundColor: color.rgba
25+
backgroundColor: color.rgba,
2626
}}
2727
>
2828
{color.rgba}
2929
</div>
3030
<input
3131
type="color"
3232
value={color.hex}
33-
onChange={e => setInitial(e.target.value)}
33+
onChange={(e) => setInitial(e.target.value)}
3434
/>
3535
<br />
3636
<InputColor initialValue={initial} onChange={handleChange} />
@@ -53,7 +53,7 @@ export const Alpha = () => {
5353
width: 50,
5454
height: 50,
5555
marginBottom: 20,
56-
backgroundColor: color.rgba
56+
backgroundColor: color.rgba,
5757
}}
5858
>
5959
{color.rgba}

0 commit comments

Comments
 (0)