Skip to content

Commit 23d0092

Browse files
committed
ESLint: enforce trailing commas
1 parent 2d41afd commit 23d0092

File tree

163 files changed

+1636
-1630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1636
-1630
lines changed

.eslintrc.cjs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18+
const commaDangle = {
19+
arrays: 'always-multiline',
20+
objects: 'always-multiline',
21+
imports: 'always-multiline',
22+
exports: 'always-multiline',
23+
functions: 'only-multiline',
24+
}
25+
1826
module.exports = {
1927
root: true,
2028
parserOptions: {
@@ -32,40 +40,38 @@ module.exports = {
3240
rules: {
3341
'comma-dangle': [
3442
'error',
35-
{
36-
arrays: 'only-multiline',
37-
objects: 'only-multiline',
38-
imports: 'only-multiline',
39-
exports: 'only-multiline',
40-
functions: 'only-multiline',
41-
},
43+
commaDangle,
44+
],
45+
'vue/comma-dangle': [
46+
'error',
47+
commaDangle,
4248
],
4349
'no-console': [
4450
'error',
4551
{
46-
allow: ['warn', 'error']
47-
}
52+
allow: ['warn', 'error'],
53+
},
4854
],
4955
'template-curly-spacing': [
50-
'off'
56+
'off',
5157
],
5258
'vue/multi-word-component-names': [
53-
'off'
59+
'off',
5460
],
5561
'vue/valid-v-slot': [
5662
'error',
5763
{
58-
allowModifiers: true
59-
}
64+
allowModifiers: true,
65+
},
6066
],
6167
'promise/param-names': [
62-
'error'
68+
'error',
6369
],
6470
'promise/no-return-wrap': [
65-
'error'
71+
'error',
6672
],
6773
'cypress/unsafe-to-chain-command': [
68-
'off'
74+
'off',
6975
],
7076
},
7177
}

cypress.config.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ module.exports = defineConfig({
3636
return config
3737
},
3838
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
39-
supportFile: 'tests/e2e/support/index.js'
39+
supportFile: 'tests/e2e/support/index.js',
4040
},
4141

4242
component: {
4343
devServer: {
4444
framework: 'vue',
45-
bundler: 'vite'
45+
bundler: 'vite',
4646
},
4747
setupNodeEvents (on, config) {
4848
// For test coverage
@@ -51,12 +51,12 @@ module.exports = defineConfig({
5151
},
5252
specPattern: 'tests/component/**/*.cy.{js,jsx,ts,tsx}',
5353
supportFile: 'tests/component/support/index.js',
54-
indexHtmlFile: 'tests/component/support/component-index.html'
54+
indexHtmlFile: 'tests/component/support/component-index.html',
5555
},
5656

5757
env: {
5858
// eslint-disable-next-line no-unneeded-ternary
59-
coverage: process.env.COVERAGE ? true : false
59+
coverage: process.env.COVERAGE ? true : false,
6060
},
6161

6262
morgan: false, // Disable XHR logging as it's very noisy

scripts/concurrently.cjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ const allCommands = {
88
'serve:jupyterhub': {
99
command: 'yarn run serve:jupyterhub',
1010
name: 'SERVER',
11-
prefixColor: 'yellow'
11+
prefixColor: 'yellow',
1212
},
1313
'serve:vue': {
1414
command: `yarn run serve:vue ${VITE_OPTIONS ?? ''}`,
1515
name: 'VITE',
16-
prefixColor: 'blue'
16+
prefixColor: 'blue',
1717
},
1818
preview: {
1919
command: `yarn run -B vite preview --mode offline ${VITE_OPTIONS ?? ''}`,
2020
name: 'VITE',
21-
prefixColor: 'blue'
21+
prefixColor: 'blue',
2222
},
2323
'e2e:open': {
2424
command: 'yarn run -B cypress open --e2e',
2525
name: 'TESTS',
26-
prefixColor: 'magenta'
26+
prefixColor: 'magenta',
2727
},
2828
'cy:run': {
2929
command: 'yarn run -B cypress run',
3030
name: 'TESTS',
31-
prefixColor: 'cyan'
32-
}
31+
prefixColor: 'cyan',
32+
},
3333
}
3434

3535
concurrently(

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const vuetifyDefaults = computed(() => ({
4545
global: {
4646
transition: reducedAnimation.value ? 'no' : undefined,
4747
ripple: reducedAnimation.value ? false : undefined,
48-
}
48+
},
4949
}))
5050
5151
onMounted(() => {

src/components/Markdown.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ export default {
3434
props: {
3535
markdown: {
3636
type: String,
37-
required: true
38-
}
37+
required: true,
38+
},
3939
},
4040
4141
computed: {
4242
html () {
4343
return md.render(this.markdown)
44-
}
45-
}
44+
},
45+
},
4646
}
4747
</script>

src/components/core/Alert.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
name: 'Alert',
4747
4848
computed: {
49-
...mapState(['alert'])
49+
...mapState(['alert']),
5050
},
5151
5252
methods: {
@@ -56,11 +56,11 @@ export default {
5656
*/
5757
closeAlert () {
5858
this.setAlert(null)
59-
}
59+
},
6060
},
6161
6262
icons: {
63-
mdiClose
64-
}
63+
mdiClose,
64+
},
6565
}
6666
</script>

src/components/cylc/ConnectionStatus.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export default {
4646
*/
4747
isOffline: {
4848
type: Boolean,
49-
required: true
50-
}
49+
required: true,
50+
},
5151
},
5252
5353
icons: {

src/components/cylc/Drawer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const minWidth = 150
7474
export default {
7575
components: {
7676
Workflows,
77-
'c-header': Header
77+
'c-header': Header,
7878
},
7979
8080
setup () {

src/components/cylc/GraphNode.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,30 +95,30 @@ export default {
9595
name: 'GraphNode',
9696
components: {
9797
SVGTask,
98-
Job
98+
Job,
9999
},
100100
props: {
101101
task: {
102102
type: Object,
103-
required: true
103+
required: true,
104104
},
105105
jobs: {
106106
type: Array,
107-
required: true
107+
required: true,
108108
},
109109
maxJobs: {
110110
// maximum number of jobs to display before using an overflow indicator
111111
default: 6,
112-
required: false
112+
required: false,
113113
},
114114
mostRecentJobScale: {
115115
// the size of the most recent job icon relative to any previos jobs
116116
default: 1.2,
117-
required: false
117+
required: false,
118118
},
119119
jobTheme: {
120-
required: true
121-
}
120+
required: true,
121+
},
122122
},
123123
computed: {
124124
nodeID () {
@@ -150,7 +150,7 @@ export default {
150150
// the most recent job is larger so all subsequent jobs need to be bumped
151151
// along a bit further to account for this
152152
return (this.mostRecentJobScale * 100) - 100 // y offset in px
153-
}
154-
}
153+
},
154+
},
155155
}
156156
</script>

src/components/cylc/GraphSubgraph.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export default {
5454
props: {
5555
subgraph: {
5656
type: Object,
57-
required: true
58-
}
57+
required: true,
58+
},
5959
},
6060
computed: {
6161
labelXPosition () {
@@ -67,6 +67,6 @@ export default {
6767
// Adding 90pt to the y position brings the label inside the rect
6868
return (parseInt(this.subgraph.y) + 90)
6969
},
70-
}
70+
},
7171
}
7272
</script>

0 commit comments

Comments
 (0)