Skip to content

Commit 46da5ed

Browse files
committed
update/fix tests, prettier printWidth 100
1 parent db53bf1 commit 46da5ed

File tree

6 files changed

+94
-294
lines changed

6 files changed

+94
-294
lines changed

Diff for: .eslintrc

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
"node": true
2121
},
2222
"rules": {
23+
"prettier/prettier": [
24+
"error",
25+
{
26+
"singleQuote": true,
27+
"semi": false,
28+
"printWidth": 100
29+
}
30+
],
2331
"valid-jsdoc": 2,
2432
"react/jsx-uses-react": 1,
2533
"react/jsx-no-undef": 2,

Diff for: .prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"printWidth": 100,
23
"semi": false,
34
"singleQuote": true,
45
"tabWidth": 2

Diff for: rollup.config.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ import pkg from './package.json'
33

44
export default {
55
input: './src/index.js',
6-
output: [
7-
{ file: `${pkg.main}`, format: 'cjs' },
8-
{ file: `${pkg.module}`, format: 'es' }
9-
],
10-
external: [
11-
...Object.keys(pkg.dependencies || {}),
12-
...Object.keys(pkg.peerDependencies || {})
13-
],
6+
output: [{ file: `${pkg.main}`, format: 'cjs' }, { file: `${pkg.module}`, format: 'es' }],
7+
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
148
plugins: [babel()]
159
}

Diff for: src/__tests__/__snapshots__/index.spec.js.snap

-114
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,5 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Swipeable allows touchHandlerOption overwrite: verify touchHandlerOption overwrite 1`] = `
4-
Array [
5-
Array [
6-
"touchmove",
7-
[Function],
8-
Object {
9-
"capture": true,
10-
},
11-
],
12-
Array [
13-
"touchend",
14-
[Function],
15-
Object {
16-
"capture": true,
17-
},
18-
],
19-
]
20-
`;
21-
22-
exports[`Swipeable calls preventDefault when swiping in direction that has a callback: verify touchHandlerOption passive is false 1`] = `
23-
Array [
24-
Array [
25-
"touchmove",
26-
[Function],
27-
Object {
28-
"passive": false,
29-
},
30-
],
31-
Array [
32-
"touchend",
33-
[Function],
34-
Object {
35-
"passive": false,
36-
},
37-
],
38-
]
39-
`;
40-
41-
exports[`Swipeable does not call preventDefault when false: verify touchHandlerOption passive is true 1`] = `
42-
Array [
43-
Array [
44-
"touchmove",
45-
[Function],
46-
Object {
47-
"passive": true,
48-
},
49-
],
50-
Array [
51-
"touchend",
52-
[Function],
53-
Object {
54-
"passive": true,
55-
},
56-
],
57-
]
58-
`;
59-
603
exports[`Swipeable handles mouse events with trackMouse prop and fires correct props: Swipeable onSwiped trackMouse 1`] = `
614
Array [
625
Array [
@@ -251,63 +194,6 @@ Array [
251194
]
252195
`;
253196

254-
exports[`useSwipeable allows touchHandlerOption overwrite: verify touchHandlerOption overwrite 1`] = `
255-
Array [
256-
Array [
257-
"touchmove",
258-
[Function],
259-
Object {
260-
"capture": true,
261-
},
262-
],
263-
Array [
264-
"touchend",
265-
[Function],
266-
Object {
267-
"capture": true,
268-
},
269-
],
270-
]
271-
`;
272-
273-
exports[`useSwipeable calls preventDefault when swiping in direction that has a callback: verify touchHandlerOption passive is false 1`] = `
274-
Array [
275-
Array [
276-
"touchmove",
277-
[Function],
278-
Object {
279-
"passive": false,
280-
},
281-
],
282-
Array [
283-
"touchend",
284-
[Function],
285-
Object {
286-
"passive": false,
287-
},
288-
],
289-
]
290-
`;
291-
292-
exports[`useSwipeable does not call preventDefault when false: verify touchHandlerOption passive is true 1`] = `
293-
Array [
294-
Array [
295-
"touchmove",
296-
[Function],
297-
Object {
298-
"passive": true,
299-
},
300-
],
301-
Array [
302-
"touchend",
303-
[Function],
304-
Object {
305-
"passive": true,
306-
},
307-
],
308-
]
309-
`;
310-
311197
exports[`useSwipeable handles mouse events with trackMouse prop and fires correct props: useSwipeable onSwiped trackMouse 1`] = `
312198
Array [
313199
Array [

0 commit comments

Comments
 (0)