Browse Source

style: enforce comma-dangle

The ESLint comma-dangle rule issues warnings but doesn't fail the CI.
Running npm run lint:fix adds missing commas automatically. This often
leads to committing unrelated changes. Now, the CI enforces the dangling
comma rule.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/54057/head
Daniel Kesselberg 3 months ago
parent
commit
4a571fc391
No known key found for this signature in database GPG Key ID: 4A81C29F63464E8F
  1. 1
      .eslintrc.js
  2. 2
      apps/dav/src/components/AbsenceForm.vue
  3. 4
      apps/dav/src/components/ExampleContentDownloadButton.vue
  4. 2
      apps/dav/src/settings-example-content.js
  5. 2
      apps/dav/src/views/ExampleContentSettingsSection.vue

1
.eslintrc.js

@ -22,6 +22,7 @@ module.exports = {
'plugin:cypress/recommended',
],
rules: {
'comma-dangle': 'error',
'no-tabs': 'warn',
// TODO: make sure we fix this as this is bad vue coding style.
// Use proper sync modifier

2
apps/dav/src/components/AbsenceForm.vue

@ -219,7 +219,7 @@ export default {
lastDay: formatDateAsYMD(this.lastDay),
status: this.status,
message: this.message,
replacementUserId: this.replacementUser?.user ?? null
replacementUserId: this.replacementUser?.user ?? null,
})
showSuccess(this.$t('dav', 'Absence saved'))
} catch (error) {

4
apps/dav/src/components/ExampleContentDownloadButton.vue

@ -26,13 +26,13 @@ export default {
name: 'ExampleContentDownloadButton',
components: {
NcButton,
IconDownload
IconDownload,
},
props: {
href: {
type: String,
required: true,
}
},
},
}
</script>

2
apps/dav/src/settings-example-content.js

@ -10,7 +10,7 @@ Vue.mixin({
methods: {
t: translate,
$t: translate,
}
},
})
const View = Vue.extend(ExampleContentSettingsSection);

2
apps/dav/src/views/ExampleContentSettingsSection.vue

@ -33,6 +33,6 @@ export default {
hasCalendarApp() {
return loadState('dav', 'calendarEnabled')
},
}
},
}
</script>
Loading…
Cancel
Save