diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-12-08 10:22:10 +0000 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-08 17:48:12 +0100 |
commit | 213a1fc421da26a9d3852721aaf1cd3fbdc7b162 (patch) | |
tree | 3c036c4d500cc40c3eb2bbbf89943e15f6a5d24f | |
parent | 544cc04f1608e8c0555cde50dbccd6e0e964589b (diff) |
Bump eslint-config-nextcloud from 0.0.6 to 0.1.0
Bumps [eslint-config-nextcloud](https://github.com/nextcloud/eslint-config-nextcloud) from 0.0.6 to 0.1.0.
- [Release notes](https://github.com/nextcloud/eslint-config-nextcloud/releases)
- [Commits](https://github.com/nextcloud/eslint-config-nextcloud/compare/v0.0.6...v0.1.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
50 files changed, 428 insertions, 435 deletions
@@ -15,7 +15,7 @@ all: dev-setup lint build-js-production test test-php dev-setup: clean clean-dev npm-init npm-init: - npm install + npm ci npm-update: npm update diff --git a/package-lock.json b/package-lock.json index 7426aeef..43b8243e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4650,9 +4650,9 @@ } }, "eslint-config-nextcloud": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.6.tgz", - "integrity": "sha512-ktCzXVA8GrqZVljutkBKOq2hgKvzKyLhNCAB5bCjdmMo7DIky2ZYeMtDmiEUZCPoXbSJY0kyvnZPbcN4VYzyCg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.1.0.tgz", + "integrity": "sha512-qaxA/OZzfa4G4JQt0UGNs8uJcKsln7UM71R2vdiSpcgKW5hJ6tqtPP7RExS+4osBOl7ntiXihg9bj7PUwqsNaA==", "dev": true }, "eslint-config-standard": { diff --git a/package.json b/package.json index fbfb29a7..d3aa5845 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "chai": "^4.2.0", "css-loader": "^3.2.1", "eslint": "^5.16.0", - "eslint-config-nextcloud": "0.0.6", + "eslint-config-nextcloud": "0.1.0", "eslint-config-standard": "^12.0.0", "eslint-import-resolver-webpack": "^0.11.1", "eslint-loader": "^3.0.3", diff --git a/src/ContactsRoot.vue b/src/ContactsRoot.vue index 06ab1b3e..9fdd4d87 100644 --- a/src/ContactsRoot.vue +++ b/src/ContactsRoot.vue @@ -26,6 +26,6 @@ <script> export default { - name: 'ContactsRoot' + name: 'ContactsRoot', } </script> diff --git a/src/components/Actions/ActionCopyNtoFN.vue b/src/components/Actions/ActionCopyNtoFN.vue index 278239c6..0d756f7e 100644 --- a/src/components/Actions/ActionCopyNtoFN.vue +++ b/src/components/Actions/ActionCopyNtoFN.vue @@ -32,7 +32,7 @@ import ActionsMixin from '../../mixins/ActionsMixin' export default { name: 'ActionCopyNtoFN', components: { - ActionButton + ActionButton, }, mixins: [ActionsMixin], methods: { @@ -45,7 +45,7 @@ export default { this.component.contact.fullName = n.slice(0, 2).reverse().join(' ') this.component.updateContact() } - } - } + }, + }, } </script> diff --git a/src/components/Actions/ActionToggleYear.vue b/src/components/Actions/ActionToggleYear.vue index 0ad9dacd..9bc3e1b4 100644 --- a/src/components/Actions/ActionToggleYear.vue +++ b/src/components/Actions/ActionToggleYear.vue @@ -34,12 +34,12 @@ import ActionsMixin from '../../mixins/ActionsMixin' export default { name: 'ActionToggleYear', components: { - ActionCheckbox + ActionCheckbox, }, mixins: [ActionsMixin], data() { return { - omitYear: false + omitYear: false, } }, @@ -74,7 +74,7 @@ export default { const dateObject = this.component.localValue.toJSON() this.component.updateValue(dateObject, true) this.omitYear = !this.omitYear - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index 364d6316..e0980985 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -218,18 +218,18 @@ export default { ContactProperty, PropertyGroups, PropertyRev, - PropertySelect + PropertySelect, }, props: { loading: { type: Boolean, - default: true + default: true, }, contactKey: { type: String, - default: undefined - } + default: undefined, + }, }, data() { @@ -246,7 +246,7 @@ export default { loadingData: true, loadingUpdate: false, openedMenu: false, - qrcode: '' + qrcode: '', } }, @@ -267,12 +267,12 @@ export default { if (!this.contact.dav) { return { icon: 'icon-error-white header-icon--pulse', - msg: t('contacts', 'This contact is not yet synced. Edit it to save it to the server.') + msg: t('contacts', 'This contact is not yet synced. Edit it to save it to the server.'), } } else if (this.isReadOnly) { return { icon: 'icon-eye-white', - msg: t('contacts', 'This contact is in read-only mode. You do not have permission to edit this contact.') + msg: t('contacts', 'This contact is in read-only mode. You do not have permission to edit this contact.'), } } return false @@ -297,7 +297,7 @@ export default { */ colorAvatar() { try { - let color = this.contact.uid.toRgb() + const color = this.contact.uid.toRgb() return `rgb(${color.r}, ${color.g}, ${color.b})` } catch (e) { return 'grey' @@ -328,7 +328,7 @@ export default { return { readableName: t('contacts', 'Addressbook'), icon: 'icon-address-book', - options: this.addressbooksOptions + options: this.addressbooksOptions, } }, @@ -344,7 +344,7 @@ export default { }, set: function(addressbookId) { this.moveContactToAddressbook(addressbookId) - } + }, }, /** @@ -355,7 +355,7 @@ export default { groupsModel() { return { readableName: t('contacts', 'Groups'), - icon: 'icon-contacts' + icon: 'icon-contacts', } }, @@ -372,7 +372,7 @@ export default { set: function(data) { this.contact.groups = data this.debounceUpdateContact() - } + }, }, /** @@ -386,7 +386,7 @@ export default { .map(addressbook => { return { id: addressbook.id, - name: addressbook.displayName + name: addressbook.displayName, } }) }, @@ -397,7 +397,7 @@ export default { }, contact() { return this.$store.getters.getContact(this.contactKey) - } + }, }, watch: { @@ -405,7 +405,7 @@ export default { if (this.contactKey) { this.selectContact(this.contactKey) } - } + }, }, beforeMount() { @@ -454,11 +454,11 @@ export default { * Generate a qrcode for the contact */ showQRcode() { - let jCal = this.contact.jCal.slice(0) + const jCal = this.contact.jCal.slice(0) // do not encode photo jCal[1] = jCal[1].filter(props => props[0] !== 'photo') - let data = stringify(jCal) + const data = stringify(jCal) if (data.length > 0) { this.qrcode = btoa(qr.imageSync(data, { type: 'svg' })) } @@ -483,7 +483,7 @@ export default { async selectContact(key) { // local version of the contact this.loadingData = true - let contact = this.$store.getters.getContact(key) + const contact = this.$store.getters.getContact(key) if (contact) { // if contact exists AND if exists on server @@ -524,7 +524,7 @@ export default { * @param {string} addressbookId the desired addressbook ID */ async moveContactToAddressbook(addressbookId) { - let addressbook = this.addressbooks.find(search => search.id === addressbookId) + const addressbook = this.addressbooks.find(search => search.id === addressbookId) this.loadingUpdate = true if (addressbook) { try { @@ -532,15 +532,15 @@ export default { // we need to use the store contact, not the local contact // using this.contact and not this.localContact contact: this.contact, - addressbook + addressbook, }) // select the contact again this.$router.push({ name: 'contact', params: { selectedGroup: this.$route.params.selectedGroup, - selectedContact: contact.key - } + selectedContact: contact.key, + }, }) } catch (error) { console.error(error) @@ -572,7 +572,7 @@ export default { */ updateLocalContact(contact) { // create empty contact and copy inner data - let localContact = Object.assign( + const localContact = Object.assign( Object.create(Object.getPrototypeOf(contact)), contact ) @@ -588,7 +588,7 @@ export default { e.preventDefault() this.debounceUpdateContact() } - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsAddNewProp.vue b/src/components/ContactDetails/ContactDetailsAddNewProp.vue index 13520ac7..c6b3ac64 100644 --- a/src/components/ContactDetails/ContactDetailsAddNewProp.vue +++ b/src/components/ContactDetails/ContactDetailsAddNewProp.vue @@ -49,14 +49,14 @@ export default { name: 'ContactDetailsAddNewProp', components: { - PropertyTitle + PropertyTitle, }, props: { contact: { type: Contact, - default: null - } + default: null, + }, }, computed: { @@ -92,10 +92,10 @@ export default { .map(key => { return { id: key, - name: this.properties[key].readableName + name: this.properties[key].readableName, } }).sort((a, b) => a.name.localeCompare(b.name)) - } + }, }, methods: { @@ -108,17 +108,17 @@ export default { addProp({ id }) { if (this.properties[id] && this.properties[id].defaultjCal && this.properties[id].defaultjCal[this.contact.version]) { - let defaultjCal = this.properties[id].defaultjCal[this.contact.version] - let property = new ICAL.Property([id, ...defaultjCal]) + const defaultjCal = this.properties[id].defaultjCal[this.contact.version] + const property = new ICAL.Property([id, ...defaultjCal]) this.contact.vCard.addProperty(property) } else { - let defaultData = this.properties[id].defaultValue - let property = this.contact.vCard.addPropertyWithValue(id, defaultData ? defaultData.value : '') + const defaultData = this.properties[id].defaultValue + const property = this.contact.vCard.addPropertyWithValue(id, defaultData ? defaultData.value : '') if (defaultData && defaultData.type) { property.setParameter('type', defaultData.type) } } - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index a8762983..8aa0e125 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -98,14 +98,14 @@ export default { components: { ActionLink, - ActionButton + ActionButton, }, props: { contact: { type: Object, - required: true - } + required: true, + }, }, data() { @@ -115,7 +115,7 @@ export default { loading: false, root: generateRemoteUrl(`dav/files/${OC.getCurrentUser().uid}`), width: 0, - height: 0 + height: 0, } }, computed: { @@ -124,7 +124,7 @@ export default { return this.contact.addressbook.readOnly } return false - } + }, }, mounted() { // update image size on window resize @@ -142,10 +142,10 @@ export default { if (event.target.files && !this.loading) { this.closeMenu() - let file = event.target.files[0] + const file = event.target.files[0] if (file && file.size && file.size <= 1 * 1024 * 1024) { - let reader = new FileReader() - let self = this + const reader = new FileReader() + const self = this reader.onload = function(e) { // only getting the raw binary base64 @@ -228,7 +228,7 @@ export default { 'image/gif', 'image/x-xbitmap', 'image/bmp', - 'image/svg+xml' + 'image/svg+xml', ]) .build() @@ -238,7 +238,7 @@ export default { try { const { get } = await axios() const response = await get(`${this.root}${file}`, { - responseType: 'arraybuffer' + responseType: 'arraybuffer', }) const type = response.headers['content-type'] const data = Buffer.from(response.data, 'binary').toString('base64') @@ -317,9 +317,9 @@ export default { } } } - } + }, - } + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsProperty.vue b/src/components/ContactDetails/ContactDetailsProperty.vue index ece501e1..bcbfbe4e 100644 --- a/src/components/ContactDetails/ContactDetailsProperty.vue +++ b/src/components/ContactDetails/ContactDetailsProperty.vue @@ -57,25 +57,25 @@ export default { props: { property: { type: Property, - default: true + default: true, }, sortedProperties: { type: Array, default() { return [] - } + }, }, index: { type: Number, - default: 0 + default: 0, }, contact: { type: Contact, - default: null + default: null, }, localContact: { type: Contact, - default: null + default: null, }, /** * This is needed so that we can update @@ -83,8 +83,8 @@ export default { */ updateContact: { type: Function, - default: () => {} - } + default: () => {}, + }, }, computed: { @@ -222,12 +222,12 @@ export default { if (this.propLabel) { return { id: this.propLabel.name, - name: this.propLabel.getFirstValue() + name: this.propLabel.getFirstValue(), } } if (this.propModel && this.propModel.options && this.type) { - let selectedType = this.type + const selectedType = this.type // vcard 3.0 save pref alongside TYPE .filter(type => type !== 'pref') // we only use uppercase strings @@ -236,17 +236,17 @@ export default { // Compare array and score them by how many matches they have to the selected type // sorting directly is cleaner but slower // https://jsperf.com/array-map-and-intersection-perf - let matchingTypes = this.propModel.options + const matchingTypes = this.propModel.options .map(type => { return { type, // "WORK,HOME" => ['WORK', 'HOME'] - score: type.id.split(',').filter(value => selectedType.indexOf(value) !== -1).length + score: type.id.split(',').filter(value => selectedType.indexOf(value) !== -1).length, } }) // Sort by score, filtering out the null score and selecting the first match - let matchingType = matchingTypes + const matchingType = matchingTypes .sort((a, b) => b.score - a.score) .filter(type => type.score > 0)[0] |