Skip to content

Commit

Permalink
Enable linting in CI (#3450)
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Oct 6, 2019
1 parent c1d2027 commit 516b074
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
@@ -1,4 +1,3 @@
# .travis.yml
language: node_js
sudo: required

Expand All @@ -14,7 +13,7 @@ matrix:
- node_js: '10'
env: DB="oracledb mssql mysql mysql2 postgres sqlite3" KNEX_TEST_TIMEOUT=60000
- node_js: '8'
env: TESTSCRIPT=test:nyc DB="oracledb mssql mysql mysql2 postgres sqlite3" KNEX_TEST_TIMEOUT=60000
env: TESTSCRIPT=test:everything DB="oracledb mssql mysql mysql2 postgres sqlite3" KNEX_TEST_TIMEOUT=60000
install:
- npm i
- (echo $DB | grep oracledb) && npm install oracledb@3.1.2 || true
Expand Down
4 changes: 2 additions & 2 deletions lib/query/builder.js
Expand Up @@ -1271,8 +1271,8 @@ Builder.prototype.del = Builder.prototype.delete;
require('../interface')(Builder);
helpers.addQueryContext(Builder);

Builder.extend = function(methodName, fn) {
if (Builder.prototype.hasOwnProperty(methodName)) {
Builder.extend = (methodName, fn) => {
if (Object.prototype.hasOwnProperty.call(Builder.prototype, methodName)) {
throw new Error(
`Can't extend QueryBuilder with existing method ('${methodName}').`
);
Expand Down
32 changes: 17 additions & 15 deletions package.json
Expand Up @@ -14,8 +14,10 @@
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint \"lib/**/*.js\" \"test/**/*.js\"",
"lint:types": "dtslint types",
"lint:everything": "npm run lint:types && npm run lint",
"test": "mocha --exit -t 10000 test/index.js && npm run test:tape && npm run test:cli",
"test:nyc": "nyc mocha --exit --check-leaks --globals __core-js_shared__ -t 10000 test/index.js && npm run test:tape && npm run test:cli",
"test:coverage": "nyc mocha --exit --check-leaks --globals __core-js_shared__ -t 10000 test/index.js && npm run test:tape && npm run test:cli",
"test:everything": "npm run lint:everything && npm run test:coverage",
"test:sqlite": "cross-env DB=sqlite3 npm test",
"test:tape": "node test/tape/index.js | tap-spec",
"test:cli": "cross-env KNEX_PATH=../knex.js KNEX=bin/cli.js jake -f test/jake/Jakefile",
Expand All @@ -26,9 +28,9 @@
"stress:destroy": "docker-compose -f scripts/stress-test/docker-compose.yml stop"
},
"dependencies": {
"bluebird": "^3.5.5",
"bluebird": "^3.7.0",
"colorette": "1.1.0",
"commander": "^3.0.1",
"commander": "^3.0.2",
"debug": "4.1.1",
"getopts": "2.2.5",
"inherits": "~2.0.4",
Expand All @@ -49,21 +51,21 @@
]
},
"devDependencies": {
"@types/node": "^10.14.17",
"@types/node": "^10.14.20",
"JSONStream": "^1.3.5",
"chai": "^4.2.0",
"chai-subset-in-order": "^2.1.3",
"cli-testlab": "^1.7.0",
"cli-testlab": "^1.8.0",
"coveralls": "^3.0.6",
"cross-env": "^5.2.1",
"dtslint": "^0.9.6",
"eslint": "^6.3.0",
"eslint-config-prettier": "^6.2.0",
"cross-env": "^6.0.3",
"dtslint": "^0.9.8",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.5",
"husky": "^3.0.8",
"jake": "^8.1.1",
"lint-staged": "^9.2.5",
"mocha": "^6.2.0",
"lint-staged": "^9.4.1",
"mocha": "^6.2.1",
"mock-fs": "^4.10.1",
"mssql": "^5.1.0",
"mysql": "^2.17.1",
Expand All @@ -73,15 +75,15 @@
"pg-query-stream": "^2.0.0",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
"sinon": "^7.4.2",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0",
"source-map-support": "^0.5.13",
"sqlite3": "^4.1.0",
"tap-spec": "^5.0.0",
"tape": "^4.11.0",
"toxiproxy-node-client": "^2.0.6",
"typescript": "^3.6.2",
"webpack-cli": "^3.3.8"
"typescript": "^3.6.3",
"webpack-cli": "^3.3.9"
},
"buildDependencies": [
"rimraf"
Expand Down
1 change: 1 addition & 0 deletions test/index.js
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
'use strict';

require('source-map-support').install();
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -1873,7 +1873,7 @@ declare namespace Knex {
}

class QueryBuilder {
public static extend(
static extend(
methodName: string,
fn: <TRecord extends {} = any, TResult = unknown[]>(
this: Knex<TRecord, TResult>,
Expand Down
1 change: 1 addition & 0 deletions types/tslint.json
Expand Up @@ -4,6 +4,7 @@
"ban-types": false,
"await-promise": false,
"array-type": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
"no-empty-interface": false,
"unified-signatures": false,
Expand Down

0 comments on commit 516b074

Please sign in to comment.