Skip to content

Commit 09f01f4

Browse files
Fixed linting errors
1 parent 19e73e8 commit 09f01f4

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

lib/entity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const upload = async ({ http, urlPath, stackHeaders, formData, params, me
8888
export const create = ({ http, params }) => {
8989
return async function (data, param) {
9090
this.stackHeaders = {
91-
...this.stackHeaders,
91+
...this.stackHeaders
9292
}
9393
const headers = {
9494
headers: {

lib/stack/globalField/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function GlobalField (http, data = {}) {
104104
* client.stack().globalField().query({ query: { name: 'Global Field Name' } }).find()
105105
* .then((globalFields) => console.log(globalFields))
106106
*/
107-
this.query = query({ http: http, wrapperCollection: GlobalFieldCollection, apiVersion: this.apiVersion })
107+
this.query = query({ http: http, wrapperCollection: GlobalFieldCollection, apiVersion: this.apiVersion })
108108

109109
/**
110110
* @description The Import a global field call imports a global field into a stack.
@@ -160,4 +160,4 @@ export function createFormData (data) {
160160
formData.append('global_field', uploadStream)
161161
return formData
162162
}
163-
}
163+
}

lib/stack/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ export function Stack (http, data) {
164164
* .then((globalField) => console.log(globalField))
165165
*
166166
*/
167+
// eslint-disable-next-line camelcase
167168
this.globalField = (globalFieldUid = null, api_version = '3.0') => {
168-
const data = {
169-
stackHeaders: this.stackHeaders,
170-
api_version: api_version
169+
const data = {
170+
stackHeaders: this.stackHeaders,
171+
// eslint-disable-next-line camelcase
172+
api_version: api_version
171173
}
172174
if (globalFieldUid) {
173175
data.global_field = { uid: globalFieldUid }

test/sanity-check/api/globalfield-test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { expect } from 'chai'
33
import { cloneDeep } from 'lodash'
44
import { describe, it, setup } from 'mocha'
55
import { jsonReader } from '../utility/fileOperations/readwrite'
6-
import { createGlobalField, createNestedGlobalField, createNestedGlobalFieldForReference } from '../mock/globalfield'
6+
import { createGlobalField } from '../mock/globalfield'
77
import { contentstackClient } from '../utility/ContentstackClient.js'
88
import dotenv from 'dotenv'
99

@@ -199,7 +199,6 @@ describe('Global Field api Test', () => {
199199
// .catch(done)
200200
// })
201201

202-
203202
// it("should delete nested global field", (done) => {
204203
// makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' })
205204
// .delete()

0 commit comments

Comments
 (0)