Skip to content

Commit

Permalink
add lint deps to pkg.json
Browse files Browse the repository at this point in the history
move official support to node 10+
  • Loading branch information
James Butler committed Oct 30, 2016
1 parent 56af845 commit 6a5d2cc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- "0.6"
- "0.8"
- "0.10"
- "0.12"
- "4"
Expand All @@ -10,7 +8,6 @@ node_js:

install:
- make install
- make lint-install

script:
- make lint
Expand Down
15 changes: 1 addition & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.PHONY: all clean install check test lint-install lint

INCOMPATIBLE_ESLINT_VERSIONS=$(shell node --version | egrep 'v0.[2-9]' | cut -d '.' -f 1-2)
.PHONY: all clean install check test lint

all:

Expand All @@ -16,16 +14,5 @@ check:
test:
npm test

lint-install:
ifeq ($(INCOMPATIBLE_ESLINT_VERSIONS),)
npm run lint-install
else
@echo "Lint not available on $(INCOMPATIBLE_ESLINT_VERSIONS)"
endif

lint:
ifeq ($(INCOMPATIBLE_ESLINT_VERSIONS),)
npm run lint
else
@echo "Lint not available on $(INCOMPATIBLE_ESLINT_VERSIONS)"
endif
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Generic resource pool. Can be used to reuse or throttle expensive resources such as
database connections.

This module should work on any version of node from at least 0.6+, however the test and linting tools used only run on node >=10 so official support is for node 10 and up. All that said, if you find a bug on the older versions and can give us a test case we'll try to fix it.

## Installation

$ npm install generic-pool
Expand Down Expand Up @@ -257,12 +259,7 @@ The tests are run/written using Tap. Most are ports from the old espresso tests

## Linting

We use eslint and the `standard` ruleset. At the moment linting is not done as part of the test suite but this will probably change in the future. You should ideally lint your code before making any PR's patches etc.

Becuase the linting tools require nodejs >= `0.10` but we test against `0.8` and `0.6` installation of the tools is done via `npm run lint-install`. Some kind of optionalDevDependencies would be great!

$ npm run lint-install
$ npm run lint
We use eslint and the `standard` ruleset.


## License
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@
"url": "http://github.com/coopernurse/node-pool.git"
},
"devDependencies": {
"tap": "^5.7.1"
"tap": "^5.7.1",
"eslint": "^2.13.1",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-standard": "^1.3.1",
"eslint-plugin-promise": "^1.0.8"
},
"engines": {
"node": ">= 0.2.0"
"node": ">= 0.8.0"
},
"scripts": {
"lint": "eslint lib test",
"lint-install": "npm install eslint@^2.13.1 eslint-config-standard@^5.3.1 eslint-plugin-standard@^1.3.1 eslint-plugin-promise@^1.0.8",
"test": "tap test/*-test.js"
},
"license": "MIT"
Expand Down

0 comments on commit 6a5d2cc

Please sign in to comment.