Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable linting in CI #3450

Merged
merged 5 commits into from
Oct 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:ci 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
Original file line number Diff line number Diff line change
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
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint \"lib/**/*.js\" \"test/**/*.js\"",
"lint:types": "dtslint types",
"lint:ci": "lint:types && 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:ci": "lint:ci && 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 Down Expand Up @@ -49,16 +51,16 @@
]
},
"devDependencies": {
"@types/node": "^10.14.17",
"@types/node": "^10.14.18",
"JSONStream": "^1.3.5",
"chai": "^4.2.0",
"chai-subset-in-order": "^2.1.3",
"cli-testlab": "^1.7.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.0",
"dtslint": "^0.9.8",
"eslint": "^6.4.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.5",
"jake": "^8.1.1",
Expand All @@ -80,7 +82,7 @@
"tap-spec": "^5.0.0",
"tape": "^4.11.0",
"toxiproxy-node-client": "^2.0.6",
"typescript": "^3.6.2",
"typescript": "^3.6.3",
"webpack-cli": "^3.3.8"
},
"buildDependencies": [
Expand Down
1 change: 1 addition & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
'use strict';

require('source-map-support').install();
Expand Down
2 changes: 0 additions & 2 deletions test/integration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const logger = require('./logger');
const config = require('../knexfile');
const fs = require('fs');

const Bluebird = require('bluebird');

Object.keys(config).forEach((dialectName) => {
return require('./suite')(logger(knex(config[dialectName])));
});
Expand Down