From a575a61b25786b8a33044e8d39142c901654f3a6 Mon Sep 17 00:00:00 2001 From: Will Murphy Date: Mon, 2 Jan 2023 13:57:47 -0600 Subject: [PATCH] Add linting to scripts and CI checks, fix existing lint --- .travis.yml | 1 + package.json | 3 ++- store/index.js | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 452f9d3..da3d289 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,4 @@ services: jobs: - script: 'npm test' - script: 'npm run coverage' + - script: 'npm run lint' diff --git a/package.json b/package.json index 523be2d..f37eb10 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ }, "scripts": { "test": "jasmine", - "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "lint": "standard" }, "repository": { "type": "git", diff --git a/store/index.js b/store/index.js index 0f35ec9..8f8faa4 100644 --- a/store/index.js +++ b/store/index.js @@ -101,7 +101,7 @@ class ApexStore extends IApexStore { getObject (id, includeMeta) { return this.db .collection('objects') - .find({ id: id }) + .find({ id }) .limit(1) // strict comparison as we don't want to return private keys on accident .project(includeMeta === true ? this.metaProj : this.projection) @@ -135,7 +135,7 @@ class ApexStore extends IApexStore { getActivity (id, includeMeta) { return this.db.collection('streams') - .find({ id: id }) + .find({ id }) .limit(1) .project(includeMeta ? this.metaProj : this.projection) .next()