Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9a2fc92

Browse files
committed
Use default(y) prettier values
1 parent 7bdc9fb commit 9a2fc92

File tree

24 files changed

+60
-65
lines changed

24 files changed

+60
-65
lines changed

‎.prettierrc.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
module.exports = {
2-
bracketSpacing: true,
3-
printWidth: 80,
42
proseWrap: 'always',
53
semi: false,
6-
singleQuote: true,
7-
tabWidth: 2,
8-
trailingComma: 'es5',
9-
useTabs: false,
4+
singleQuote: true
105
}

‎jest.config.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ module.exports = {
22
moduleDirectories: ['node_modules', 'src'],
33
moduleFileExtensions: ['js', 'vue'],
44
moduleNameMapper: {
5-
'@testing-library/vue': '<rootDir>/src/vue-testing-library.js',
5+
'@testing-library/vue': '<rootDir>/src/vue-testing-library.js'
66
},
77
coverageDirectory: './coverage',
88
collectCoverageFrom: [
99
'**/src/**/*.js',
1010
'!**/tests/__tests__/**',
11-
'!**/node_modules/**',
11+
'!**/node_modules/**'
1212
],
1313
testPathIgnorePatterns: [
1414
'/node_modules/',
1515
'<rootDir>/dist/',
16-
'<rootDir>/tests/__tests__/components/',
16+
'<rootDir>/tests/__tests__/components/'
1717
],
1818
transform: {
1919
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
20-
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest',
20+
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
2121
},
22-
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
22+
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue']
2323
}

‎src/vue-testing-library.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
getQueriesForElement,
55
prettyDOM,
66
wait,
7-
fireEvent,
7+
fireEvent
88
} from '@testing-library/dom'
99

1010
const mountedWrappers = new Set()
@@ -28,7 +28,7 @@ function render(
2828
const VueRouter = require('vue-router')
2929
localVue.use(VueRouter)
3030
router = new VueRouter({
31-
routes,
31+
routes
3232
})
3333
}
3434

@@ -47,7 +47,7 @@ function render(
4747
store: vuexStore,
4848
attachToDocument: true,
4949
sync: false,
50-
...mountOptions,
50+
...mountOptions
5151
})
5252

5353
mountedWrappers.add(wrapper)
@@ -70,7 +70,7 @@ function render(
7070
wrapper.setProps(_)
7171
return wait()
7272
},
73-
...getQueriesForElement(wrapper.element.parentNode),
73+
...getQueriesForElement(wrapper.element.parentNode)
7474
}
7575
}
7676

‎tests/__mocks__/axios.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
get: jest.fn(() => Promise.resolve({ data: {} })),
2+
get: jest.fn(() => Promise.resolve({ data: {} }))
33
}

‎tests/__tests__/components/Button.vue‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ export default {
77
props: {
88
text: {
99
type: String,
10-
default: '',
10+
default: ''
1111
},
1212
type: {
1313
validator: value => ['primary', 'secondary'].includes(value),
14-
default: 'primary',
15-
},
14+
default: 'primary'
15+
}
1616
},
1717
computed: {
1818
typeClass: function() {
1919
if (this.type) {
2020
return `button button--${this.type}`
2121
}
2222
return 'button'
23-
},
23+
}
2424
},
2525
methods: {
2626
handleClick(e) {
2727
this.$emit('click')
28-
},
29-
},
28+
}
29+
}
3030
}
3131
</script>

‎tests/__tests__/components/EndToEnd.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ export default {
2323
return {
2424
loading: true,
2525
data: {
26-
returnedMessage: null,
27-
},
26+
returnedMessage: null
27+
}
2828
}
2929
},
3030
async mounted() {
3131
const data = await fetchAMessage()
3232
this.loading = false
3333
this.data = data
34-
},
34+
}
3535
}
3636
</script>

‎tests/__tests__/components/Fetch.vue‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ export default {
1616
props: {
1717
url: {
1818
type: String,
19-
required: true,
20-
},
19+
required: true
20+
}
2121
},
2222
data() {
2323
return {
24-
data: null,
24+
data: null
2525
}
2626
},
2727
methods: {
2828
fetch() {
2929
axios.get(this.url).then(response => {
3030
this.data = response.data
3131
})
32-
},
33-
},
32+
}
33+
}
3434
}
3535
</script>

‎tests/__tests__/components/Form.vue‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ export default {
5858
review: '',
5959
rating: '1',
6060
genre: 'Comedy',
61-
recommend: false,
61+
recommend: false
6262
}
6363
},
6464
computed: {
6565
submitDisabled() {
6666
return !this.title || !this.review
67-
},
67+
}
6868
},
6969
methods: {
7070
submit() {
@@ -75,9 +75,9 @@ export default {
7575
review: this.review,
7676
rating: this.rating,
7777
genre: this.genre,
78-
recommend: this.recommend,
78+
recommend: this.recommend
7979
})
80-
},
81-
},
80+
}
81+
}
8282
}
8383
</script>

‎tests/__tests__/components/NumberDisplay.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export default {
1212
props: {
1313
number: {
1414
type: Number,
15-
required: true,
16-
},
15+
required: true
16+
}
1717
},
1818
data() {
1919
return {
20-
id: idCounter++,
20+
id: idCounter++
2121
}
22-
},
22+
}
2323
}
2424
</script>

‎tests/__tests__/components/StopWatch.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
return {
1414
running: false,
1515
lapse: 0,
16-
timer: null,
16+
timer: null
1717
}
1818
},
1919
beforeDestroy() {
@@ -32,7 +32,7 @@ export default {
3232
}
3333
3434
this.running = !this.running
35-
},
36-
},
35+
}
36+
}
3737
}
3838
</script>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /