diff --git a/lib/mapbox/update-layer-source.js b/lib/mapbox/update-layer-source.js index 07738825..963f10bd 100644 --- a/lib/mapbox/update-layer-source.js +++ b/lib/mapbox/update-layer-source.js @@ -14,7 +14,7 @@ export default curry(function updateLayerSource(mapbox, layer) { if (source && data) { source.setData(data) } else { - !source && console.warn(`Source with id ${layer.id} could not be found`) - !data && console.warn('data property on layer could not be found', layer) + !source && console.warn(`Source with id ${layer.id} could not be found`) // eslint-disable-line + !data && console.warn('data property on layer could not be found', layer) // eslint-disable-line } }) diff --git a/lib/utils.js b/lib/utils.js index dde33c5a..5a6f6d21 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -74,7 +74,7 @@ export const applyTo = curry((fns, value) => fns.map(fn => fn(value))) * tap(1) // console.logs: 1. returns 1 */ export const tap = value => { - console.log(value) + console.log(value) // eslint-disable-line return value } @@ -85,7 +85,7 @@ export const tap = value => { * tapWith('prefix', 1) // console.logs: prefix: 1. returns 1 */ export const tapWith = curry((prefix, value) => { - console.log(prefix, value) + console.log(prefix, value) // eslint-disable-line return value }) diff --git a/package.json b/package.json index 00d8223d..a55c685e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "start": "nuxt start", "generate": "nuxt generate", "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", + "lint:prod": "eslint --config .eslintrc.prod.js --ext .js,.vue --ignore-path .gitignore .", "lint:fix": "eslint --ext .js,.vue --ignore-path .gitignore . --fix", "test": "jest", "mock-api": "json-mock-api --port 3001 --directory api-mock --middleware api-mock/cors-middleware.js,api-mock/redirect-middleware.js" @@ -17,7 +18,7 @@ "husky": { "hooks": { "pre-commit": "npm run lint:fix", - "pre-push": "npm run lint -- --config .eslintrc.prod.js && npm test" + "pre-push": "npm run lint:prod && npm test" } }, "dependencies": { diff --git a/test/unit/lib/utils.spec.js b/test/unit/lib/utils.spec.js index 42636f3f..4788b512 100644 --- a/test/unit/lib/utils.spec.js +++ b/test/unit/lib/utils.spec.js @@ -111,25 +111,25 @@ describe('applyTo', () => { describe('tap', () => { test('logs the value and returns it', () => { - console.log = jest.fn() + console.log = jest.fn() // eslint-disable-line const result = utils.tap(1) - expect(console.log).toHaveBeenCalledWith(1) + expect(console.log).toHaveBeenCalledWith(1) // eslint-disable-line expect(result).toBe(1) }) }) describe('tapWith', () => { test('logs the value prefixed with value and returns it', () => { - console.log = jest.fn() + console.log = jest.fn() // eslint-disable-line const result = utils.tapWith('prefix', 1) - expect(console.log).toHaveBeenCalledWith('prefix', 1) + expect(console.log).toHaveBeenCalledWith('prefix', 1) // eslint-disable-line expect(result).toBe(1) }) test('can be called curried', () => { - console.log = jest.fn() + console.log = jest.fn() // eslint-disable-line const result = utils.tapWith('prefix')(1) - expect(console.log).toHaveBeenCalledWith('prefix', 1) + expect(console.log).toHaveBeenCalledWith('prefix', 1) // eslint-disable-line expect(result).toBe(1) }) })